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
Aaron Chen
erp5
Commits
0533c55c
Commit
0533c55c
authored
Aug 13, 2015
by
Vivek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
a9885b4a
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2739 additions
and
108 deletions
+2739
-108
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
+19
-21
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_js.xml
...athTemplateItem/web_page_module/editor_test_gadget_js.xml
+127
-37
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 @
0533c55c
...
@@ -105,40 +105,32 @@
...
@@ -105,40 +105,32 @@
<key>
<string>
text_content
</string>
</key>
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
\n
<!DOCTYPE html>
\n
<!DOCTYPE html>
\n
<html>
\n
<html>
\n
<head>
\n
<head>
\n
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=Edge"
>
\n
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=Edge"
>
\n
<meta
charset=
"utf-8"
>
\n
<meta
charset=
"utf-8"
>
\n
\n
<title>
bootstrap-wysihtml5
</title>
\n
\n
\n
\n
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
></link>
\n
<title>
bootstrap-wysihtml5
</title>
\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
\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
\n
</head>
\n
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"editor_interface.html"
>
\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
\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
\n
<script
src=
"wysihtml5x-toolbar.min.js"
></script>
\n
</head>
\n
<script
src=
"jquery.js"
></script>
\n
<body></body>
\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
</html>
\n
</html>
\n
...
@@ -277,7 +269,7 @@
...
@@ -277,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -295,7 +287,7 @@
...
@@ -295,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
143
8777350.44
</float>
<float>
143
9468941.87
</float>
<string>
GMT
</string>
<string>
GMT
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_bootstrap_wysiwyg_html.xml
View file @
0533c55c
...
@@ -110,19 +110,21 @@
...
@@ -110,19 +110,21 @@
<html
lang=
"en"
>
\n
<html
lang=
"en"
>
\n
<head>
\n
<head>
\n
<meta
charset=
"utf-8"
>
\n
<meta
charset=
"utf-8"
>
\n
<title>
title
</title>
\n
<title>
bootstrap-wysiwhg
</title>
\n
\n
\n
<link
rel=
"stylesheet"
href=
"bootstrap-combined.no-icons.min.css"
>
\n
<link
rel=
"stylesheet"
href=
"bootstrap-combined.no-icons.min.css"
>
\n
<link
rel=
"stylesheet"
href=
"bootstrap-responsive.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
<link
rel=
"stylesheet"
href=
"https://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css"
>
\n
\n
\n
<script
src=
"jquery.js"
></script>
\n
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"editor_interface.html"
>
\n
<script
src=
"jquery.hotkeys.js"
></script>
\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.min.js"
></script>
\n
<script
src=
"bootstrap-wysiwyg.js"
></script>
\n
<script
src=
"bootstrap-wysiwyg.js"
></script>
\n
<script
src=
"rsvp.js"
></script>
\n
<script
src=
"rsvp.js"
></script>
\n
<script
src=
"renderjs.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
\n
</head>
\n
</head>
\n
<body>
\n
<body>
\n
...
@@ -333,7 +335,7 @@
...
@@ -333,7 +335,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -351,7 +353,7 @@
...
@@ -351,7 +353,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
143
8615893.56
</float>
<float>
143
9467063.04
</float>
<string>
GMT
</string>
<string>
GMT
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_gadget_bootstrap3-wysiwyg.js.xml
View file @
0533c55c
...
@@ -99,7 +99,9 @@
...
@@ -99,7 +99,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
text_content
</string>
</key>
<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
/*global window, jQuery, rJS*/\n
"use strict";\n
"use strict";\n
\n
\n
...
@@ -115,16 +117,26 @@
...
@@ -115,16 +117,26 @@
.declareMethod(\'clearContent\', function () {\n
.declareMethod(\'clearContent\', function () {\n
rJS(this).editor.html(\'\');\n
rJS(this).editor.html(\'\');\n
})\n
})\n
.ready(function (g) {\n
.declareMethod(\'setEditor\', function () {\n
g.editor = $(\'.textarea\');\n
document.body.innerHTML =\'<div class="container" style=" width: 100%; height: 600px;">
\'\n
g.editor.wysihtml5({\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
toolbar: {\n
fa: true\n
fa: true\n
}\n
}\n
});\n
});\n
})\n
\n
.ready(function (g) {\n
});\n
});\n
\n
\n
}(window, jQuery, rJS));
</string>
</value>
}(window, jQuery, rJS));
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
@@ -259,7 +271,7 @@
...
@@ -259,7 +271,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -277,7 +289,7 @@
...
@@ -277,7 +289,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
143
8777746.45
</float>
<float>
143
9471143.4
</float>
<string>
GMT
</string>
<string>
GMT
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_gadget_bootstrap_wysiwyg_js.xml
View file @
0533c55c
...
@@ -157,12 +157,14 @@
...
@@ -157,12 +157,14 @@
.declareMethod(\'clearContent\', function () {\n
.declareMethod(\'clearContent\', function () {\n
rJS(this).editor.html(\'\');\n
rJS(this).editor.html(\'\');\n
})\n
})\n
.ready(function (g) {\n
.declareMethod(\'setEditor\', function () {\n
g.editor = $(\'#editor\');\n
initToolbarBootstrapBindings();\n
initToolbarBootstrapBindings();\n
g
.editor.wysiwyg({\n
this
.editor.wysiwyg({\n
fileUploadError: showErrorAlert\n
fileUploadError: showErrorAlert\n
});\n
});\n
})\n
.ready(function (g) {\n
g.editor = $(\'#editor\');\n
});\n
});\n
\n
\n
}(window, jQuery, rJS));
}(window, jQuery, rJS));
...
@@ -302,7 +304,7 @@
...
@@ -302,7 +304,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
944.
53151.60155.61457
</string>
</value>
<value>
<string>
944.
63600.63717.14984
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -320,7 +322,7 @@
...
@@ -320,7 +322,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
143
8594704.78
</float>
<float>
143
9467049.96
</float>
<string>
GMT
</string>
<string>
GMT
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_interface_html.xml
View file @
0533c55c
...
@@ -112,7 +112,21 @@
...
@@ -112,7 +112,21 @@
<body>
\n
<body>
\n
<h1>
Editor Interface
</h1>
\n
<h1>
Editor Interface
</h1>
\n
<h3>
An interface defining the methods for text editor.
</h3>
\n
<h3>
An interface defining the methods for text editor.
</h3>
\n
<dl>
\n
<dt>
getContent
</dt>
\n
<dd>
to fetch the contect from the text editor
</dd>
\n
<dl></dl>
\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
</body>
\n
</html>
</html>
...
@@ -251,7 +265,7 @@
...
@@ -251,7 +265,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
944.
48991.52289.15735
</string>
</value>
<value>
<string>
944.
53144.2367.52957
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -269,7 +283,7 @@
...
@@ -269,7 +283,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
143
8345024.7
</float>
<float>
143
9192630.9
</float>
<string>
GMT
</string>
<string>
GMT
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_html.xml
View file @
0533c55c
...
@@ -105,7 +105,6 @@
...
@@ -105,7 +105,6 @@
<key>
<string>
text_content
</string>
</key>
<key>
<string>
text_content
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
\n
<!DOCTYPE html>
\n
<!DOCTYPE html>
\n
<html>
\n
<html>
\n
<head>
\n
<head>
\n
...
@@ -121,46 +120,45 @@
...
@@ -121,46 +120,45 @@
<script
type=
"text/javascript"
src=
"jquery.js"
></script>
\n
<script
type=
"text/javascript"
src=
"jquery.js"
></script>
\n
<script
type=
"text/javascript"
src=
"rsvp.js"
></script>
\n
<script
type=
"text/javascript"
src=
"rsvp.js"
></script>
\n
<script
type=
"text/javascript"
src=
"renderjs.js"
></script>
\n
<script
type=
"text/javascript"
src=
"renderjs.js"
></script>
\n
<script
type=
"text/javascript"
src=
"handlebars.js"
></script>
\n
<script
src=
"gadget_global.js"
></script>
\n
<script
type=
"text/javascript"
src=
"gadget_global.js"
></script>
\n
<script
type=
"text/javascript"
src=
"jquerymobile.js"
></script>
\n
<script
type=
"text/javascript"
src=
"jquerymobile.js"
></script>
\n
<script
type=
"text/javascript"
src=
"i18next.js"
></script>
\n
<script
type=
"text/javascript"
src=
"i18next.js"
></script>
\n
\n
\n
<!-- specific script -->
\n
<!-- specific script -->
\n
<script
type=
"text/javascript"
src=
"editor_test_gadget.js"
></script>
\n
<script
type=
"text/javascript"
src=
"editor_test_gadget.js"
></script>
\n
\n
\n
<script
class=
"sub-gadget-template"
type=
"text/x-handlebars-template"
>
\n
</head>
\n
<body>
\n
<div
data-role=
"page"
class=
"ui-content gadget-content"
>
\n
<div
class=
"ui-grid-a ui-responsive"
>
\n
<div
class=
"ui-grid-a ui-responsive"
>
\n
<div
class=
"ui-block-a"
style=
"width:60%"
>
\n
<div
class=
"ui-block-a"
style=
"width:60%"
>
\n
<div
class=
"ui-content"
></div>
\n
<div
class=
"ui-content"
></div>
\n
</div>
\n
</div>
\n
<div
class=
"ui-block-b"
style=
"width:30%"
>
\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
<div
data-role=
"fieldcontain"
>
\n
<label
for=
"gadget_selector"
>
Main Gadget
</label>
\n
<label
for=
"main_gadget_selector"
>
Main Gadget
</label>
\n
<select
name=
"gadget_selector"
class=
"select"
>
\n
<select
name=
"main_gadget_selector"
class=
"select"
>
\n
<option
value=
"./bootstrap-wysiwyg.html"
>
Text Editor 1
</option>
\n
<option
value=
"./bootstrap3-wysiwyg.html"
>
Text Editor 2
</option>
\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
</select>
\n
</div>
\n
</div>
\n
<input
data-inline=
"true"
type=
"submit"
value=
"Submit"
data-theme=
"b"
>
\n
<input
data-inline=
"true"
type=
"submit"
value=
"Submit"
data-theme=
"b"
>
\n
</form>
\n
</form>
\n
<form
class=
"similar-gadget-select-form"
>
\n
<div
data-role=
"fieldcontain"
>
\n
<label
for=
"similar_gadget_selector"
>
Similar Gadgets
</label>
\n
<select
name=
"similar_gadget_selector"
class=
"select"
>
\n
</select>
\n
</div>
\n
</div>
\n
<input
data-inline=
"true"
type=
"submit"
value=
"Submit"
data-theme=
"b"
>
\n
</form>
\n
</div>
\n
</div>
\n
</script>
\n
</head>
\n
\n
<body>
\n
<div
data-role=
"page"
>
\n
<div
data-role=
"header"
data-position=
"fixed"
class=
"gadget-header"
data-theme=
"b"
>
\n
<h1></h1>
\n
</div>
\n
</div>
\n
<div
role=
"main"
class=
"ui-content gadget-content"
></div>
\n
</div>
\n
</div>
\n
</body>
\n
</body>
\n
\n
</html>
\n
</html>
\n
\n
]]>
</string>
</value>
]]>
</string>
</value>
...
@@ -298,7 +296,7 @@
...
@@ -298,7 +296,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
4.57834.1936.52684
</string>
</value>
<value>
<string>
94
5.2226.34067.16605
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -316,7 +314,7 @@
...
@@ -316,7 +314,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
143
8875522.58
</float>
<float>
143
9471929.19
</float>
<string>
GMT
</string>
<string>
GMT
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_js.xml
View file @
0533c55c
...
@@ -99,48 +99,131 @@
...
@@ -99,48 +99,131 @@
</item>
</item>
<item>
<item>
<key>
<string>
text_content
</string>
</key>
<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
/*global console, window, document, rJS, RSVP, $ */\n
(function (window, document, rJS,
Handlebars,
promiseEventListener) {\n
(function (window, document, rJS, promiseEventListener) {\n
"use strict";\n
"use strict";\n
\n
\n
var DEFAULT_EDITOR_GADGET = "./bootstrap-wysiwyg.html";\n
var DEFAULT_GADGET_URL = "./bootstrap3-wysiwyg.html",\n
INTERFACE_GADGET_URL = "./gadget_interfaces.html";\n
\n
\n
function declareEditorGadget(gadget, editor_g) {\n
function declareInterfaceGadget(gadget) {\n
console.log("inside declareEditorGadget");\n
return gadget.declareGadget(INTERFACE_GADGET_URL, {\n
return gadget.declareGadget(editor_g, {\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
sandbox: \'iframe\',\n
element: document.body.querySelector("[data-role=page]"),\n
element: gadget.props.content_element.querySelector("div.ui-content"),\n
scope: "editor"\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
}\n
}\n
function gadgetSwitchHandler(gadget) {\n
function gadgetSwitchHandler(gadget) {\n
console.log("Listening");\n
return new RSVP.Queue()\n
return new RSVP.Queue()\n
.push(function() {\n
.push(function() {\n
gadget.props.content_element.innerHTML =\n
return RSVP.any([\n
gadget.props.sub_gadget_template({});\n
promiseEventListener(\n
return promiseEventListener(\n
gadget.props.content_element.querySelector(\'form.main-gadget-select-form\'),\n
gadget.props.content_element.querySelector(\'form.gadget-select-form\'),\n
\'submit\',\n
false\n
),\n
promiseEventListener(\n
gadget.props.content_element.querySelector(\'form.similar-gadget-select-form\'),\n
\'submit\',\n
\'submit\',\n
false\n
false\n
);\n
)\n
]);\n
})\n
})\n
.push(function(submit_event) {\n
.push(function(submit_event) {\n
console.log("submit_event",submit_event)
;\n
var submit_source = submit_event.target.className
;\n
gadget.props.content_element.querySelector("input[type=submit]")\n
gadget.props.content_element.querySelector("input[type=submit]")\n
.disabled = true;\n
.disabled = true;\n
gadget.props.content_element.querySelector("div.ui-content").innerHTML = "";\n
gadget.props.content_element.querySelector("div.ui-content").innerHTML = "";\n
console.log("Selected:", submit_event.target[0].value);\n
if(submit_source === \'main-gadget-select-form\') {\n
return declareEditorGadget(gadget,submit_event.target[0].value);\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
})\n
.push(function(){\n
.push(function(){\n
console.log("Calling self again");\n
gadget.props.content_element.querySelector("input[type=submit]")\n
gadget.props.content_element.querySelector("input[type=submit]")\n
.disabled = false;\n
.disabled = false;\n
return gadgetSwitchHandler(gadget);\n
return gadgetSwitchHandler(gadget);\n
});\n
});\n
\n
}\n
}\n
\n
\n
// block JQM auto-start\n
// block JQM auto-start\n
...
@@ -152,54 +235,61 @@
...
@@ -152,54 +235,61 @@
rJS(window)\n
rJS(window)\n
\n
\n
.ready(function (g) {\n
.ready(function (g) {\n
console.log("test gadget ready");\n
g.props = {};\n
g.props = {};\n
return g.getElement()\n
return g.getElement()\n
.push(function (element) {\n
.push(function (element) {\n
$(element).trigger("create");\n
$(element).trigger("create");\n
g.props.element = element;\n
g.props.element = element;\n
g.props.header_element = element.querySelector(\'.gadget-header\');\n
g.props.content_element = element.querySelector(\'.gadget-content\');\n
g.props.content_element = element.querySelector(\'.gadget-content\');\n
g.props.sub_gadget_template = Handlebars.compile(\n
document.querySelector(".sub-gadget-template").innerHTML\n
);\n
});\n
});\n
})\n
})\n
\n
.declareMethod(\'render\', function () {\n
.declareMethod(\'render\', function () {\n
var gadget = this;\n
var gadget = this;\n
\n
return new RSVP.Queue()\n
return new RSVP.Queue()\n
.push(function() {\n
.push(function() {\n
console.log("default gadget");\n
return declareInterfaceGadget(gadget, DEFAULT_GADGET_URL);\n
return declareEditorGadget(gadget, DEFAULT_EDITOR_GADGET);\n
})\n
.push(function() {\n
return declareSubGadget(gadget, DEFAULT_GADGET_URL);\n
})\n
.push(function() {\n
return gadget.editor_setEditor();\n
})\n
})\n
.push(function(){\n
.push(function(){\n
return gadgetSwitchHandler(gadget);\n
return gadgetSwitchHandler(gadget);\n
});\n
});\n
\n
})\n
})\n
\n
\n
/* ============================ EDITOR =============================== */\n
/* ============================ EDITOR =============================== */\n
.declareMethod("editor_getContent", function (param_list) {\n
.declareMethod("editor_getContent", function (param_list) {\n
return this.getDeclaredGadget("
editor
")\n
return this.getDeclaredGadget("
sub_gadget
")\n
.then(function (editor) {\n
.then(function (editor) {\n
return editor.getContent.apply(editor, param_list);\n
return editor.getContent.apply(editor, param_list);\n
});\n
});\n
})\n
})\n
.declareMethod("editor_setContent", function (param_list) {\n
.declareMethod("editor_setContent", function (param_list) {\n
return this.getDeclaredGadget("
editor
")\n
return this.getDeclaredGadget("
sub_gadget
")\n
.then(function (editor) {\n
.then(function (editor) {\n
return editor.setContent.apply(editor, param_list);\n
return editor.setContent.apply(editor, param_list);\n
});\n
});\n
})\n
})\n
.declareMethod("editor_clearContent", function (param_list) {\n
.declareMethod("editor_clearContent", function (param_list) {\n
return this.getDeclaredGadget("
editor
")\n
return this.getDeclaredGadget("
sub_gadget
")\n
.then(function (editor) {\n
.then(function (editor) {\n
return editor.clearContent.apply(editor, param_list);\n
return editor.clearContent.apply(editor, param_list);\n
});\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
\n
\n
}(window, document, rJS, Handlebars, promiseEventListener));
</string>
</value>
}(window, document, rJS, promiseEventListener));
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
@@ -334,7 +424,7 @@
...
@@ -334,7 +424,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
4.57850.5818.195
41
</string>
</value>
<value>
<string>
94
5.2225.65299.394
41
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -352,7 +442,7 @@
...
@@ -352,7 +442,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
143
8876472.39
</float>
<float>
143
9471855.78
</float>
<string>
GMT
</string>
<string>
GMT
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_gadget_interfaces_html.xml
0 → 100644
View file @
0533c55c
This diff is collapsed.
Click to expand it.
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_gadget_interfaces_js.xml
0 → 100644
View file @
0533c55c
This diff is collapsed.
Click to expand it.
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_correct_implemented_gadget_html.xml
0 → 100644
View file @
0533c55c
This diff is collapsed.
Click to expand it.
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_correct_implemented_gadget_js.xml
0 → 100644
View file @
0533c55c
This diff is collapsed.
Click to expand it.
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_multiple_interface_correct_gadget_html.xml
0 → 100644
View file @
0533c55c
This diff is collapsed.
Click to expand it.
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/interface_test_multiple_interface_correct_gadget_js.xml
0 → 100644
View file @
0533c55c
This diff is collapsed.
Click to expand it.
bt5/erp5_web_editor_demo/bt/template_keep_last_workflow_history_only_path_list
View file @
0533c55c
web_page_module/editor*
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
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 @
0533c55c
web_page_module/editor*
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
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 @
0533c55c
web_page_module/editor*
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
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