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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ekaterina
erp5
Commits
b849729e
Commit
b849729e
authored
Jun 29, 2020
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: common clone action gadget (text editor updated)
parent
b2181b84
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
642 additions
and
22 deletions
+642
-22
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_officejs_common/WebSection_getOfficeJsPrecacheManifestList.py
...cejs_common/WebSection_getOfficeJsPrecacheManifestList.py
+4
-0
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_officejs_common/action_clone.html.html
.../portal_skins/erp5_officejs_common/action_clone.html.html
+2
-2
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_officejs_common/action_clone.html.xml
...m/portal_skins/erp5_officejs_common/action_clone.html.xml
+1
-1
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_officejs_common/action_clone.js.js
...Item/portal_skins/erp5_officejs_common/action_clone.js.js
+36
-13
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_officejs_common/action_clone.js.xml
...tem/portal_skins/erp5_officejs_common/action_clone.js.xml
+1
-1
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_text_editor/Base_cloneDocumentForTextEditor/gadget_field_action_js_script.xml
...neDocumentForTextEditor/gadget_field_action_js_script.xml
+1
-1
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_text_editor/WebSection_getTextEditorPrecacheManifestList.py
...xt_editor/WebSection_getTextEditorPrecacheManifestList.py
+0
-4
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditorClone.xml
...icejs_ui_texteditor_zuite/testOfficeJSTextEditorClone.xml
+58
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditorClone.zpt
...icejs_ui_texteditor_zuite/testOfficeJSTextEditorClone.zpt
+539
-0
No files found.
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_officejs_common/WebSection_getOfficeJsPrecacheManifestList.py
View file @
b849729e
...
...
@@ -51,6 +51,10 @@ url_list = [
"officejs_logo.png"
,
"jio_appcachestorage.js"
,
"jio_configuration_storage.js"
,
#app actions
"action_clone.html"
,
"action_clone.js"
]
base64_url_list
=
context
.
WebSection_getBase64ConfigurationUrlList
(
batch_mode
=
1
)
...
...
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_
text_editor/action_texteditor
_clone.html.html
→
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_
officejs_common/action
_clone.html.html
View file @
b849729e
...
...
@@ -5,11 +5,11 @@
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
OfficeJS
Texteditor
Clone Action
</title>
<title>
OfficeJS Clone Action
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"action_
texteditor_
clone.js"
></script>
<script
src=
"action_clone.js"
></script>
</head>
...
...
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_
text_editor/action_texteditor
_clone.html.xml
→
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_
officejs_common/action
_clone.html.xml
View file @
b849729e
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
action_
texteditor_
clone.html
</string>
</value>
<value>
<string>
action_clone.html
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
...
...
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_
text_editor/action_texteditor
_clone.js.js
→
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_
officejs_common/action
_clone.js.js
View file @
b849729e
/*global window, rJS, RSVP */
/*global window, rJS, RSVP
, jIO
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
(
function
(
window
,
rJS
,
RSVP
,
jIO
)
{
"
use strict
"
;
rJS
(
window
)
...
...
@@ -10,6 +10,9 @@
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
jio_post
"
,
"
jio_post
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
declareAcquiredMethod
(
"
jio_allAttachments
"
,
"
jio_allAttachments
"
)
/////////////////////////////////////////////////////////////////
// declared methods
...
...
@@ -38,16 +41,36 @@
}
},
gadget
=
this
,
document
=
parent_options
.
doc
,
property
;
delete
content_dict
.
dialog_method
;
for
(
property
in
content_dict
)
{
if
(
content_dict
.
hasOwnProperty
(
property
))
{
document
[
property
]
=
content_dict
[
property
];
}
}
return
gadget
.
jio_post
(
document
)
.
push
(
function
(
jio_key
)
{
return_submit_dict
.
notify
.
message
=
"
Data Updated
"
;
all_attachments
,
promise_list
=
[],
parent_jio_key
=
parent_options
.
action_options
.
jio_key
,
jio_key
;
return
gadget
.
jio_allAttachments
(
parent_jio_key
)
.
push
(
function
(
result
)
{
var
property
;
all_attachments
=
result
;
return
gadget
.
jio_post
(
document
);
})
.
push
(
function
(
result_jio_key
)
{
var
attachment_id
;
jio_key
=
result_jio_key
;
for
(
attachment_id
in
all_attachments
)
{
if
(
all_attachments
.
hasOwnProperty
(
attachment_id
))
{
promise_list
.
push
(
gadget
.
jio_getAttachment
(
parent_jio_key
,
attachment_id
));
}
}
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
result_list
)
{
var
i
;
promise_list
=
[];
for
(
i
=
0
;
i
<
result_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
gadget
.
jio_putAttachment
(
jio_key
,
Object
.
keys
(
all_attachments
)[
i
],
result_list
[
i
]));
}
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
()
{
return_submit_dict
.
notify
.
message
=
"
Clone Document Created
"
;
return_submit_dict
.
notify
.
status
=
"
success
"
;
return_submit_dict
.
redirect
.
options
=
{
jio_key
:
jio_key
,
...
...
@@ -64,4 +87,4 @@
});
});
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
}(
window
,
rJS
,
RSVP
,
jIO
));
\ No newline at end of file
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_
text_editor/action_texteditor
_clone.js.xml
→
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_
officejs_common/action
_clone.js.xml
View file @
b849729e
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
action_
texteditor_
clone.js
</string>
</value>
<value>
<string>
action_clone.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
...
...
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_text_editor/Base_cloneDocumentForTextEditor/gadget_field_action_js_script.xml
View file @
b849729e
...
...
@@ -209,7 +209,7 @@
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string>
action_
texteditor_
clone.html
</string>
</value>
<value>
<string>
action_clone.html
</string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
...
...
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_text_editor/WebSection_getTextEditorPrecacheManifestList.py
View file @
b849729e
...
...
@@ -4,10 +4,6 @@ url_list = [
"gadget_officejs_text_editor.json"
,
"officejs_logo_text_editor.png"
,
"gadget_officejs_text_editor_router.html"
,
#app custom actions
"action_texteditor_clone.html"
,
"action_texteditor_clone.js"
]
return
url_list
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditorClone.xml
0 → 100644
View file @
b849729e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testOfficeJSTextEditorClone
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_texteditor_zuite/testOfficeJSTextEditorClone.zpt
0 → 100644
View file @
b849729e
This diff is collapsed.
Click to expand it.
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