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
Mukul
erp5
Commits
52e8b364
Commit
52e8b364
authored
Dec 22, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core][erp5_web_renderjs_ui] lock editor gadget on render and get content
And move gadget global
parent
ef4e6927
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
327 deletions
+45
-327
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_global_js.xml
...PathTemplateItem/web_page_module/rjs_gadget_global_js.xml
+0
-320
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.html.html
...mplateItem/portal_skins/erp5_core/gadget_editor.html.html
+1
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
+16
-7
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_global.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_global.js.js
+0
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_global.js.xml
...nTemplateItem/portal_skins/erp5_core/gadget_global.js.xml
+28
-0
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_global_js.xml
deleted
100644 → 0
View file @
ef4e6927
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_global.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
rjs_gadget_global_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
gadget_global.js
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1406898405.88
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
964.19771.1861.12424
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1513956134.36
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
detect_converted_file
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
converted
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1405522101.02
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.html.html
View file @
52e8b364
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<title>
Text editor gadget
</title>
<title>
Text editor gadget
</title>
<script
src=
"rsvp.js"
></script>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"gadget_global.js"
></script>
<script
src=
"gadget_editor.js"
></script>
<script
src=
"gadget_editor.js"
></script>
</head>
</head>
<body>
<body>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
View file @
52e8b364
/*jslint nomen: true, indent: 2 */
/*jslint nomen: true, indent: 2 */
/*global window, rJS, RSVP, document, FileReader, Blob*/
/*global window, rJS, RSVP, document, FileReader, Blob,
(
function
(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
)
{
lockGadgetInQueue, unlockGadgetInQueue, unlockGadgetInFailedQueue*/
(
function
(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
,
lockGadgetInQueue
,
unlockGadgetInQueue
,
unlockGadgetInFailedQueue
)
{
"
use strict
"
;
"
use strict
"
;
/*
/*
...
@@ -55,7 +57,7 @@
...
@@ -55,7 +57,7 @@
url
,
url
,
div
=
document
.
createElement
(
'
div
'
),
div
=
document
.
createElement
(
'
div
'
),
div_max
=
document
.
createElement
(
'
div
'
),
div_max
=
document
.
createElement
(
'
div
'
),
queue
=
new
RSVP
.
Queue
();
queue
=
lockGadgetInQueue
(
gadget
)
();
if
((
modification_dict
.
hasOwnProperty
(
'
editable
'
))
||
if
((
modification_dict
.
hasOwnProperty
(
'
editable
'
))
||
(
modification_dict
.
hasOwnProperty
(
'
editor
'
)))
{
(
modification_dict
.
hasOwnProperty
(
'
editor
'
)))
{
...
@@ -139,18 +141,24 @@
...
@@ -139,18 +141,24 @@
}
else
{
}
else
{
element
.
querySelector
(
'
pre
'
).
textContent
=
gadget
.
state
.
value
;
element
.
querySelector
(
'
pre
'
).
textContent
=
gadget
.
state
.
value
;
}
}
return
queue
;
return
queue
.
push
(
unlockGadgetInQueue
(
gadget
),
unlockGadgetInFailedQueue
(
gadget
));
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
()
{
var
argument_list
=
arguments
,
var
argument_list
=
arguments
,
gadget
=
this
,
result
;
result
;
if
(
this
.
state
.
editable
&&
if
(
this
.
state
.
editable
&&
((
this
.
state
.
editor
===
'
codemirror
'
)
||
(
this
.
state
.
editor
===
'
fck_editor
'
)))
{
((
this
.
state
.
editor
===
'
codemirror
'
)
||
(
this
.
state
.
editor
===
'
fck_editor
'
)))
{
return
this
.
getDeclaredGadget
(
'
editor
'
)
return
lockGadgetInQueue
(
gadget
)()
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
editor
'
);
})
.
push
(
function
(
editor_gadget
)
{
.
push
(
function
(
editor_gadget
)
{
return
editor_gadget
.
getContent
.
apply
(
editor_gadget
,
argument_list
);
return
editor_gadget
.
getContent
.
apply
(
editor_gadget
,
argument_list
);
});
})
.
push
(
unlockGadgetInQueue
(
gadget
),
unlockGadgetInFailedQueue
(
gadget
));
/*
/*
.push(function (result) {
.push(function (result) {
var value = result[context.state.key] || '';
var value = result[context.state.key] || '';
...
@@ -171,4 +179,5 @@
...
@@ -171,4 +179,5 @@
return
{};
return
{};
});
});
}(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
));
}(
window
,
rJS
,
RSVP
,
document
,
FileReader
,
Blob
,
lockGadgetInQueue
,
unlockGadgetInQueue
,
unlockGadgetInFailedQueue
));
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_global_
js.js
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_global.
js.js
View file @
52e8b364
File moved
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_global.js.xml
0 → 100644
View file @
52e8b364
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
gadget_global.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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