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

erp5_officejs: Updated to generic officeJS Launcher, works offline

erp5_officejs: Updated Appcache and jioConf
parent de0e1002
......@@ -108,7 +108,7 @@
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<html manifest="gadget_ckeditor.appcache">\n
<head>\n
<meta charset="utf-8">\n
<meta name="viewport" content="width=device-width, initial-scale=1">\n
......@@ -117,7 +117,8 @@
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
\n
\n
<!-- This gadget provides ckeditor with all Plugins activated by default -->\n
<!-- Make sure to check the timestamp of your CKEditor version in order to update the manifest -->\n
<script src="ckeditor/ckeditor.js"></script>\n
<script src="gadget_ckeditor.js" type="text/javascript"></script>\n
\n
......@@ -263,7 +264,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.18348.39523.50449</string> </value>
<value> <string>945.34162.16498.45226</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -281,7 +282,7 @@
</tuple>
<state>
<tuple>
<float>1441297895.5</float>
<float>1441799207.54</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -290,7 +290,8 @@
}\n
}\n
for (i = 0; i < possible_left_button_list.length; i += 1) {\n
if (options.hasOwnProperty(possible_left_button_list[i][0])) {\n
if (options.hasOwnProperty(possible_left_button_list[i][0])\n
&& options[possible_left_button_list[i][0]]) {\n
left_button = {\n
title: possible_left_button_list[i][1],\n
icon: possible_left_button_list[i][2],\n
......@@ -339,7 +340,8 @@
}\n
}\n
for (i = 0; i < possible_right_button_list.length; i += 1) {\n
if (options.hasOwnProperty(possible_right_button_list[i][0])) {\n
if (options.hasOwnProperty(possible_right_button_list[i][0])\n
&& options[possible_right_button_list[i][0]]) {\n
right_button = {\n
title: default_right_text || possible_right_button_list[i][1],\n
icon: default_right_icon || possible_right_button_list[i][2],\n
......@@ -519,7 +521,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>cedric.le.ninivin</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -533,7 +535,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.33689.22724.47940</string> </value>
<value> <string>945.39862.6327.58811</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -551,8 +553,8 @@
</tuple>
<state>
<tuple>
<float>1441358975.69</float>
<string>GMT</string>
<float>1441729356.63</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -123,15 +123,13 @@
\n
<form class="view-web-page-form">\n
\n
<div class="left">\n
<div class="center">\n
<div class="ui-field-contain">\n
\n
<label data-i18n="Title:">Title:</label>\n
<input type="text" name="title" value="{{title}}">\n
</div>\n
</div>\n
<div class="right">\n
<button type="submit" data-i18n="Save">Save</button>\n
<button type="submit" data-i18n="Save" style="display:none;">Save</button>\n
</div>\n
<div class="ui-field-contain">\n
    <fieldset data-role="collapsible">\n
......@@ -313,7 +311,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.18366.4767.50841</string> </value>
<value> <string>945.34162.16498.45226</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -331,7 +329,7 @@
</tuple>
<state>
<tuple>
<float>1440439622.69</float>
<float>1441723579.7</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -140,13 +140,14 @@
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
iframe.setAttribute(\'class\', iframe_class_string);\n
return;\n
}\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
iframe.setAttribute(\'class\', iframe_class_string);\n
return true;\n
return;\n
}\n
\n
var gadget_klass = rJS(window),\n
......@@ -173,10 +174,6 @@
.declareAcquiredMethod("put", "jio_put")\n
.declareAcquiredMethod(\'allDocs\', \'jio_allDocs\')\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
......@@ -188,6 +185,14 @@
console.log(e);\n
});\n
})\n
\n
.allowPublicAcquisition(\'triggerSubmit\', function () {\n
return this.props.element.querySelector(\'button\').click();\n
})\n
\n
.declareMethod(\'triggerSubmit\', function () {\n
return this.props.element.querySelector(\'button\').click();\n
})\n
\n
.declareMethod("render", function (options) {\n
var gadget = this;\n
......@@ -199,7 +204,10 @@
.push(function (html) {\n
gadget.props.element.innerHTML = html;\n
return gadget.updateHeader({\n
title: "Web Page"\n
title: options.doc.title + " | Web Page",\n
back_url: "#text_editor_list",\n
panel_action: false,\n
save_action: true\n
});\n
})\n
.push(function () {\n
......@@ -220,10 +228,10 @@
})\n
.push(function () {\n
return gadget.declareGadget(\n
"gadget_ckeditor.html",\n
"rjsunsafe/gadget_ckeditor.html",\n
{\n
scope: "my_text_content",\n
sandbox: "dataurl",\n
sandbox: "iframe",\n
element: gadget.props.element.querySelector(".document-content")\n
}\n
);\n
......@@ -406,7 +414,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.34033.23091.48896</string> </value>
<value> <string>945.42760.43905.59050</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -424,7 +432,7 @@
</tuple>
<state>
<tuple>
<float>1441379636.83</float>
<float>1441963997.94</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -124,8 +124,8 @@
<div class="ui-grid-b ui-responsive">\n
<div class="ui-block-a"></div>\n
<div class="ui-block-b">\n
<form class="synchro-form">\n
<input data-inline="true" type="submit" value="Launch" data-i18n="[value]Launch" data-theme="b">\n
<form class="synchro-form view-web-page-form">\n
<button type="submit" data-i18n="Launch Synchronization" data-theme="b">Launch Synchronization</button>\n
</form>\n
</div>\n
<div class="ui-block-c"></div>\n
......@@ -278,7 +278,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.18325.20042.14250</string> </value>
<value> <string>945.41276.23899.60552</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -296,7 +296,7 @@
</tuple>
<state>
<tuple>
<float>1440439752.77</float>
<float>1441814187.24</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -151,7 +151,7 @@
);\n
})\n
.push(function () {\n
gadget.props.element.querySelector("input[type=submit]")\n
gadget.props.element.querySelector("button")\n
.disabled = true;\n
\n
return gadget.repair();\n
......@@ -298,7 +298,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>944.43437.41961.42171</string> </value>
<value> <string>945.34038.48545.63795</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -316,7 +316,7 @@
</tuple>
<state>
<tuple>
<float>1440437107.94</float>
<float>1441813353.14</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -170,8 +170,7 @@
.push(function (url) {\n
return gadget.updateHeader({\n
title: "Text Documents",\n
right_url: url,\n
right_title: "New"\n
add_url: url\n
});\n
})\n
.push(function () {\n
......@@ -350,7 +349,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.18324.27561.32341</string> </value>
<value> <string>945.39477.48217.31795</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -368,7 +367,7 @@
</tuple>
<state>
<tuple>
<float>1440437077.52</float>
<float>1441729437.19</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -482,6 +482,12 @@
.allowPublicAcquisition("jio_repair", function (param_list) {\n
return callJioGadget(this, "repair", param_list);\n
})\n
.allowPublicAcquisition("triggerSubmit", function (param_list) {\n
return this.getDeclaredGadget(MAIN_SCOPE)\n
.push(function (main_gadget) {\n
return main_gadget.triggerSubmit(param_list);\n
});\n
})\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
......@@ -718,7 +724,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>cedric.le.ninivin</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -732,7 +738,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.39476.14059.34508</string> </value>
<value> <string>945.39852.16132.21538</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -750,8 +756,8 @@
</tuple>
<state>
<tuple>
<float>1441706203.86</float>
<string>GMT</string>
<float>1441729471.18</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
......@@ -6,6 +6,24 @@
</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>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
......@@ -49,7 +67,24 @@
<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>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
......@@ -266,6 +301,46 @@
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_router_gadget_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_jio_gadget_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_translation_gadget_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_manifest_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
......@@ -299,13 +374,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>aggregate/web_page_module/gadget_officejs_text_editor_application_html</string>
<string>aggregate/web_page_module/officejs_launcher_html</string>
</tuple>
</value>
</item>
<item>
<key> <string>configuration_application_title</string> </key>
<value> <string>E-COMMERCE</string> </value>
<value> <string>Text Editor</string> </value>
</item>
<item>
<key> <string>configuration_default_view_action_reference</string> </key>
......@@ -315,15 +390,33 @@
</item>
<item>
<key> <string>configuration_frontpage_gadget_url</string> </key>
<value> <string>gadget_e5g_ecommerce_page_front.html</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>configuration_hateoas_url</string> </key>
<value> <string>hateoas/</string> </value>
</item>
<item>
<key> <string>configuration_jio_gadget_url</string> </key>
<value> <string>gadget_officejs_jio.html</string> </value>
</item>
<item>
<key> <string>configuration_manifest_url</string> </key>
<value> <string>gadget_officejs.appcache</string> </value>
</item>
<item>
<key> <string>configuration_panel_gadget_url</string> </key>
<value> <string>gadget_e5g_ecommerce_panel.html</string> </value>
<value> <string>gadget_officejs_text_editor_application_panel.html</string> </value>
</item>
<item>
<key> <string>configuration_router_gadget_url</string> </key>
<value> <string>gadget_officejs_router.html</string> </value>
</item>
<item>
<key> <string>configuration_translation_gadget_url</string> </key>
<value> <string>gadget_officejs_translation.html</string> </value>
</item>
<item>
<key> <string>configuration_view_action_category</string> </key>
......@@ -373,7 +466,7 @@
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>RJSUnsafe</string> </value>
<value> <string>RJS</string> </value>
</item>
<item>
<key> <string>static_language_selection</string> </key>
......@@ -543,9 +636,7 @@
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
<value> <string>publish</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
......@@ -571,7 +662,7 @@
</tuple>
<state>
<tuple>
<float>1440069092.4</float>
<float>1441812607.6</float>
<string>UTC</string>
</tuple>
</state>
......@@ -580,7 +671,7 @@
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>embedded</string> </value>
<value> <string>published</string> </value>
</item>
</dictionary>
</list>
......@@ -616,7 +707,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.18320.46785.6894</string> </value>
<value> <string>945.41250.8324.32955</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -634,7 +725,7 @@
</tuple>
<state>
<tuple>
<float>1441126272.93</float>
<float>1441966702.43</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -383,7 +383,7 @@
</tuple>
<state>
<tuple>
<float>1440069092.41</float>
<float>1441388984.55</float>
<string>UTC</string>
</tuple>
</state>
......@@ -428,7 +428,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>945.12191.35478.21316</string> </value>
<value> <string>945.34189.48725.3874</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -446,7 +446,7 @@
</tuple>
<state>
<tuple>
<float>1441126272.93</float>
<float>1441966702.4</float>
<string>UTC</string>
</tuple>
</state>
......
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