Commit de0e1002 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_office: update/fix Text editor application

parent 1d40ec1a
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1000.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/WebIllustration_viewAsJio</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1000.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/WebPage_viewAsJio</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
\n \n
</head>\n </head>\n
<body>\n <body>\n
<div class="ckeditor_gadget"><textarea name="text_content"></textarea></div>\n <div class="ckeditor_gadget"><textarea></textarea></div>\n
</body>\n </body>\n
</html>\n </html>\n
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.11034.42442.12066</string> </value> <value> <string>945.18348.39523.50449</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1440438516.13</float> <float>1441297895.5</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -113,9 +113,31 @@ ...@@ -113,9 +113,31 @@
.push(function (element) {\n .push(function (element) {\n
var textarea = element.querySelector(\'textarea\');\n var textarea = element.querySelector(\'textarea\');\n
g.props.element = element;\n g.props.element = element;\n
g.props.ckeditor = CKEDITOR.replace(textarea);\n g.props.ckeditor = CKEDITOR.replace(\n
textarea,\n
{\n
removeButtons: \'NewPage,Preview\',\n
removePluggins: \'\'\n
}\n
);\n
g.props.ckeditor.addCommand(\'saveRJS\', {\n
readOnly: 1,\n
exec: function () {\n
return g.submitContent();\n
}\n
});\n
g.props.ckeditor.ui.addButton(\'Save\', {\n
label: "Save",\n
command: \'saveRJS\',\n
toolbar: \'document,1\'\n
});\n
g.props.ckeditor.on(\'maximize\', function () {\n
return g.maximize();\n
});\n
});\n });\n
})\n })\n
.declareAcquiredMethod("submitContent", "triggerSubmit")\n
.declareAcquiredMethod("maximize", "triggerMaximize")\n
.declareMethod(\'render\', function (options) {\n .declareMethod(\'render\', function (options) {\n
this.props.key = options.key || "text_content";\n this.props.key = options.key || "text_content";\n
this.props.ckeditor.setData(options.value || "");\n this.props.ckeditor.setData(options.value || "");\n
...@@ -263,7 +285,7 @@ ...@@ -263,7 +285,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.18348.32782.27238</string> </value> <value> <string>945.34034.51991.273</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -281,7 +303,7 @@ ...@@ -281,7 +303,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1440438538.83</float> <float>1441379761.67</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
/*globals window, rJS, Handlebars, RSVP, loopEventListener*/\n /*globals window, rJS, Handlebars, RSVP, loopEventListener, console*/\n
/*jslint indent: 2, nomen: true, maxlen: 80*/\n /*jslint indent: 2, nomen: true, maxlen: 80*/\n
(function (window, RSVP, rJS, Handlebars, loopEventListener) {\n (function (window, RSVP, rJS, Handlebars, loopEventListener) {\n
"use strict";\n "use strict";\n
...@@ -113,7 +113,6 @@ ...@@ -113,7 +113,6 @@
doc = gadget.options.doc;\n doc = gadget.options.doc;\n
doc.parent_relative_url = "web_page_module";\n doc.parent_relative_url = "web_page_module";\n
doc.portal_type = "Web Page";\n doc.portal_type = "Web Page";\n
\n
for (i = 0; i < submit_event.target.length; i += 1) {\n for (i = 0; i < submit_event.target.length; i += 1) {\n
// XXX Should check input type instead\n // XXX Should check input type instead\n
if (submit_event.target[i].name) {\n if (submit_event.target[i].name) {\n
...@@ -133,6 +132,22 @@ ...@@ -133,6 +132,22 @@
});\n });\n
}\n }\n
\n \n
function maximize(gadget) {\n
var iframe = gadget.props.element.querySelector(\'iframe\'),\n
iframe_class_string = iframe.getAttribute(\'class\') || "",\n
class_name = "ui-content-maximize",\n
class_index = iframe_class_string.indexOf(class_name);\n
if (class_index === -1) {\n
iframe_class_string += \' \' + class_name;\n
iframe.setAttribute(\'style\', \'\');\n
} else {\n
iframe_class_string = iframe_class_string.substring(0, class_index)\n
+ iframe_class_string.substring(class_index + class_name.length);\n
iframe.setAttribute(\'style\', \'width:100%; border: 0 none; height: 600px\');\n
}\n
iframe.setAttribute(\'class\', iframe_class_string);\n
return true;\n
}\n
\n \n
var gadget_klass = rJS(window),\n var gadget_klass = rJS(window),\n
source = gadget_klass.__template_element\n source = gadget_klass.__template_element\n
...@@ -158,6 +173,21 @@ ...@@ -158,6 +173,21 @@
.declareAcquiredMethod("put", "jio_put")\n .declareAcquiredMethod("put", "jio_put")\n
.declareAcquiredMethod(\'allDocs\', \'jio_allDocs\')\n .declareAcquiredMethod(\'allDocs\', \'jio_allDocs\')\n
.declareAcquiredMethod("redirect", "redirect")\n .declareAcquiredMethod("redirect", "redirect")\n
\n
.allowPublicAcquisition(\'triggerSubmit\', function () {\n
return this.props.element.querySelector(\'button\').click();\n
})\n
\n
.allowPublicAcquisition(\'triggerMaximize\', function () {\n
var gadget = this;\n
return RSVP.Queue()\n
.push(function () {\n
return maximize(gadget);\n
})\n
.fail(function (e) {\n
console.log(e);\n
});\n
})\n
\n \n
.declareMethod("render", function (options) {\n .declareMethod("render", function (options) {\n
var gadget = this;\n var gadget = this;\n
...@@ -173,7 +203,7 @@ ...@@ -173,7 +203,7 @@
});\n });\n
})\n })\n
.push(function () {\n .push(function () {\n
gadget.props.deferred.resolve();\n return gadget.props.deferred.resolve();\n
});\n });\n
})\n })\n
\n \n
...@@ -199,12 +229,11 @@ ...@@ -199,12 +229,11 @@
);\n );\n
})\n })\n
.push(function (text_content_gadget) {\n .push(function (text_content_gadget) {\n
var iframe = gadget.props.element.querySelector(\n var iframe = gadget.props.element.querySelector(\'iframe\');\n
".document-content iframe"\n iframe.setAttribute(\n
\'style\',\n
\'width:100%; border: 0 none; height: 600px\'\n
);\n );\n
iframe.width = "100%";\n
iframe.height = "600px";\n
iframe.setAttribute("style", "border:none;");\n
text_gadget = text_content_gadget;\n text_gadget = text_content_gadget;\n
return text_content_gadget.render({\n return text_content_gadget.render({\n
"key": \'text_content\',\n "key": \'text_content\',\n
...@@ -377,7 +406,7 @@ ...@@ -377,7 +406,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.18345.52582.54988</string> </value> <value> <string>945.34033.23091.48896</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -395,7 +424,7 @@ ...@@ -395,7 +424,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1440438395.31</float> <float>1441379636.83</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -373,7 +373,7 @@ ...@@ -373,7 +373,7 @@
</item> </item>
<item> <item>
<key> <string>skin_selection_name</string> </key> <key> <string>skin_selection_name</string> </key>
<value> <string>RJS</string> </value> <value> <string>RJSUnsafe</string> </value>
</item> </item>
<item> <item>
<key> <string>static_language_selection</string> </key> <key> <string>static_language_selection</string> </key>
...@@ -616,7 +616,7 @@ ...@@ -616,7 +616,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.12191.62491.52667</string> </value> <value> <string>945.18320.46785.6894</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -634,7 +634,7 @@ ...@@ -634,7 +634,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1440436842.79</float> <float>1441126272.93</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -108,12 +108,6 @@ ...@@ -108,12 +108,6 @@
</dictionary> </dictionary>
</value> </value>
</item> </item>
<item>
<key> <string>__translation_dict</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>_identity_criterion</string> </key> <key> <string>_identity_criterion</string> </key>
<value> <value>
...@@ -452,7 +446,7 @@ ...@@ -452,7 +446,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1440069117.16</float> <float>1441126272.93</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>erp5_web_renderjs_ui_unsafe</skin_folder>
<skin_selection>RJSUnsafe</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_description</string>
<string>my_text_content</string>
<string>my_title</string>
<string>my_reference</string>
<string>my_revision</string>
<string>my_language</string>
<string>my_version</string>
<string>my_modification_date</string>
<string>my_portal_type</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebIllustration_viewAsJio</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>WebTable_viewAsJio</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
<string>my_language</string> <string>my_language</string>
<string>my_version</string> <string>my_version</string>
<string>my_modification_date</string> <string>my_modification_date</string>
<string>my_portal_type</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts39985349.6</string> </value> <value> <string>ts41129813.31</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>svg-edit-2.7</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLDocument" module="OFS.DTMLDocument"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>browser-not-supported.html</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />\n
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>\n
<link rel="icon" type="image/png" href="images/logo.png"/>\n
<link rel="stylesheet" href="svg-editor.css" type="text/css"/>\n
<script src="jquery.js"></script>\n
<title>Browser does not support SVG | SVG-edit</title>\n
</head>\n
<body>\n
\n
<div id="browser-not-supported">\n
<img style="float:left;padding:10px;" src="images/logo.png" width="48" height="48" alt="SVG-edit logo" /><br />\n
<p>Sorry, but your browser does not support SVG. Below is a list of alternate browsers and versions that support SVG and SVG-edit (from <a href="http://caniuse.com/#cats=SVG">caniuse.com</a>).</p>\n
<p>Try the latest version of <a href="http://www.getfirefox.com">Firefox</a>, <a href="http://www.google.com/chrome/">Google Chrome</a>, <a href="http://www.apple.com/safari/download/">Safari</a>, <a href="http://www.opera.com/download/">Opera</a> or <a href="http://windows.microsoft.com/ie9">Internet Explorer</a>.</p>\n
<p>If you are unable to install one of these and must use an old version of Internet Explorer, you can install the <a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame plugin</a>.</p>\n
\n
</div>\n
\n
<script>\n
/*globals $*/\n
var viewportHeight = window.innerHeight || ($(window).height() - 140);\n
var iframe = document.createElement(\'iframe\');\n
iframe.style.width = \'100%\';\n
iframe.style.height = viewportHeight + \'px\';\n
iframe.src = \'http://caniuse.com/#cats=SVG\';\n
document.body.appendChild(iframe);\n
</script>\n
</body>\n
</html>\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>canvg</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment