Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian
erp5
Commits
2e007394
Commit
2e007394
authored
Aug 06, 2015
by
Vivek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renderjs_interfaces: two text editors rendered from one gadget.
parent
2122a688
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
394 additions
and
50 deletions
+394
-50
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_bootstrap3_wysiwyg_html.xml
...teItem/web_page_module/editor_bootstrap3_wysiwyg_html.xml
+9
-15
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
+351
-0
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_html.xml
...hTemplateItem/web_page_module/editor_test_gadget_html.xml
+18
-4
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_js.xml
...athTemplateItem/web_page_module/editor_test_gadget_js.xml
+16
-31
No files found.
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_bootstrap3_wysiwyg_html.xml
View file @
2e007394
...
...
@@ -123,9 +123,9 @@
\n
</head>
\n
<body>
\n
<div
class=
"container"
style=
"
margin: 10px; padding: 4px; width: 1858px
; height: 600px;"
>
\n
<div
class=
"jumbotron"
style=
"margin-left:0px"
>
\n
<textarea
class=
"textarea"
placeholder=
"Enter text ..."
style=
"width: 100%; height:
2
00px; font-size: 14px; line-height: 18px;"
></textarea>
\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:
4
00px; font-size: 14px; line-height: 18px;"
></textarea>
\n
</div>
\n
</div>
\n
\n
...
...
@@ -135,15 +135,9 @@
<script
src=
"bootstrap.min.js"
></script>
\n
<script
src=
"handlebars.runtime.min.js"
></script>
\n
<script
src=
"bootstrap3-wysihtml5.min.js"
></script>
\n
\n
<script>
\n
$(\'.textarea\').wysihtml5({\n
toolbar: {\n
fa: true\n
}\n
});\n
</script>
\n
\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
...
...
@@ -269,7 +263,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
1
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -283,7 +277,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
944.5
4809.19650.59255
</string>
</value>
<value>
<string>
944.5
6196.65369.51899
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -301,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>
1438
694025.97
</float>
<float>
1438
777350.44
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_gadget_bootstrap3-wysiwyg.js.xml
0 → 100644
View file @
2e007394
This diff is collapsed.
Click to expand it.
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_html.xml
View file @
2e007394
...
...
@@ -130,8 +130,22 @@
</head>
\n
<body>
\n
<div
data-role=
"page"
id=
"document"
>
\n
<div
class=
"ui-content"
>
\n
</div>
\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
<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
</select>
\n
</div>
\n
</form>
\n
</div>
\n
</div>
\n
</div>
\n
</body>
\n
</html>
\n
...
...
@@ -273,7 +287,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
944.5
3477.50307.41949
</string>
</value>
<value>
<string>
944.5
6298.5921.30532
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -291,7 +305,7 @@
</tuple>
<state>
<tuple>
<float>
1438
615471.6
6
</float>
<float>
1438
783361.3
6
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_editor_demo/PathTemplateItem/web_page_module/editor_test_gadget_js.xml
View file @
2e007394
...
...
@@ -104,8 +104,8 @@
(function (window, document, rJS) {\n
"use strict";\n
\n
var EDITOR_GADGET = "./bootstrap-wysiwyg.html";\n
// var EDITOR_GADGET
= "./bootstrap3-wysiwyg.html";\n
var EDITOR_GADGET
_1
= "./bootstrap-wysiwyg.html";\n
var EDITOR_GADGET_2
= "./bootstrap3-wysiwyg.html";\n
// block JQM auto-start\n
$(document)\n
.on("mobileinit", function () {\n
...
...
@@ -115,8 +115,6 @@
rJS(window)\n
\n
.ready(function (g) {\n
g.state_parameter_dict = {};\n
console.log("calling render");\n
})\n
\n
.declareMethod(\'render\', function () {\n
...
...
@@ -124,40 +122,27 @@
\n
gadget = this;\n
page_list = document.body.querySelectorAll("[data-role=page]");\n
console.log("page_list", page_list);\n
page = page_list[page_list.length - 1];\n
console.log("page", page);\n
\n
// helper: declare edtior\n
function declareEditorGadget() {\n
return gadget.declareGadget(
EDITOR_GADGET
, {\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
// helper: set Editor Gadget\n
function setEditorGadget() {\n
var iframe, editor;\n
\n
iframe = gadget.__element.getElementsByTagName("IFRAME")[0];\n
editor = iframe.contentDocument.getElementById("editor");\n
editor.style.overflow = "auto";\n
return gadget.editor_setContent(gadget.state_parameter_dict.temp);\n
}\n
\n
// helper: run chain - separate method to make the chain callable\n
function runChain() {\n
return new RSVP.Queue()\n
.push(function() {\n
return declareEditorGadget(this);\n
});\n
\n
}\n
return new RSVP.Queue()\n
.push(function() {\n
console.log("first gadget");\n
return declareEditorGadget(EDITOR_GADGET_1);\n
})\n
.push(function(){\n
page.querySelector("div.ui-content").innerHTML = "";\n
return declareEditorGadget(EDITOR_GADGET_2);\n
});\n
\n
// START: fetch document\n
return runChain(); \n
})\n
\n
/* ============================ EDITOR =============================== */\n
...
...
@@ -301,7 +286,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
1
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -315,7 +300,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
944.5
4775.35271.2508
</string>
</value>
<value>
<string>
944.5
6235.17061.26624
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -333,7 +318,7 @@
</tuple>
<state>
<tuple>
<float>
1438
693295.63
</float>
<float>
1438
780043.78
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment