Commit 78e66722 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼 Committed by Vincent Bechu

[erp5_officejs] changes to have "Javascript Editor" on official officejs.com

/reviewed-on nexedi/erp5!753
parents 74730214 8900b5d3
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>3c051d32f2868787d798c1997823f4b8</string> </value> <value> <string>5e1e205815a1a2206586fc6c5347cc49</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>969.56469.26666.60910</string> </value> <value> <string>970.31168.35810.58043</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1535369698.86</float> <float>1537862969.45</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" 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>
</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>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>ec0212c1f781ca523888ca2228d303e8</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>officejs_javascript_editor_icon.png</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filename</string> </key>
<value> <string>codemirror_logo.png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_officejs_appstore_app_text_editor_icon_javascript_editor_png</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>icon_javascript_editor.png</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<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">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<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>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>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1537546867.23</float>
<string>UTC</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="7" aka="AAAAAAAAAAc=">
<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>970.31528.45792.33211</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>1537805334.73</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -209,6 +209,9 @@ gadget_officejs_setting.js\n ...@@ -209,6 +209,9 @@ gadget_officejs_setting.js\n
gadget_officejs_setting.html\n gadget_officejs_setting.html\n
\n \n
#code mirror\n #code mirror\n
officejs_javascript_editor_icon.png\n
gadget_officejs_json_manifest_javascript_editor_install.json\n
gadget_officejs_json_manifest_javascript_editor.json\n
gadget_officejs_codemirror_router.html\n gadget_officejs_codemirror_router.html\n
gadget_officejs_jio_web_script_view.html\n gadget_officejs_jio_web_script_view.html\n
gadget_officejs_jio_web_script_view.js\n gadget_officejs_jio_web_script_view.js\n
...@@ -396,7 +399,7 @@ NETWORK:\n ...@@ -396,7 +399,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>970.25271.42440.56234</string> </value> <value> <string>970.31022.36004.22801</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -414,7 +417,7 @@ NETWORK:\n ...@@ -414,7 +417,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1537448284.38</float> <float>1537776214.0</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<script data-renderjs-configuration="document_title_plural" type="text/x-renderjs-configuration">JS scripts</script> <script data-renderjs-configuration="document_title_plural" type="text/x-renderjs-configuration">JS scripts</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">web_page_module</script> <script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">web_page_module</script>
<script data-renderjs-configuration="erp5_attachment_synchro" type="text/x-renderjs-configuration"></script> <script data-renderjs-configuration="erp5_attachment_synchro" type="text/x-renderjs-configuration"></script>
<script data-renderjs-configuration="dropbox_app_key" type="text/x-renderjs-configuration">n692ixxhyg9zhqs</script> <script data-renderjs-configuration="dropbox_app_key" type="text/x-renderjs-configuration">xztne380tmhy7xu</script>
<div data-gadget-url="gadget_erp5_router.html" data-gadget-scope="erp5_router"></div> <div data-gadget-url="gadget_erp5_router.html" data-gadget-scope="erp5_router"></div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>970.25572.20112.58060</string> </value> <value> <string>970.26997.33546.6348</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1537452155.85</float> <float>1537540898.55</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
{
"short_name": "OfficeJS Javascript Editor",
"name": "OfficeJS Javascript Editor",
"description": "A simple web editor (Codemirror) for Javascript",
"icons": [
{
"src": "officejs_javascript_editor_icon.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "officejs_javascript_editor_icon.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": "../",
"display": "standalone",
"background_color": "#085078",
"theme_color": "#085078"
}
\ No newline at end of file
{
"short_name": "OfficeJS Javascript Editor",
"name": "OfficeJS Javascript Editor",
"description": "A simple web editor (Codemirror) for Javascript",
"icons": [
{
"src": "officejs_javascript_editor_icon.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "officejs_javascript_editor_icon.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": "../../",
"display": "standalone",
"background_color": "#085078",
"theme_color": "#085078"
}
\ No newline at end of file
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<option>Jabber Client</option> <option>Jabber Client</option>
<option>Travel Expense</option> <option>Travel Expense</option>
<option>Notebook</option> <option>Notebook</option>
<option>Javascript editor (CodeMirror)</option>
</select> </select>
</div> </div>
</div> </div>
......
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>967.13490.46878.24849</string> </value> <value> <string>970.27017.22588.52565</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1525423502.47</float> <float>1537537669.28</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*globals window, RSVP, rJS, loopEventListener, URL, document /*globals window, RSVP, rJS, jIO, loopEventListener, URL, document */
FileReader, console, navigator */ /*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, navigator, RSVP, rJS, jIO, URL) { (function (window, RSVP, rJS, jIO, URL) {
"use strict"; "use strict";
var origin_url = (window.location.origin + window.location.pathname).replace( var origin_url = (window.location.origin + window.location.pathname)
"officejs_export/", ""), .replace("officejs_export/", ""),
application_dict = { application_dict = {
"Text Editor": { "Text Editor": {
"url": "officejs_text_editor/", "url": "officejs_text_editor/",
...@@ -105,13 +105,16 @@ ...@@ -105,13 +105,16 @@
"url": "officejs_hr/", "url": "officejs_hr/",
"cache": "gadget_officejs_hr.appcache", "cache": "gadget_officejs_hr.appcache",
"no_installer": true "no_installer": true
},
"Javascript editor (CodeMirror)": {
"url": "officejs_codemirror/",
"cache": "gadget_officejs_codemirror.appcache"
} }
}; };
function exportZip(gadget, event) { function exportZip(gadget, event) {
var j, var j,
zip_name, zip_name,
i = 0,
form_result = {}, form_result = {},
len = event.target.length, len = event.target.length,
app; app;
...@@ -132,7 +135,7 @@ ...@@ -132,7 +135,7 @@
element.appendChild(a); element.appendChild(a);
a.style = "display: none"; a.style = "display: none";
a.href = url; a.href = url;
a.download = zip_name ? zip_name : default_name + ".zip"; a.download = zip_name || default_name + ".zip";
a.click(); a.click();
element.removeChild(a); element.removeChild(a);
URL.revokeObjectURL(url); URL.revokeObjectURL(url);
...@@ -144,8 +147,7 @@ ...@@ -144,8 +147,7 @@
g.props = {}; g.props = {};
}) })
.declareMethod("fillZip", function (cache_file, site_url, no_installer) { .declareMethod("fillZip", function (cache_file, site_url, no_installer) {
var gadget = this, var file_storage = jIO.createJIO({
file_storage = jIO.createJIO({
type: "replicate", type: "replicate",
conflict_handling: 2, conflict_handling: 2,
check_remote_attachment_creation: true, check_remote_attachment_creation: true,
...@@ -199,4 +201,4 @@ ...@@ -199,4 +201,4 @@
}); });
}); });
}(window, navigator, RSVP, rJS, jIO, URL)); }(window, RSVP, rJS, jIO, URL));
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>967.36177.43828.39338</string> </value> <value> <string>970.27017.22588.52565</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1526388949.99</float> <float>1537537740.22</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -359,6 +359,16 @@ ...@@ -359,6 +359,16 @@
<value> <string>string</string> </value> <value> <string>string</string> </value>
</item> </item>
</dictionary> </dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_webapp_manifest_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -479,6 +489,10 @@ ...@@ -479,6 +489,10 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>configuration_webapp_manifest_url</string> </key>
<value> <string>gadget_officejs_json_manifest_javascript_editor_install.json</string> </value>
</item>
<item> <item>
<key> <string>configuration_x_frame_options</string> </key> <key> <string>configuration_x_frame_options</string> </key>
<value> <string>SAMEORIGIN</string> </value> <value> <string>SAMEORIGIN</string> </value>
...@@ -718,7 +732,7 @@ ...@@ -718,7 +732,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>960.25484.60987.38638</string> </value> <value> <string>970.22725.26429.65484</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -736,7 +750,7 @@ ...@@ -736,7 +750,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502093918.8</float> <float>1537779309.73</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -289,6 +289,16 @@ ...@@ -289,6 +289,16 @@
<value> <string>string</string> </value> <value> <string>string</string> </value>
</item> </item>
</dictionary> </dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_webapp_manifest_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -355,6 +365,10 @@ ...@@ -355,6 +365,10 @@
<key> <string>configuration_translation_gadget_url</string> </key> <key> <string>configuration_translation_gadget_url</string> </key>
<value> <string>gadget_translation.html</string> </value> <value> <string>gadget_translation.html</string> </value>
</item> </item>
<item>
<key> <string>configuration_webapp_manifest_url</string> </key>
<value> <string>gadget_officejs_json_manifest_javascript_editor.json</string> </value>
</item>
<item> <item>
<key> <string>configuration_x_frame_options</string> </key> <key> <string>configuration_x_frame_options</string> </key>
<value> <string>SAMEORIGIN</string> </value> <value> <string>SAMEORIGIN</string> </value>
...@@ -592,7 +606,7 @@ ...@@ -592,7 +606,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>970.22873.38688.50397</string> </value> <value> <string>970.26997.33546.6348</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -610,7 +624,7 @@ ...@@ -610,7 +624,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1537286038.01</float> <float>1537779354.88</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Verify Search, add another document --> <!-- Verify Search, add another document -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
...@@ -173,6 +174,7 @@ ...@@ -173,6 +174,7 @@
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="search_query python: 'Titre'"> <tal:block tal:define="search_query python: 'Titre'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" />
</tal:block> </tal:block>
......
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Verify Search, add another document --> <!-- Verify Search, add another document -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
...@@ -173,6 +174,7 @@ ...@@ -173,6 +174,7 @@
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="search_query python: 'Titre'"> <tal:block tal:define="search_query python: 'Titre'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" />
</tal:block> </tal:block>
......
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