Commit acb5ca18 authored by Vivek's avatar Vivek Committed by Kazuhiko Shiozaki

erp5_officejs: (fixup) modified router logic.

parent 2f4746b0
......@@ -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
......@@ -411,7 +411,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.54860.11845.29678</string> </value>
<value> <string>946.59099.34897.19985</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -429,7 +429,7 @@
</tuple>
<state>
<tuple>
<float>1446729331.89</float>
<float>1446740911.15</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -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
......@@ -311,7 +311,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.4378.53544.28347</string> </value>
<value> <string>946.59102.20815.50705</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -329,7 +329,7 @@
</tuple>
<state>
<tuple>
<float>1446729498.99</float>
<float>1446740955.07</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -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
......@@ -320,7 +320,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.4378.53544.28347</string> </value>
<value> <string>946.59102.61985.50653</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -338,7 +338,7 @@
</tuple>
<state>
<tuple>
<float>1446729536.73</float>
<float>1446741062.96</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -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
......@@ -355,7 +355,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.54860.11845.29678</string> </value>
<value> <string>946.59103.36885.15735</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -373,7 +373,7 @@
</tuple>
<state>
<tuple>
<float>1446729573.71</float>
<float>1446741080.69</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -112,38 +112,29 @@
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
subhashes = hash.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
\n
return gadget.renderApplication({\n
method: command[0],\n
path: command.substr(1),\n
args: args\n
});\n
\n
......@@ -167,7 +158,7 @@
})\n
\n
.declareMethod("getCommandUrlFor", function(options) {\n
var prefix = \'?\',\n
var prefix = \'\',\n
result,\n
key;\n
result = "#";\n
......@@ -383,7 +374,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.4378.53544.28347</string> </value>
<value> <string>946.59105.23936.34252</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -401,7 +392,7 @@
</tuple>
<state>
<tuple>
<float>1446729681.9</float>
<float>1446740807.62</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -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
......@@ -348,7 +348,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.4378.53544.28347</string> </value>
<value> <string>946.59107.19807.14882</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -366,7 +366,7 @@
</tuple>
<state>
<tuple>
<float>1446729798.11</float>
<float>1446741174.99</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -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
......@@ -292,7 +292,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>946.54860.11845.29678</string> </value>
<value> <string>946.59108.30069.37307</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -310,7 +310,7 @@
</tuple>
<state>
<tuple>
<float>1446729867.48</float>
<float>1446741155.57</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