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