Commit 66fbeb65 authored by Roque's avatar Roque

erp5_officejs: fix in login redirect when select erp5 storage

- also minor fixes in UI:
- fix header export button rendering
- fix title in listbox
parent 03862410
...@@ -256,6 +256,7 @@ ...@@ -256,6 +256,7 @@
//should be come from the configuration (form_definition) //should be come from the configuration (form_definition)
//jump_url: "", //jump_url: "",
//fast_input_url: "", //fast_input_url: "",
//export_url: "",
filter_action: true, filter_action: true,
page_title: result_list[2] page_title: result_list[2]
}; };
...@@ -284,12 +285,10 @@ ...@@ -284,12 +285,10 @@
if (add_url) { if (add_url) {
header_dict.add_url = url_list[url_list.length - 1]; header_dict.add_url = url_list[url_list.length - 1];
} }
if (result_list[1]) { if (erp5_document._links.action_object_jio_report ||
header_dict.export_url = (
erp5_document._links.action_object_jio_report ||
erp5_document._links.action_object_jio_exchange || erp5_document._links.action_object_jio_exchange ||
erp5_document._links.action_object_jio_print erp5_document._links.action_object_jio_print) {
) ? url_list[5] : ''; header_dict.export_url = url_list[5];
} }
} }
return this_gadget.updateHeader(header_dict); return this_gadget.updateHeader(header_dict);
......
...@@ -112,7 +112,8 @@ ...@@ -112,7 +112,8 @@
.declareAcquiredMethod('getUrlFor', 'getUrlFor') .declareAcquiredMethod('getUrlFor', 'getUrlFor')
.declareMethod('createJio', function (jio_options) { .declareMethod('createJio', function (jio_options) {
var appcache_storage, var gadget = this,
appcache_storage,
origin_url = window.location.href, origin_url = window.location.href,
hateoas_section = "./hateoas_appcache/", hateoas_section = "./hateoas_appcache/",
hateoas_section_and_view = hateoas_section + "definition_view/", hateoas_section_and_view = hateoas_section + "definition_view/",
...@@ -224,9 +225,10 @@ ...@@ -224,9 +225,10 @@
console.log("Error while appcache-local " + console.log("Error while appcache-local " +
"storage synchronization"); "storage synchronization");
if (error && error.currentTarget && if (error && error.currentTarget &&
error.currentTarget.status === "401") { error.currentTarget.status === 401) {
console.log("Unauthorized access to storage," + console.log("Unauthorized access to storage," +
"sync cancelled"); "sync cancelled");
gadget.state_parameter_dict.jio_storage_name = "ERP5";
return; return;
} }
throw error; throw error;
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Web Pages</string> </value> <value> <string>Documents</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
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