Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
erp5
Commits
8d00b49a
Commit
8d00b49a
authored
Oct 05, 2016
by
Vincent Bechu
Committed by
Cédric Le Ninivin
Oct 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: delete logout from menu and add maximize button in header
/reviewed-on
nexedi/erp5!167
parent
9fc4ddfd
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
100 additions
and
58 deletions
+100
-58
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
...js/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
+5
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.xml
...s/PathTemplateItem/web_page_module/gadget_ckeditor_js.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_application_panel_html.html
...b_page_module/gadget_officejs_application_panel_html.html
+0
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_application_panel_html.xml
...eb_page_module/gadget_officejs_application_panel_html.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_header_js.js
...TemplateItem/web_page_module/gadget_officejs_header_js.js
+31
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_header_js.xml
...emplateItem/web_page_module/gadget_officejs_header_js.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_illustration_view_js.js
...ge_module/gadget_officejs_jio_web_illustration_view_js.js
+25
-19
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_illustration_view_js.xml
...e_module/gadget_officejs_jio_web_illustration_view_js.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.js
...m/web_page_module/gadget_officejs_jio_web_page_view_js.js
+25
-19
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml
.../web_page_module/gadget_officejs_jio_web_page_view_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.js
View file @
8d00b49a
...
...
@@ -15,7 +15,9 @@
g
.
props
.
ckeditor
=
CKEDITOR
.
replace
(
textarea
,
{
removeButtons
:
'
NewPage,Preview
'
,
removeButtons
:
'
NewPage,Preview,Cut,Paste,Copy,PasteText,
'
+
'
PasteFromWord,Flash,Iframe,Form,Checkbox,Radio,TextField,
'
+
'
Textarea,Select,Button,ImageButton,HiddenField,Maximize
'
,
removePlugins
:
''
,
disableNativeSpellChecker
:
false
,
extraAllowedContent
:
"
details section article
"
...
...
@@ -32,13 +34,12 @@
command
:
'
saveRJS
'
,
toolbar
:
'
document,1
'
});
g
.
props
.
ckeditor
.
on
(
'
maximize
'
,
function
(
)
{
return
g
.
maximize
(
);
g
.
props
.
ckeditor
.
on
(
'
instanceReady
'
,
function
(
event
)
{
event
.
editor
.
execCommand
(
'
maximize
'
);
});
});
})
.
declareAcquiredMethod
(
"
submitContent
"
,
"
triggerSubmit
"
)
.
declareAcquiredMethod
(
"
maximize
"
,
"
triggerMaximize
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
this
.
props
.
key
=
options
.
key
||
"
text_content
"
;
this
.
props
.
ckeditor
.
setData
(
options
.
value
||
""
);
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_ckeditor_js.xml
View file @
8d00b49a
...
...
@@ -216,7 +216,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
48.31859.27287.17783
</string>
</value>
<value>
<string>
9
54.4005.3918.16742
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
14
52872881.96
</float>
<float>
14
74449146.05
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_application_panel_html.html
View file @
8d00b49a
...
...
@@ -38,7 +38,6 @@
<
li
><
a
href
=
"
#page=document_list
"
data
-
i18n
=
"
Document List
"
>
Document
List
<
/a></
li
>
<
li
><
a
href
=
"
#page=jio_configurator
"
data
-
i18n
=
"
Storage Configuration
"
>
Storage
Configuration
<
/a></
li
>
<
li
><
a
href
=
"
#page=sync
"
data
-
i18n
=
"
Synchronization
"
>
Synchronization
<
/a></
li
>
<
li
class
=
"
ui-last-child
"
><
a
href
=
"
#page=logout
"
data
-
i18n
=
"
Logout
"
>
Logout
<
/a></
li
>
<
/ul
>
<
/div
>
</script>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_application_panel_html.xml
View file @
8d00b49a
...
...
@@ -255,7 +255,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
supercedriclen
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -269,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
1.28216.64976.63368
</string>
</value>
<value>
<string>
95
4.2922.61218.8379
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
14
64191586.4
</float>
<float>
14
74450659.36
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_header_js.js
View file @
8d00b49a
...
...
@@ -152,6 +152,7 @@
left_button
,
right_link
,
right_button
,
maximize_button
,
default_right_text
,
default_right_icon
=
""
,
title_link
=
{},
...
...
@@ -257,6 +258,26 @@
promise_list
.
push
(
gadget
.
translateHtml
(
""
));
}
// handle maximize button
if
(
options
.
hasOwnProperty
(
'
maximize_action
'
))
{
if
(
!
options
.
maximized
)
{
maximize_button
=
{
title
:
"
Maximize
"
,
icon
:
"
expand
"
,
name
:
"
maximize
"
};
}
else
{
maximize_button
=
{
title
:
"
Minimize
"
,
icon
:
"
compress
"
,
name
:
"
maximize
"
};
}
promise_list
.
push
(
gadget
.
translateHtml
(
header_button_template
(
maximize_button
)));
}
else
{
promise_list
.
push
(
gadget
.
translateHtml
(
""
));
}
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
...
...
@@ -264,7 +285,8 @@
.
push
(
function
(
my_translated_html_list
)
{
gadget
.
props
.
title_element
.
innerHTML
=
my_translated_html_list
[
0
];
gadget
.
props
.
left_link
.
innerHTML
=
my_translated_html_list
[
1
];
gadget
.
props
.
right_link
.
innerHTML
=
my_translated_html_list
[
2
];
gadget
.
props
.
right_link
.
innerHTML
=
my_translated_html_list
[
3
]
+
my_translated_html_list
[
2
];
});
})
...
...
@@ -283,6 +305,14 @@
if
(
name
===
"
submit
"
)
{
return
form_gadget
.
triggerSubmit
();
}
if
(
name
===
"
maximize
"
)
{
form_gadget
.
stats
.
options
.
maximized
=
!
form_gadget
.
stats
.
options
.
maximized
;
return
form_gadget
.
triggerSubmit
(
"
maximize
"
)
.
push
(
function
()
{
return
form_gadget
.
render
(
form_gadget
.
stats
.
options
);
});
}
throw
new
Error
(
"
Unsupported button
"
+
name
);
}
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_header_js.xml
View file @
8d00b49a
...
...
@@ -210,7 +210,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
cedric.le.ninivin
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -224,7 +224,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
45.58607.14824.6775
</string>
</value>
<value>
<string>
9
54.15931.48097.6604
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -242,7 +242,7 @@
</tuple>
<state>
<tuple>
<float>
14
42857960.12
</float>
<float>
14
75164833.83
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_illustration_view_js.js
View file @
8d00b49a
...
...
@@ -71,22 +71,25 @@
.
declareAcquiredMethod
(
'
allDocs
'
,
'
jio_allDocs
'
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
allowPublicAcquisition
(
'
triggerMaximize
'
,
function
()
{
.
allowPublicAcquisition
(
'
triggerSubmit
'
,
function
(
option
)
{
if
(
option
[
0
]
===
"
maximize
"
||
option
===
"
maximize
"
)
{
var
gadget
=
this
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
maximize
(
gadget
);
})
.
fail
(
function
(
e
)
{
console
.
log
(
e
);
});
})
.
allowPublicAcquisition
(
'
triggerSubmit
'
,
function
()
{
}
return
this
.
props
.
element
.
querySelector
(
'
button
'
).
click
();
})
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
.
declareMethod
(
'
triggerSubmit
'
,
function
(
option
)
{
if
(
option
[
0
]
===
"
maximize
"
||
option
===
"
maximize
"
)
{
var
gadget
=
this
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
maximize
(
gadget
);
});
}
return
this
.
props
.
element
.
querySelector
(
'
button
'
).
click
();
})
...
...
@@ -102,7 +105,9 @@
gadget
.
props
.
element
.
innerHTML
=
html
;
return
gadget
.
updateHeader
({
title
:
options
.
doc
.
title
+
"
| Web Illustration
"
,
save_action
:
true
save_action
:
true
,
maximize_action
:
true
,
maximized
:
options
.
doc
.
title
!==
""
});
})
.
push
(
function
()
{
...
...
@@ -114,8 +119,7 @@
// Render text content gadget
/////////////////////////////////////////
.
declareService
(
function
()
{
var
gadget
=
this
,
text_gadget
=
null
;
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
...
...
@@ -137,15 +141,17 @@
'
style
'
,
'
width:100%; border: 0 none; height: 600px
'
);
text_gadget
=
text_content_gadget
;
return
text_content_gadget
.
render
({
"
key
"
:
'
text_content
'
,
"
value
"
:
gadget
.
options
.
doc
.
text_content
});
})
.
push
(
function
()
{
return
text_gadget
.
getElement
();
},
function
(
error
)
{
if
(
gadget
.
options
.
doc
.
title
!==
""
)
{
return
gadget
.
triggerSubmit
(
"
maximize
"
);
}
})
.
push
(
undefined
,
function
(
error
)
{
var
display_error_element
;
if
(
error
===
"
Timed out after 5000 ms
"
)
{
display_error_element
=
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_illustration_view_js.xml
View file @
8d00b49a
...
...
@@ -255,7 +255,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
supercedriclen
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -269,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
1.45471.29918.56183
</string>
</value>
<value>
<string>
95
4.15924.25382.7799
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
14
65463607.76
</float>
<float>
14
75164165.45
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.js
View file @
8d00b49a
...
...
@@ -72,22 +72,25 @@
.
declareAcquiredMethod
(
'
allDocs
'
,
'
jio_allDocs
'
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
allowPublicAcquisition
(
'
triggerMaximize
'
,
function
()
{
.
allowPublicAcquisition
(
'
triggerSubmit
'
,
function
(
option
)
{
if
(
option
[
0
]
===
"
maximize
"
||
option
===
"
maximize
"
)
{
var
gadget
=
this
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
maximize
(
gadget
);
})
.
fail
(
function
(
e
)
{
console
.
log
(
e
);
});
})
.
allowPublicAcquisition
(
'
triggerSubmit
'
,
function
()
{
}
return
this
.
props
.
element
.
querySelector
(
'
button
'
).
click
();
})
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
.
declareMethod
(
'
triggerSubmit
'
,
function
(
option
)
{
if
(
option
[
0
]
===
"
maximize
"
||
option
===
"
maximize
"
)
{
var
gadget
=
this
;
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
maximize
(
gadget
);
});
}
return
this
.
props
.
element
.
querySelector
(
'
button
'
).
click
();
})
...
...
@@ -103,7 +106,9 @@
gadget
.
props
.
element
.
innerHTML
=
html
;
return
gadget
.
updateHeader
({
title
:
options
.
doc
.
title
+
"
| Web Page
"
,
save_action
:
true
save_action
:
true
,
maximize_action
:
true
,
maximized
:
gadget
.
options
.
doc
.
title
!==
""
});
})
.
push
(
function
()
{
...
...
@@ -115,8 +120,7 @@
// Render text content gadget
/////////////////////////////////////////
.
declareService
(
function
()
{
var
gadget
=
this
,
text_gadget
=
null
;
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
...
...
@@ -138,15 +142,17 @@
'
style
'
,
'
width:100%; border: 0 none; height: 600px
'
);
text_gadget
=
text_content_gadget
;
return
text_content_gadget
.
render
({
"
key
"
:
'
text_content
'
,
"
value
"
:
gadget
.
options
.
doc
.
text_content
});
})
.
push
(
function
()
{
return
text_gadget
.
getElement
();
},
function
(
error
)
{
if
(
gadget
.
options
.
doc
.
title
!==
""
)
{
return
gadget
.
triggerSubmit
(
"
maximize
"
);
}
})
.
push
(
undefined
,
function
(
error
)
{
var
display_error_element
;
if
(
error
===
"
Timed out after 5000 ms
"
)
{
display_error_element
=
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml
View file @
8d00b49a
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
46.59099.34897.19985
</string>
</value>
<value>
<string>
9
54.15935.39380.57002
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
14
46740911.15
</float>
<float>
14
75164868.59
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment