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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
erp5
Commits
4a01ef56
Commit
4a01ef56
authored
Sep 04, 2015
by
Vivek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added bootstrap3-wysiwyg files
parent
9e34de6e
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2768 additions
and
92 deletions
+2768
-92
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_bootstrap3_wysiwyg_html.xml
...teItem/web_page_module/editor_bootstrap3_wysiwyg_html.xml
+21
-29
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_bootstrap_wysiwyg_html.xml
...ateItem/web_page_module/editor_bootstrap_wysiwyg_html.xml
+8
-6
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_gadget_bootstrap3-wysiwyg.js.xml
...m/web_page_module/editor_gadget_bootstrap3-wysiwyg.js.xml
+19
-7
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_gadget_bootstrap_wysiwyg_js.xml
...em/web_page_module/editor_gadget_bootstrap_wysiwyg_js.xml
+7
-5
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_interface_html.xml
...athTemplateItem/web_page_module/editor_interface_html.xml
+17
-3
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_html.xml
...hTemplateItem/web_page_module/editor_test_gadget_html.xml
+20
-11
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_js.xml
...athTemplateItem/web_page_module/editor_test_gadget_js.xml
+155
-31
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_gadget_interfaces_html.xml
...Item/web_page_module/interface_gadget_interfaces_html.xml
+350
-0
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_gadget_interfaces_js.xml
...teItem/web_page_module/interface_gadget_interfaces_js.xml
+748
-0
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_correct_implemented_gadget_html.xml
...module/interface_test_correct_implemented_gadget_html.xml
+353
-0
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_correct_implemented_gadget_js.xml
...e_module/interface_test_correct_implemented_gadget_js.xml
+349
-0
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_multiple_interface_correct_gadget_html.xml
...interface_test_multiple_interface_correct_gadget_html.xml
+354
-0
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_multiple_interface_correct_gadget_js.xml
...e/interface_test_multiple_interface_correct_gadget_js.xml
+358
-0
bt5/erp5_web_editor_demo/bt/template_keep_last_workflow_history_only_path_list
...emo/bt/template_keep_last_workflow_history_only_path_list
+3
-0
bt5/erp5_web_editor_demo/bt/template_keep_workflow_path_list
bt5/erp5_web_editor_demo/bt/template_keep_workflow_path_list
+3
-0
bt5/erp5_web_editor_demo/bt/template_path_list
bt5/erp5_web_editor_demo/bt/template_path_list
+3
-0
No files found.
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_bootstrap3_wysiwyg_html.xml
View file @
4a01ef56
...
...
@@ -105,40 +105,32 @@
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
\n
<!DOCTYPE html>
\n
<html>
\n
<head>
\n
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=Edge"
>
\n
<meta
charset=
"utf-8"
>
\n
\n
<title>
bootstrap-wysihtml5
</title>
\n
\n
<head>
\n
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=Edge"
>
\n
<meta
charset=
"utf-8"
>
\n
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
></link>
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"
></link>
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"
></link>
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"bootstrap3-wysihtml5.min.css"
></link>
\n
<title>
bootstrap-wysihtml5
</title>
\n
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
></link>
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"
></link>
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"
></link>
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"bootstrap3-wysihtml5.min.css"
></link>
\n
\n
</head>
\n
<body>
\n
<div
class=
"container"
style=
" width: 100%; height: 600px;"
>
\n
<div
class=
"jumbotron"
style=
"margin-left:0px; height: 600px;"
>
\n
<textarea
class=
"textarea"
placeholder=
"Enter text ..."
style=
"width: 100%; height: 400px; font-size: 14px; line-height: 18px;"
></textarea>
\n
</div>
\n
</div>
\n
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"editor_interface.html"
>
\n
\n
<script
src=
"wysihtml5x-toolbar.min.js"
></script>
\n
<script
src=
"jquery.js"
></script>
\n
<script
src=
"bootstrap.min.js"
></script>
\n
<script
src=
"handlebars.runtime.min.js"
></script>
\n
<script
src=
"bootstrap3-wysihtml5.min.js"
></script>
\n
<script
src=
"rsvp.js"
></script>
\n
<script
src=
"renderjs.js"
></script>
\n
<script
src=
"gadget_bootstrap3-wysiwyg.js"
type=
"text/javascript"
></script>
\n
\n
<script
src=
"wysihtml5x-toolbar.min.js"
></script>
\n
<script
src=
"jquery.js"
></script>
\n
<script
src=
"bootstrap.min.js"
></script>
\n
<script
src=
"handlebars.runtime.min.js"
></script>
\n
<script
src=
"bootstrap3-wysihtml5.min.js"
></script>
\n
<script
src=
"rsvp.js"
></script>
\n
<script
src=
"renderjs.js"
></script>
\n
<script
src=
"gadget_bootstrap3-wysiwyg.js"
></script>
\n
</body>
\n
</head>
\n
<body></body>
\n
</html>
\n
...
...
@@ -277,7 +269,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
4.56196.65369.51899
</string>
</value>
<value>
<string>
94
5.2018.8243.11827
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -295,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>
143
8777350.44
</float>
<float>
143
9468941.87
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_bootstrap_wysiwyg_html.xml
View file @
4a01ef56
...
...
@@ -110,19 +110,21 @@
<html
lang=
"en"
>
\n
<head>
\n
<meta
charset=
"utf-8"
>
\n
<title>
title
</title>
\n
<title>
bootstrap-wysiwhg
</title>
\n
\n
<link
rel=
"stylesheet"
href=
"bootstrap-combined.no-icons.min.css"
>
\n
<link
rel=
"stylesheet"
href=
"bootstrap-responsive.css"
>
\n
<link
rel=
"stylesheet"
href=
"https://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css"
>
\n
\n
<script
src=
"jquery.js"
></script>
\n
<script
src=
"jquery.hotkeys.js"
></script>
\n
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"editor_interface.html"
>
\n
\n
<script
src=
"jquery.js"
type=
"text/javascript"
></script>
\n
<script
src=
"jquery.hotkeys.js"
type=
"text/javascript"
></script>
\n
<script
src=
"bootstrap.min.js"
></script>
\n
<script
src=
"bootstrap-wysiwyg.js"
></script>
\n
<script
src=
"rsvp.js"
></script>
\n
<script
src=
"renderjs.js"
></script>
\n
<script
src=
"gadget_bootstrap_wysiwyg.js"
></script>
\n
<script
src=
"gadget_bootstrap_wysiwyg.js"
type=
"text/javascript"
></script>
\n
\n
</head>
\n
<body>
\n
...
...
@@ -333,7 +335,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
4.53506.33548.17937
</string>
</value>
<value>
<string>
94
5.2156.1335.48469
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -351,7 +353,7 @@
</tuple>
<state>
<tuple>
<float>
143
8615893.56
</float>
<float>
143
9467063.04
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_gadget_bootstrap3-wysiwyg.js.xml
View file @
4a01ef56
...
...
@@ -99,7 +99,9 @@
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
/*jslint indent: 2 */\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*jslint indent: 2 */\n
/*global window, jQuery, rJS*/\n
"use strict";\n
\n
...
...
@@ -115,16 +117,26 @@
.declareMethod(\'clearContent\', function () {\n
rJS(this).editor.html(\'\');\n
})\n
.ready(function (g) {\n
g.editor = $(\'.textarea\');\n
g.editor.wysihtml5({\n
.declareMethod(\'setEditor\', function () {\n
document.body.innerHTML =\'<div class="container" style=" width: 100%; height: 600px;">
\'\n
+\'
<div
class=
"jumbotron"
style=
"margin-left:0px; height: 600px;"
>
\'\n
+\'
<textarea
class=
"textarea"
placeholder=
"Enter text ..."
\'\n
+\'
style=
"width: 100%; height: 400px; font-size: 14px; line-height: 18px;"
>
\'\n
+\'
</textarea>
<
/div
</div>
\';\n
this.editor = $(\'.textarea\');\n
this.editor.wysihtml5({\n
toolbar: {\n
fa: true\n
}\n
});\n
})\n
\n
.ready(function (g) {\n
});\n
\n
}(window, jQuery, rJS));
</string>
</value>
}(window, jQuery, rJS));
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
@@ -259,7 +271,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
4.56186.56926.29952
</string>
</value>
<value>
<string>
94
5.1997.11510.44544
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -277,7 +289,7 @@
</tuple>
<state>
<tuple>
<float>
143
8777746.45
</float>
<float>
143
9471143.4
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_gadget_bootstrap_wysiwyg_js.xml
View file @
4a01ef56
...
...
@@ -157,12 +157,14 @@
.declareMethod(\'clearContent\', function () {\n
rJS(this).editor.html(\'\');\n
})\n
.ready(function (g) {\n
g.editor = $(\'#editor\');\n
.declareMethod(\'setEditor\', function () {\n
initToolbarBootstrapBindings();\n
g
.editor.wysiwyg({\n
this
.editor.wysiwyg({\n
fileUploadError: showErrorAlert\n
});\n
})\n
.ready(function (g) {\n
g.editor = $(\'#editor\');\n
});\n
\n
}(window, jQuery, rJS));
...
...
@@ -302,7 +304,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
944.
53151.60155.61457
</string>
</value>
<value>
<string>
944.
63600.63717.14984
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -320,7 +322,7 @@
</tuple>
<state>
<tuple>
<float>
143
8594704.78
</float>
<float>
143
9467049.96
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_interface_html.xml
View file @
4a01ef56
...
...
@@ -112,7 +112,21 @@
<body>
\n
<h1>
Editor Interface
</h1>
\n
<h3>
An interface defining the methods for text editor.
</h3>
\n
<dl></dl>
\n
<dl>
\n
<dt>
getContent
</dt>
\n
<dd>
to fetch the contect from the text editor
</dd>
\n
<dl></dl>
\n
<dt>
setContent
</dt>
\n
<dd>
to set the contect to the text editor
</dd>
\n
<dl>
\n
<dt
data-parameter-required=
"required"
data-parameter-type=
"string"
>
content
</dt>
\n
<dd>
the content to be set in the text editor
</dd>
\n
</dl>
\n
</dd>
\n
<dt>
clearContent
</dt>
\n
<dd>
to clear the contect of the text editor
</dd>
\n
<dl></dl>
\n
</dl>
\n
</body>
\n
</html>
...
...
@@ -251,7 +265,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
944.
48991.52289.15735
</string>
</value>
<value>
<string>
944.
53144.2367.52957
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -269,7 +283,7 @@
</tuple>
<state>
<tuple>
<float>
143
8345024.7
</float>
<float>
143
9192630.9
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_html.xml
View file @
4a01ef56
...
...
@@ -105,7 +105,6 @@
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
\n
<!DOCTYPE html>
\n
<html>
\n
<head>
\n
...
...
@@ -121,6 +120,7 @@
<script
type=
"text/javascript"
src=
"jquery.js"
></script>
\n
<script
type=
"text/javascript"
src=
"rsvp.js"
></script>
\n
<script
type=
"text/javascript"
src=
"renderjs.js"
></script>
\n
<script
src=
"gadget_global.js"
></script>
\n
<script
type=
"text/javascript"
src=
"jquerymobile.js"
></script>
\n
<script
type=
"text/javascript"
src=
"i18next.js"
></script>
\n
\n
...
...
@@ -129,27 +129,36 @@
\n
</head>
\n
<body>
\n
<div
data-role=
"page"
id=
"docum
ent"
>
\n
<div
data-role=
"page"
class=
"ui-content gadget-cont
ent"
>
\n
<div
class=
"ui-grid-a ui-responsive"
>
\n
<div
class=
"ui-block-a"
style=
"width:60%"
>
\n
<div
class=
"ui-content"
></div>
\n
</div>
\n
<div
class=
"ui-block-b"
style=
"width:30%"
>
\n
<form
class=
"gadget-select-form"
>
\n
<form
class=
"main-gadget-select-form"
>
\n
<div
data-role=
"fieldcontain"
>
\n
<label
for=
"main_gadget_selector"
>
Main Gadget
</label>
\n
<select
name=
"main_gadget_selector"
class=
"select"
>
\n
<option
value=
"./bootstrap3-wysiwyg.html"
>
Text Editor 2
</option>
\n
<option
value=
"./interface_test_correct_implemented_gadget.html"
>
Dummy Gadget 1
</option>
\n
<option
value=
"./interface_test_multiple_interface_correct_gadget.html"
>
Dummy Gadget 2
</option>
\n
</select>
\n
</div>
\n
<input
data-inline=
"true"
type=
"submit"
value=
"Submit"
data-theme=
"b"
>
\n
</form>
\n
<form
class=
"similar-gadget-select-form"
>
\n
<div
data-role=
"fieldcontain"
>
\n
<label
for=
"gadget_selector"
class=
"select"
></label>
\n
<select
name=
"gadget_selector"
>
\n
<option
value=
"https://softinst60317.host.vifib.net/erp5/web_site_module/editor_demo/bootstrap-wysiwyg.html"
>
Text Editor 1
</option>
\n
<option
value=
"https://softinst60317.host.vifib.net/erp5/web_site_module/editor_demo/bootstrap3-wysiwyg.html"
>
Text Editor 2
</option>
\n
<label
for=
"similar_gadget_selector"
>
Similar Gadgets
</label>
\n
<select
name=
"similar_gadget_selector"
class=
"select"
>
\n
</select>
\n
</div>
\n
<input
data-inline=
"true"
type=
"submit"
value=
"Submit"
data-theme=
"b"
>
\n
</form>
\n
</div>
\n
</div>
\n
</div>
\n
</div>
\n
</body>
\n
</html>
\n
\n
]]>
</string>
</value>
...
...
@@ -287,7 +296,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
4.56298.5921.30532
</string>
</value>
<value>
<string>
94
5.2226.34067.16605
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -305,7 +314,7 @@
</tuple>
<state>
<tuple>
<float>
143
8783361.36
</float>
<float>
143
9471929.19
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_js.xml
View file @
4a01ef56
...
...
@@ -99,13 +99,133 @@
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
/*jslint indent: 2, maxlen: 80, nomen: true */\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*jslint indent: 2, maxlen: 80, nomen: true */\n
/*global console, window, document, rJS, RSVP, $ */\n
(function (window, document, rJS) {\n
(function (window, document, rJS
, promiseEventListener
) {\n
"use strict";\n
\n
var EDITOR_GADGET_1 = "./bootstrap-wysiwyg.html";\n
var EDITOR_GADGET_2 = "./bootstrap3-wysiwyg.html";\n
var DEFAULT_GADGET_URL = "./bootstrap3-wysiwyg.html",\n
INTERFACE_GADGET_URL = "./gadget_interfaces.html";\n
\n
function declareInterfaceGadget(gadget) {\n
return gadget.declareGadget(INTERFACE_GADGET_URL, {\n
element: gadget.__element,\n
scope: "interface"\n
});\n
}\n
function declareSubGadget(gadget, sub_gadget_url) {\n
return gadget.declareGadget(sub_gadget_url, {\n
sandbox: \'iframe\',\n
element: gadget.props.content_element.querySelector("div.ui-content"),\n
scope: "sub_gadget"\n
});\n
}\n
function getAvailableSubGadgetList(gadget) {\n
var main_gadget = gadget.props.content_element.querySelector(\'form.main-gadget-select-form\'),\n
gadget_option_list = main_gadget.main_gadget_selector.querySelectorAll(\'option\'),\n
gadget_list = [],\n
i;\n
for(i = 0; i < gadget_option_list.length; i += 1) {\n
gadget_list.push({\n
url: gadget_option_list[i].value,\n
display_name: gadget_option_list[i].innerText\n
});\n
}\n
return gadget_list;\n
}\n
function filterSimilarSubGadgetList(gadget, sub_gadget_url) {\n
var interface_gadget,\n
available_subgadget_list;\n
return RSVP.Queue()\n
.push(function() {\n
return gadget.getDeclaredGadget("interface");\n
})\n
.push(function(i_gadget) {\n
interface_gadget = i_gadget;\n
return interface_gadget.getVerifyGadget(sub_gadget_url);\n
})\n
.push(function(sub_gadget) {\n
return RSVP.all([\n
interface_gadget.getDeclaredGadgetInterfaceList(sub_gadget),\n
getAvailableSubGadgetList(gadget)\n
]);\n
})\n
.push(function(result_data) {\n
var interface_url_list = result_data[0],\n
item,\n
status_list = [];\n
available_subgadget_list = result_data[1];\n
for(item in available_subgadget_list) {\n
status_list.push(interface_gadget.verifyGadgetInterfaceListImplementation(available_subgadget_list[item].url, interface_url_list));\n
}\n
return RSVP.all(status_list);\n
})\n
.push(function(result_list) {\n
return [available_subgadget_list, result_list];\n
});\n
}\n
function updateSimilarGadgetOptionList(gadget, sub_gadget_url) {\n
return RSVP.Queue()\n
.push(function() {\n
return filterSimilarSubGadgetList(gadget, sub_gadget_url);\n
})\n
.push(function(filtered_list) {\n
var select = gadget.props.content_element.querySelector(\'form.similar-gadget-select-form\').similar_gadget_selector;\n
select.innerHTML = "";\n
var i;\n
for(i = 0; i < filtered_list[1].length; i += 1) {\n
if(filtered_list[1][i]) {\n
var option = document.createElement("option");\n
option.text = filtered_list[0][i].display_name;\n
option.value = filtered_list[0][i].url;\n
select.appendChild(option);\n
}\n
}\n
return;\n
});\n
}\n
function gadgetSwitchHandler(gadget) {\n
return new RSVP.Queue()\n
.push(function() {\n
return RSVP.any([\n
promiseEventListener(\n
gadget.props.content_element.querySelector(\'form.main-gadget-select-form\'),\n
\'submit\',\n
false\n
),\n
promiseEventListener(\n
gadget.props.content_element.querySelector(\'form.similar-gadget-select-form\'),\n
\'submit\',\n
false\n
)\n
]);\n
})\n
.push(function(submit_event) {\n
var submit_source = submit_event.target.className;\n
gadget.props.content_element.querySelector("input[type=submit]")\n
.disabled = true;\n
gadget.props.content_element.querySelector("div.ui-content").innerHTML = "";\n
if(submit_source === \'main-gadget-select-form\') {\n
return RSVP.all([\n
declareSubGadget(gadget,submit_event.target[0].value),\n
updateSimilarGadgetOptionList(gadget, submit_event.target[0].value)\n
]);\n
} else {\n
return declareSubGadget(gadget,submit_event.target[0].value);\n
}\n
})\n
.push(function() {\n
return gadget.editor_setEditor();\n
})\n
.push(function(){\n
gadget.props.content_element.querySelector("input[type=submit]")\n
.disabled = false;\n
return gadgetSwitchHandler(gadget);\n
});\n
}\n
\n
// block JQM auto-start\n
$(document)\n
.on("mobileinit", function () {\n
...
...
@@ -115,57 +235,61 @@
rJS(window)\n
\n
.ready(function (g) {\n
console.log("test gadget ready");\n
g.props = {};\n
return g.getElement()\n
.push(function (element) {\n
$(element).trigger("create");\n
g.props.element = element;\n
g.props.content_element = element.querySelector(\'.gadget-content\');\n
});\n
})\n
\n
.declareMethod(\'render\', function () {\n
var gadget, page_list, page;\n
\n
gadget = this;\n
page_list = document.body.querySelectorAll("[data-role=page]");\n
page = page_list[page_list.length - 1];\n
\n
// helper: declare edtior\n
function declareEditorGadget(editor_g) {\n
return gadget.declareGadget(editor_g, {\n
sandbox: \'iframe\',\n
element: page.querySelector("div.ui-content"),\n
scope: "editor"\n
});\n
}\n
\n
var gadget = this;\n
return new RSVP.Queue()\n
.push(function() {\n
console.log("first gadget");\n
return declareEditorGadget(EDITOR_GADGET_1);\n
return declareInterfaceGadget(gadget, DEFAULT_GADGET_URL);\n
})\n
.push(function() {\n
return declareSubGadget(gadget, DEFAULT_GADGET_URL);\n
})\n
.push(function() {\n
return gadget.editor_setEditor();\n
})\n
.push(function(){\n
page.querySelector("div.ui-content").innerHTML = "";\n
return declareEditorGadget(EDITOR_GADGET_2);\n
return gadgetSwitchHandler(gadget);\n
});\n
\n
})\n
\n
/* ============================ EDITOR =============================== */\n
.declareMethod("editor_getContent", function (param_list) {\n
return this.getDeclaredGadget("
editor
")\n
return this.getDeclaredGadget("
sub_gadget
")\n
.then(function (editor) {\n
return editor.getContent.apply(editor, param_list);\n
});\n
})\n
.declareMethod("editor_setContent", function (param_list) {\n
return this.getDeclaredGadget("
editor
")\n
return this.getDeclaredGadget("
sub_gadget
")\n
.then(function (editor) {\n
return editor.setContent.apply(editor, param_list);\n
});\n
})\n
.declareMethod("editor_clearContent", function (param_list) {\n
return this.getDeclaredGadget("
editor
")\n
return this.getDeclaredGadget("
sub_gadget
")\n
.then(function (editor) {\n
return editor.clearContent.apply(editor, param_list);\n
});\n
})\n
.declareMethod("editor_setEditor", function (param_list) {\n
return this.getDeclaredGadget("sub_gadget")\n
.then(function (editor) {\n
return editor.setEditor.apply(editor, param_list);\n
});\n
});\n
\n
}(window, document, rJS));
</string>
</value>
}(window, document, rJS, promiseEventListener));
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
@@ -300,7 +424,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
4.56235.17061.26624
</string>
</value>
<value>
<string>
94
5.2225.65299.39441
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -318,7 +442,7 @@
</tuple>
<state>
<tuple>
<float>
143
8780043
.78
</float>
<float>
143
9471855
.78
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_gadget_interfaces_html.xml
0 → 100644
View file @
4a01ef56
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
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>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_interfaces.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interface_gadget_interfaces_html
</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 Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<!DOCTYPE html>
\n
<html>
\n
<head>
\n
<meta
charset=
"utf-8"
/>
\n
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
\n
<title>
Interfaces Gadget
</title>
\n
\n
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
\n
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
\n
<script
src=
"jquery.js"
type=
"text/javascript"
></script>
\n
\n
<!-- custom script -->
\n
<script
src=
"gadget_interfaces.js"
type=
"text/javascript"
></script>
\n
\n
</head>
\n
<body></body>
\n
</html>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget Interfaces
</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>
zope1
</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>
1436193819.91
</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>
944.33146.61429.18875
</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>
1437729117.8
</float>
<string>
GMT
</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>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</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>
empty
</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>
1436193507.57
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_gadget_interfaces_js.xml
0 → 100644
View file @
4a01ef56
<?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_interfaces.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interface_gadget_interfaces_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>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*jslint nomen: true, indent: 2, maxerr: 3 */\n
/*\n
* DOMParser HTML extension\n
* 2012-09-04\n
*\n
* By Eli Grey, http://eligrey.com\n
* Public domain.\n
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n
*/\n
/*! @source https://gist.github.com/1129031 */\n
(function (DOMParser) {\n
"use strict";\n
var DOMParser_proto = DOMParser.prototype,\n
real_parseFromString = DOMParser_proto.parseFromString;\n
\n
// Firefox/Opera/IE throw errors on unsupported types\n
try {\n
// WebKit returns null on unsupported types\n
if ((new DOMParser()).parseFromString("", "text/html")) {\n
// text/html parsing is natively supported\n
return;\n
}\n
} catch (ignore) {}\n
\n
DOMParser_proto.parseFromString = function (markup, type) {\n
var result, doc, doc_elt, first_elt;\n
if (/^\\s*text\\/html\\s*(?:;|$)/i.test(type)) {\n
doc = document.implementation.createHTMLDocument("");\n
doc_elt = doc.documentElement;\n
\n
doc_elt.innerHTML = markup;\n
first_elt = doc_elt.firstElementChild;\n
\n
if (doc_elt.childElementCount === 1\n
&& first_elt.localName.toLowerCase() === "html") {\n
doc.replaceChild(first_elt, doc_elt);\n
}\n
\n
result = doc;\n
} else {\n
result = real_parseFromString.apply(this, arguments);\n
}\n
return result;\n
};\n
}(DOMParser));\n
\n
/*global window, rJS, RSVP */\n
/*jslint nomen: true, indent: 2, maxerr: 3 */\n
(function (window, rJS, jQuery, RSVP, DOMParser) {\n
"use strict";\n
\n
var VERIFY_GADGET_SCOPE = "verify_gadget";\n
\n
function verifyInterfaceDefinition(interface_url) {\n
//to verify if interface definition follows the correct template.\n
return RSVP.Queue()\n
.push(function () {\n
return jQuery.get(interface_url);\n
})\n
.push(function(file_data) {\n
var doc = (new DOMParser()).parseFromString(file_data, \'text/html\').body,\n
dl_list = doc.getElementsByTagName(\'dl\'),\n
next_element = dl_list[0].firstElementChild,\n
method_len = dl_list.length - 1,\n
defer = RSVP.defer(),\n
i;\n
if (dl_list[0].childElementCount !== 3*method_len) {\n
throw new Error("Interface Definition Incorrect.");\n
}\n
try {\n
for (i = 0; i < method_len; i += 1) {\n
if ((!next_element || next_element.localName.toLowerCase() !== \'dt\') ||\n
(!(next_element = next_element.nextElementSibling) || next_element.localName.toLowerCase() !== \'dd\') ||\n
(!(next_element = next_element.nextElementSibling) || next_element.localName.toLowerCase() !== \'dl\')) {\n
throw new Error("Interface Definition Incorrect.");\n
}\n
if(next_element.getElementsByTagName(\'dt\').length !== next_element.getElementsByTagName(\'dd\').length) {\n
throw new Error("Interface Definition Incorrect.");\n
}\n
var argument_len = next_element.getElementsByTagName(\'dt\').length,\n
next_child_element = next_element.firstElementChild,\n
j;\n
for (j = 0; j < argument_len; j += 1) {\n
if ((!next_child_element || next_child_element.localName.toLowerCase() !== \'dt\') ||\n
(!(next_child_element = next_child_element.nextElementSibling) || next_child_element.localName.toLowerCase() !== \'dd\')) {\n
throw new Error("Interface Definition Incorrect.");\n
}\n
next_child_element = next_child_element.nextElementSibling;\n
}\n
next_element = next_element.nextElementSibling;\n
}\n
defer.resolve("Success");\n
} catch(error) {\n
defer.reject(error);\n
}\n
return defer.promise;\n
});\n
}\n
\n
function verifyInterfaceDeclaration(interface_url, declared_interface_list) {\n
//to verify if gadget declares the interface.\n
var defer = RSVP.defer();\n
try {\n
if (declared_interface_list.indexOf(interface_url) >
-1) {\n
defer.resolve("Success");\n
} else {\n
throw new Error("Interface not declared.");\n
}\n
} catch(error) {\n
defer.reject(error);\n
}\n
return defer.promise;\n
}\n
\n
function verifyAllMethod(interface_method_list, gadget_method_list) {\n
//to verify all methods of gadget and interface.\n
var defer = RSVP.defer();\n
return RSVP.Queue()\n
.push(function() {\n
return verifyAllMethodDeclared(interface_method_list, gadget_method_list[0]);\n
})\n
.push(function() {\n
return verifyAllMethodSignature(interface_method_list, gadget_method_list[1]);\n
})\n
.push (function() {\n
defer.resolve("Success");\n
return defer.promise;\n
}, function(error) {\n
defer.reject(error);\n
return defer.promise;\n
});\n
}\n
\n
function verifyAllMethodDeclared(interface_method_list, gadget_method_list) {\n
//to verify if all the interface methods are declared by the gadget.\n
var defer = RSVP.defer(),\n
gadget_method_name_list = gadget_method_list,\n
interface_method_name_list = [],\n
i, j;\n
for (i = 0; i
< interface_method_list.length
;
i
+=
1)
{\n
interface_method_name_list.push(interface_method_list[i].name);\n
}\n
try
{\n
for
(
j =
0;
j
<
interface_method_name_list.length;
j
+=
1)
{\n
if(gadget_method_name_list.indexOf(interface_method_name_list[j])
<
0)
{\n
throw
new
Error("All
methods
are
not
declared.");\n
}\n
}\n
defer.resolve("Success");\n
}
catch(error)
{\n
defer.reject(error);\n
}\n
return
defer.promise;\n
}\n
\n
function
verifyAllMethodSignature(interface_method_list,
gadget_method_list)
{\n
//to
verify
if
all
the
declared
methods
match
the
signature
of
the
interface
methods.\n
var
defer =
RSVP.defer(),\n
interface_method_dict =
{},\n
gadget_method_name_list =
[],\n
index,\n
item,\n
i,
j;\n
for(
i =
0;
i
<
interface_method_list.length;
i
+=
1)
{\n
interface_method_dict[interface_method_list[i].name]
=
interface_method_list[i];\n
}\n
for(
j =
0;
j
<
gadget_method_list.length;
j
+=
1)
{\n
gadget_method_name_list.push(gadget_method_list[j].name);\n
}\n
try
{\n
for(item
in
interface_method_dict)
{\n
index =
gadget_method_name_list.lastIndexOf(item);\n
if(!verifyMethodSignature(interface_method_dict[item],
gadget_method_list[index]))
{\n
throw
new
Error("All
methods
signature
do
not
match.");\n
}\n
}\n
defer.resolve("Success");\n
}
catch(error)
{\n
defer.reject(error);\n
}\n
return
defer.promise;\n
}\n
\n
function
verifyMethodSignature(interface_method,
gadget_method)
{\n
//to
verify
if
two
methods
have
the
same
signature\n
var
max_arg_len =
interface_method.argument_list.length,\n
min_arg_len =
0,\n
i;\n
if
(max_arg_len)
{\n
var
argument_list =
interface_method.argument_list;\n
for
(
i =
0;
i
<
argument_list.length;
i
+=
1)
{\n
if
(argument_list[i].required)
{\n
min_arg_len
+=
1;\n
}\n
}\n
}\n
return
(gadget_method.arg_len
>
= min_arg_len
&&
gadget_method.arg_len
<
= max_arg_len);\n
}\n
\n
rJS(window)\n
.ready(function (g) {\n
g.props = {};\n
})\n
\n
.declareMethod("getVerifyGadget", function (gadget_url) {\n
var interface_gadget = this;\n
return new RSVP.Queue()\n
.push(function () {\n
return interface_gadget.declareGadget(gadget_url, {\n
scope: gadget_url,\n
element: interface_gadget.__element\n
});\n
})\n
.push(function () {\n
return interface_gadget.getDeclaredGadget(gadget_url);\n
});\n
})\n
\n
.declareMethod("getDeclaredGadgetInterfaceList", function (gadget) {\n
return gadget.getInterfaceList();\n
})\n
\n
.declareMethod("getDeclaredGadgetMethodList", function (gadget) {\n
var declared_method_dict = {},\n
declared_method_list = [],\n
item;\n
for (item in gadget) {\n
if (!(/__/).test(item)) {\n
declared_method_dict[item] = gadget[item];\n
}\n
}\n
for(item in declared_method_dict) {\n
declared_method_list.push(item);\n
} \n
return RSVP.all([\n
declared_method_list,\n
gadget.getDeclaredMethodList()]); \n
})\n
\n
.declareMethod("getAbsoluteURL", function (gadget, url) {\n
return RSVP.Queue()\n
.push(function() {\n
return gadget.getPath(); \n
})\n
.push(function(base_url) {\n
return rJS.getAbsoluteURL(url, base_url);\n
});\n
})\n
\n
.declareMethod("getInterfaceData", function (interface_url) {\n
var interface_data = {\n
name: "",\n
description: "",\n
method_list: []\n
};\n
return RSVP.Queue()\n
.push(function() {\n
return jQuery.get(interface_url);\n
})\n
.push(function(file_data) {\n
var doc = (new DOMParser()).parseFromString(file_data, \'text/html\').body,\n
dl_list = doc.getElementsByTagName(\'dl\'),\n
dt_list = doc.getElementsByTagName(\'dt\'),\n
dd_list = doc.getElementsByTagName(\'dd\'),\n
method_len = dl_list.length - 1,\n
dt_count = 0,\n
dl_count = 1,\n
i;\n
interface_data.name = doc.getElementsByTagName(\'h1\')[0].innerText;\n
interface_data.description = doc.getElementsByTagName(\'h3\')[0].innerText;\n
for (i = 0; i
< method_len
;
i
+=
1)
{\n
var
method =
{\n
name:
dt_list[dt_count].innerText,\n
description:
dd_list[dt_count].innerText,\n
argument_list:
[]\n
},\n
argument_len =
dl_list[dl_count].getElementsByTagName(\'dt\').length,\n
j;\n
dt_count
+=
1;\n
dl_count
+=
1;\n
for
(
j =
0;
j
<
argument_len;
j
+=
1)
{\n
var
argument_item =
{\n
name:
dt_list[dt_count].innerText,\n
description:
dd_list[dt_count].innerText,\n
required:
dt_list[dt_count].getAttribute("data-parameter-required")
===
"optional"
?
false:true,\n
type:
dt_list[dt_count].getAttribute("data-parameter-type")\n
};\n
dt_count
+=
1;\n
method.argument_list.push(argument_item);\n
}\n
interface_data.method_list.push(method);\n
}\n
return
interface_data;\n
});\n
})\n
\n
.declareMethod("getDefinedInterfaceMethodList",
function
(interface_url)
{\n
return
this.getInterfaceData(interface_url)\n
.push(function(interface_data)
{\n
return
interface_data.method_list;\n
});\n
})\n
\n
.declareMethod("verifyGadgetInterfaceImplementation",
function
(gadget_url,
interface_url)
{\n
var
interface_gadget =
this,\n
absolute_interface_url;\n
return
RSVP.Queue()\n
.push(function
()
{\n
if(!gadget_url
||
!interface_url)
{\n
throw
new
Error("Invalid
Inputs");\n
}\n
return
interface_gadget.getVerifyGadget(gadget_url);\n
})\n
.push(function
(gadget)
{\n
return
RSVP.all([
\n
interface_gadget.getDeclaredGadgetInterfaceList(gadget),\n
interface_gadget.getAbsoluteURL(gadget,
interface_url)\n
]);\n
})\n
.push(function
(interface_detail)
{\n
var
declared_interface_list =
interface_detail[0];\n
absolute_interface_url =
interface_detail[1];\n
return
verifyInterfaceDeclaration(absolute_interface_url,
declared_interface_list);\n
})\n
.push(function
()
{\n
return
verifyInterfaceDefinition(absolute_interface_url);\n
})\n
.push(function
()
{\n
return
interface_gadget.getDeclaredGadget(gadget_url);\n
})\n
.push(function
(gadget)
{\n
return
RSVP.all([\n
interface_gadget.getDefinedInterfaceMethodList(absolute_interface_url),\n
interface_gadget.getDeclaredGadgetMethodList(gadget)\n
]);\n
})\n
.push(function(method_list)
{\n
return
verifyAllMethod(method_list[0],
method_list[1]);\n
})\n
.push
(function()
{\n
return
true;\n
},
function(error)
{\n
console.log("Verified
:
Failure",
error.message);\n
return
false;\n
});\n
})\n
\n
.declareMethod("verifyGadgetAllInterfaceImplementation",
function
(gadget_url)
{\n
var
interface_gadget =
this;\n
return
RSVP.Queue()\n
.push(function
()
{\n
if(!gadget_url)
{\n
throw
new
Error("Invalid
Input");\n
}\n
return
interface_gadget.getVerifyGadget(gadget_url);\n
})\n
.push(function
(gadget)
{\n
return
interface_gadget.getDeclaredGadgetInterfaceList(gadget);\n
})\n
.push(function
(declared_interface_list)
{\n
var
interface_url,\n
result_list =
[],\n
item;\n
for
(item
in
declared_interface_list)
{\n
interface_url =
declared_interface_list[item];\n
result_list.push(interface_gadget.verifyGadgetInterfaceImplementation(gadget_url,
interface_url));\n
}\n
return
RSVP.all(result_list);\n
})\n
.push(function(result_list)
{\n
var
item;\n
for(item
in
result_list)
{\n
if
(!result_list[item])
{\n
throw
new
Error("Interface
Implementation
Failure.");\n
}\n
}\n
})\n
.push
(function()
{\n
return
true;\n
},
function(error)
{\n
return
false;\n
});\n
})\n
\n
.declareMethod("verifyGadgetInterfaceListImplementation",
function
(gadget_url,
interface_url_list)
{\n
var
interface_gadget =
this;\n
return
RSVP.Queue()\n
.push(function
()
{\n
if(!gadget_url)
{\n
throw
new
Error("Invalid
Input");\n
}\n
return
interface_gadget.getVerifyGadget(gadget_url);\n
})\n
.push(function
(gadget)
{\n
var
interface_url,\n
result_list =
[],\n
item;\n
for
(item
in
interface_url_list)
{\n
interface_url =
interface_url_list[item];\n
result_list.push(interface_gadget.verifyGadgetInterfaceImplementation(gadget_url,
interface_url));\n
}\n
return
RSVP.all(result_list);\n
})\n
.push(function(result_list)
{\n
var
item;\n
for(item
in
result_list)
{\n
if
(!result_list[item])
{\n
throw
new
Error("Interface
Implementation
Failure.");\n
}\n
}\n
})\n
.push
(function()
{\n
return
true;\n
},
function(error)
{\n
return
false;\n
});\n
});\n
\n
}(window,
rJS,
jQuery,
RSVP,
DOMParser));
]]
></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget Interfaces 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>
zope1
</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>
1436193838.09
</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>
945.2240.5696.46762
</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>
1439472007.41
</float>
<string>
GMT
</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>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</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>
empty
</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>
1436191092.18
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_correct_implemented_gadget_html.xml
0 → 100644
View file @
4a01ef56
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
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>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
interface_test_correct_implemented_gadget.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interface_test_correct_implemented_gadget_html
</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 Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<!DOCTYPE html>
\n
<html>
\n
<head>
\n
<meta
charset=
"utf-8"
/>
\n
<title>
Test Gadget
</title>
\n
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
\n
\n
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"demo_interface1.html"
>
\n
\n
<!-- renderjs -->
\n
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
\n
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
\n
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
\n
<script
src=
"jquery.js"
type=
"text/javascript"
></script>
\n
\n
<!-- custom script -->
\n
<script
src=
"interface_test_correct_implemented_gadget.js"
type=
"text/javascript"
></script>
\n
</head>
\n
<body>
</body>
\n
</html>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Correct Implemented Test Gadget
</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>
zope1
</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>
1437492981.82
</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>
944.37533.56469.39680
</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>
1437658341.95
</float>
<string>
GMT
</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>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</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>
empty
</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>
1437492348.74
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_correct_implemented_gadget_js.xml
0 → 100644
View file @
4a01ef56
<?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>
interface_test_correct_implemented_gadget.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interface_test_correct_implemented_gadget_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>
text_content
</string>
</key>
<value>
<string>
/*global window, rJS, RSVP */\n
/*jslint nomen: true, indent: 2, maxerr: 3 */\n
(function (window, rJS) {\n
"use strict";\n
\n
rJS(window)\n
.ready(function (g) {\n
g.props = {};\n
})\n
\n
.declareMethod("method1", function (param1, param2) {\n
return;\n
})\n
.declareMethod("method2", function (param1) {\n
return;\n
})\n
.declareMethod("method3", function () {\n
return;\n
})\n
.declareMethod("setEditor", function (param1, param2, param3) {\n
return;\n
});\n
\n
}(window, rJS));
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Correct Implemented Test Gadget 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>
zope1
</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>
1437492985.09
</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>
944.37533.46344.53879
</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>
1439467825.02
</float>
<string>
GMT
</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>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</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>
empty
</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>
1437492774.47
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_multiple_interface_correct_gadget_html.xml
0 → 100644
View file @
4a01ef56
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
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>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
interface_test_multiple_interface_correct_gadget.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interface_test_multiple_interface_correct_gadget_html
</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 Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<!DOCTYPE html>
\n
<html>
\n
<head>
\n
<meta
charset=
"utf-8"
/>
\n
<title>
Test Gadget
</title>
\n
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
\n
\n
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"demo_interface1.html"
>
\n
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"demo_interface2.html"
>
\n
\n
<!-- renderjs -->
\n
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
\n
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
\n
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
\n
<script
src=
"jquery.js"
type=
"text/javascript"
></script>
\n
\n
<!-- custom script -->
\n
<script
src=
"interface_test_multiple_interface_correct_gadget.js"
type=
"text/javascript"
></script>
\n
</head>
\n
<body>
</body>
\n
</html>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Multiple Interfaces Correct Implemented Test Gadget
</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>
zope1
</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>
1436977227.21
</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>
944.37655.14678.64614
</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>
1437664771.46
</float>
<string>
GMT
</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>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</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>
empty
</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>
1436974282.2
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_multiple_interface_correct_gadget_js.xml
0 → 100644
View file @
4a01ef56
<?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>
interface_test_multiple_interface_correct_gadget.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interface_test_multiple_interface_correct_gadget_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>
text_content
</string>
</key>
<value>
<string>
/*global window, rJS, RSVP */\n
/*jslint nomen: true, indent: 2, maxerr: 3 */\n
(function (window, rJS, Handlebars, $, jQuery, RSVP) {\n
"use strict";\n
\n
rJS(window)\n
.ready(function (g) {\n
g.props = {};\n
})\n
\n
.declareMethod("method1", function (param1, param2) {\n
return;\n
})\n
.declareMethod("method2", function (param1) {\n
return;\n
})\n
.declareMethod("method3", function () {\n
return;\n
})\n
.declareMethod("testmethod1", function () {\n
return;\n
})\n
.declareMethod("testmethod2", function (param1) {\n
return;\n
})\n
.declareMethod("testmethod3", function (param1, param2) {\n
return;\n
})\n
.declareMethod("setEditor", function (param1, param2, param3) {\n
return;\n
});\n
\n
}(window, rJS, Handlebars, $, jQuery, RSVP));
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Multiple Interfaces Correct Implemented Test Gadget 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>
zope1
</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>
1436977235.46
</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>
944.37678.2686.43349
</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>
1439468021.82
</float>
<string>
GMT
</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>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</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>
empty
</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>
1436973624.78
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_editor_demo/bt/template_keep_last_workflow_history_only_path_list
View file @
4a01ef56
web_page_module/editor*
web_page_module/interface_gadget_interfaces*
web_page_module/interface_test_correct_implemented_gadget*
web_page_module/interface_test_multiple_interface_correct_gadget*
web_site_module/editor_demo
web_site_module/editor_demo/**
\ No newline at end of file
bt5/erp5_web_editor_demo/bt/template_keep_workflow_path_list
View file @
4a01ef56
web_page_module/editor*
web_page_module/interface_gadget_interfaces*
web_page_module/interface_test_correct_implemented_gadget*
web_page_module/interface_test_multiple_interface_correct_gadget*
web_site_module/editor_demo
web_site_module/editor_demo/**
\ No newline at end of file
bt5/erp5_web_editor_demo/bt/template_path_list
View file @
4a01ef56
web_page_module/editor*
web_page_module/interface_gadget_interfaces*
web_page_module/interface_test_correct_implemented_gadget*
web_page_module/interface_test_multiple_interface_correct_gadget*
web_site_module/editor_demo
web_site_module/editor_demo/**
\ No newline at end of file
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