diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml index 462ca1069de6878fbce2a05babd41aa73ad6bdfe..fd2cbb8fd9eb869157f821683684496c669748c6 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_web_page_view_js.xml @@ -208,7 +208,7 @@ gadget.props.element.innerHTML = html;\n return gadget.updateHeader({\n title: options.doc.title + " | Web Page",\n - back_url: "#page=text_editor_list",\n + back_url: "#?page=text_editor_list",\n panel_action: false,\n save_action: true\n });\n @@ -397,7 +397,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -411,7 +411,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>946.18929.62498.39526</string> </value> + <value> <string>946.54860.11845.29678</string> </value> </item> <item> <key> <string>state</string> </key> @@ -429,7 +429,7 @@ </tuple> <state> <tuple> - <float>1444320970.58</float> + <float>1446729331.89</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml index acf0256a19a95a4d7011a8d2d4ce9f53e96e20f3..5e68ad90bab9aadf39b5d0ebac390a0bdb661eab 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_configurator_html.xml @@ -164,10 +164,10 @@ <div class="ui-controlgroup ui-controlgroup-horizontal">\n <div class="ui-grid-a ui-responsive">\n <div class="ui-block-a">\n - <a class="ui-btn" href="#page=sync" data-i18n="Synchronize">Synchronize</a>\n + <a class="ui-btn" href="#?page=sync" data-i18n="Synchronize">Synchronize</a>\n </div>\n <div class="ui-block-b">\n - <a class="ui-btn" href="#page=document_list" data-i18n="Go to document List">Go to document List</a>\n + <a class="ui-btn" href="#?page=document_list" data-i18n="Go to document List">Go to document List</a>\n </div>\n </div>\n </div>\n @@ -297,7 +297,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -311,7 +311,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.61353.27590.61969</string> </value> + <value> <string>946.4378.53544.28347</string> </value> </item> <item> <key> <string>state</string> </key> @@ -329,7 +329,7 @@ </tuple> <state> <tuple> - <float>1443018896.6</float> + <float>1446729498.99</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_html.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_html.xml index 1f5adb465108128790465c77d30d90198dde6430..3649dcbe61495ac7cfb915aff69ed86548852a69 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_html.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_html.xml @@ -170,10 +170,10 @@ <div class="ui-controlgroup ui-controlgroup-horizontal">\n <div class="ui-grid-a ui-responsive">\n <div class="ui-block-a">\n - <a class="ui-btn" href="#page=sync">Synchronize</a>\n + <a class="ui-btn" href="#?page=sync">Synchronize</a>\n </div>\n <div class="ui-block-b">\n - <a class="ui-btn" href="#page=document_list">Go to document List</a>\n + <a class="ui-btn" href="#?page=document_list">Go to document List</a>\n </div>\n </div>\n </div>\n @@ -306,7 +306,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -320,7 +320,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.58544.33560.24866</string> </value> + <value> <string>946.4378.53544.28347</string> </value> </item> <item> <key> <string>state</string> </key> @@ -338,7 +338,7 @@ </tuple> <state> <tuple> - <float>1443010638.45</float> + <float>1446729536.73</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml index 5b4114a5c9e4225e227664ce1ec3bbe63e826a29..8fa82a4af4de1bb69b575b67005544a94c0a32e6 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_dav_configurator_js.xml @@ -188,7 +188,7 @@ var gadget = this;\n return gadget.updateHeader({\n title: "Connect To DAV Storage",\n - back_url: "#page=jio_configurator",\n + back_url: "#?page=jio_configurator",\n panel_action: false\n }).push(function () {\n return gadget.props.deferred.resolve();\n @@ -341,7 +341,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -355,7 +355,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.61336.46618.42325</string> </value> + <value> <string>946.54860.11845.29678</string> </value> </item> <item> <key> <string>state</string> </key> @@ -373,7 +373,7 @@ </tuple> <state> <tuple> - <float>1444319088.33</float> + <float>1446729573.71</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml index f220053a2b1066a186dcbfcbc3375000b3dad993..fb59eed78b60e0bf17b56307cef109b22eb3e075 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml @@ -108,35 +108,111 @@ \n var gadget_klass = rJS(window),\n MAIN_PAGE_PREFIX = "gadget_officejs_",\n - DEFAULT_PAGE = "text_editor_list";\n + DEFAULT_PAGE = "text_editor_list",\n + REDIRECT_TIMEOUT = 5000;\n +\n + function listenHashChange(gadget) {\n + // Handle hash in this format: #$path1/path2?a=b&c=d\n + function extractHashAndDispatch(evt) {\n + var hash = (evt.newURL || window.location.toString()).split(\'#\')[1],\n + split,\n + command = "",\n + query = "",\n + subhashes,\n + subhash,\n + keyvalue,\n + index,\n + args = {};\n + if (hash !== undefined) {\n + split = hash.split(\'?\');\n + command = split[0] || "";\n + query = split[1] || "";\n + }\n + subhashes = query.split(\'&\');\n + for (index in subhashes) {\n + if (subhashes.hasOwnProperty(index)) {\n + subhash = subhashes[index];\n + if (subhash !== \'\') {\n + keyvalue = subhash.split(\'=\');\n + if (keyvalue.length === 2) {\n + args[decodeURIComponent(keyvalue[0])] = decodeURIComponent(keyvalue[1]);\n + }\n + }\n + }\n + }\n +\n + return gadget.renderApplication({\n + method: command[0],\n + path: command.substr(1),\n + args: args\n + });\n +\n + }\n +\n + var result = loopEventListener(window, \'hashchange\', false,\n + extractHashAndDispatch),\n + event = document.createEvent("Event");\n + event.initEvent(\'hashchange\', true, true);\n + event.newURL = window.location.toString();\n + window.dispatchEvent(event);\n + return result;\n + }\n \n gadget_klass\n - .declareAcquiredMethod(\'pleaseRedirectMyHash\', \'pleaseRedirectMyHash\')\n - .declareAcquiredMethod(\'jio_get\', \'jio_get\')\n \n .ready(function (gadget) {\n - gadget.props = {};\n + gadget.props = {\n + start_deferred: RSVP.defer()\n + };\n + })\n +\n + .declareMethod("getCommandUrlFor", function(options) {\n + var prefix = \'?\',\n + result,\n + key;\n + result = "#";\n + for (key in options) {\n + if (options.hasOwnProperty(key) && options[key] !== undefined) {\n + // Don\'t keep empty values\n + result += prefix + encodeURIComponent(key) + "=" + encodeURIComponent(options[key]);\n + prefix = \'&\';\n + }\n + }\n + return result;\n + })\n +\n + .declareMethod(\'redirect\', function (options) {\n + return this.getCommandUrlFor(options)\n + .push(function (hash) {\n + window.location.replace(hash);\n + // prevent returning unexpected response\n + // wait for the hash change to occur\n + // fail if nothing happens\n + return RSVP.timeout(REDIRECT_TIMEOUT);\n + });\n })\n +\n .declareMethod(\'route\', function (options) {\n - var gadget = this;\n + var gadget = this,\n + args = options.args;\n gadget.options = options;\n - if (options.jio_key === undefined || options.jio_key === \'\') {\n - if (options.page === undefined || options.page === \'\' || options.page === "document_list") {\n - options.page = DEFAULT_PAGE;\n + if (args.jio_key === undefined || args.jio_key === \'\') {\n + if (args.page === undefined || args.page === \'\' || args.page === "document_list") {\n + args.page = DEFAULT_PAGE;\n }\n return {\n - url: MAIN_PAGE_PREFIX + "page_" + options.page + ".html",\n - options: options\n + url: MAIN_PAGE_PREFIX + "page_" + args.page + ".html",\n + options: args\n };\n }\n - return gadget.jio_get(options.jio_key)\n + return gadget.jio_get(args.jio_key)\n .push(function (doc) {\n var sub_options = {},\n base_portal_type = doc.portal_type.toLowerCase().replace(/\\s/g, "_");\n sub_options = {\n doc: doc,\n - jio_key: options.jio_key,\n - search: options.search\n + jio_key: args.jio_key,\n + search: args.search\n };\n if (base_portal_type.search(/_temp$/) >= 0) {\n //Remove "_temp"\n @@ -148,10 +224,26 @@ return {\n url: MAIN_PAGE_PREFIX + "jio_"\n + base_portal_type\n - + "_" + options.page + ".html",\n + + "_" + args.page + ".html",\n options: sub_options\n };\n });\n + })\n + \n + .declareAcquiredMethod(\'jio_get\', \'jio_get\')\n + .declareAcquiredMethod(\'renderApplication\', \'renderApplication\')\n + .declareMethod(\'start\', function () {\n + this.props.start_deferred.resolve();\n + })\n + .declareService(function () {\n + var gadget = this;\n + return new RSVP.Queue()\n + .push(function () {\n + return gadget.props.start_deferred.promise;\n + })\n + .push(function () {\n + return listenHashChange(gadget);\n + });\n });\n \n }(window, rJS)); @@ -277,7 +369,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -291,7 +383,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.54379.5447.43417</string> </value> + <value> <string>946.4378.53544.28347</string> </value> </item> <item> <key> <string>state</string> </key> @@ -309,7 +401,7 @@ </tuple> <state> <tuple> - <float>1442858756.66</float> + <float>1446729681.9</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_html.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_html.xml index 8ff00bb0810c80c3bcaf632fbf8396c50446aa80..b7d32b8352595f6e40c94b414b87b6427b4a3327 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_html.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_html.xml @@ -182,9 +182,9 @@ <script class="panel-template" type="text/x-handlebars-template">\n <div class="ui-content">\n <ul data-role="listview" class="ui-listview">\n - <li><a href="#page=text_editor_list" data-i18n="Text Documents">Text Documents</a></li>\n - <li><a href="#page=sync" data-i18n="Sync">Sync</a></li>\n - <li class="ui-last-child"><a href="#page=logout" data-i18n="Logout">Logout</a></li>\n + <li><a href="#?page=text_editor_list" data-i18n="Text Documents">Text Documents</a></li>\n + <li><a href="#?page=sync" data-i18n="Sync">Sync</a></li>\n + <li class="ui-last-child"><a href="#?page=logout" data-i18n="Logout">Logout</a></li>\n </ul>\n </div>\n </script>\n @@ -334,7 +334,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -348,7 +348,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.18361.2224.61866</string> </value> + <value> <string>946.4378.53544.28347</string> </value> </item> <item> <key> <string>state</string> </key> @@ -366,7 +366,7 @@ </tuple> <state> <tuple> - <float>1440439282.96</float> + <float>1446729798.11</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_html.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_html.xml index 535a8d0e1b21173b7a8cb055b6ee8d7cf52af08f..68c821cdeaccfce49c1b3efe2b4e206abe7df70f 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_html.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_html.xml @@ -140,10 +140,10 @@ <script id="panel-template-body" type="text/x-handlebars-template">\n <div class="ui-content">\n <ul data-role="listview" class="ui-listview">\n - <li><a href="#page=text_editor_list" data-i18n="Text Documents">Text Documents</a></li>\n - <li><a href="#page=jio_configurator" data-i18n="Storage Configuration">Storage Configuration</a></li>\n - <li><a href="#page=sync" data-i18n="Syncronization">Syncronization</a></li>\n - <li class="ui-last-child"><a href="#page=logout" data-i18n="Logout">Logout</a></li>\n + <li><a href="#?page=text_editor_list" data-i18n="Text Documents">Text Documents</a></li>\n + <li><a href="#?page=jio_configurator" data-i18n="Storage Configuration">Storage Configuration</a></li>\n + <li><a href="#?page=sync" data-i18n="Syncronization">Syncronization</a></li>\n + <li class="ui-last-child"><a href="#?page=logout" data-i18n="Logout">Logout</a></li>\n </ul>\n </div>\n </script>\n @@ -278,7 +278,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -292,7 +292,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.61348.56996.63675</string> </value> + <value> <string>946.54860.11845.29678</string> </value> </item> <item> <key> <string>state</string> </key> @@ -310,7 +310,7 @@ </tuple> <state> <tuple> - <float>1444319473.8</float> + <float>1446729867.48</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_js.xml index 16d70703b0211087e3d2d3ac020d7b4e26abd07b..a6acc10554b9b5f0295471c4ea597270b403ff9a 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_text_editor_application_panel_js.xml @@ -156,6 +156,10 @@ .declareMethod(\'toggle\', function () {\n this.props.jelement.panel("toggle");\n })\n +\n + .declareMethod(\'close\', function () {\n + this.props.jelement.panel("close");\n + })\n \n .declareMethod(\'render\', function () {\n return;\n @@ -320,7 +324,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -334,7 +338,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.38557.26146.25275</string> </value> + <value> <string>946.4378.53544.28347</string> </value> </item> <item> <key> <string>state</string> </key> @@ -352,7 +356,7 @@ </tuple> <state> <tuple> - <float>1441651247.96</float> + <float>1446730020.92</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_site_module/officejs_text_editor.xml b/bt5/erp5_officejs/PathTemplateItem/web_site_module/officejs_text_editor.xml index 3b067e33350dc7ecfee453cda0c27b876ca7a194..93dc3eb07e886e4bde4dcccb55d6d5c0f33250c8 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_site_module/officejs_text_editor.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_site_module/officejs_text_editor.xml @@ -430,7 +430,7 @@ </item> <item> <key> <string>configuration_translation_gadget_url</string> </key> - <value> <string>gadget_officejs_translation.html</string> </value> + <value> <string>gadget_translation.html</string> </value> </item> <item> <key> <string>configuration_view_action_category</string> </key> @@ -707,7 +707,7 @@ </item> <item> <key> <string>actor</string> </key> - <value> <string>cedric.le.ninivin</string> </value> + <value> <string>zope</string> </value> </item> <item> <key> <string>comment</string> </key> @@ -721,7 +721,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>945.58604.38981.59955</string> </value> + <value> <string>946.4378.53544.28347</string> </value> </item> <item> <key> <string>state</string> </key> @@ -739,7 +739,7 @@ </tuple> <state> <tuple> - <float>1442858486.32</float> + <float>1446730078.39</float> <string>UTC</string> </tuple> </state>