Commit 9f8e0d42 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_officejs_support_request_ui: Search action dynamically according to the...

erp5_officejs_support_request_ui: Search action dynamically according to the action category defined on web site

If we always get links from action_object_view, Support Request will always break if we change View Action Category on web site.
parent df18d3ad
......@@ -20,7 +20,7 @@
result = new Array(name.length);
for (iname = 0; iname < name.length; iname += 1) {
for (iaction = 0; iaction < action_object.length; iaction += 1) {
if (name[iname] === action_object[iaction].name) {
if (action_object[iaction].name.indexOf(name[iname]) !== -1) {
result[iname] = action_object[iaction];
break;
}
......@@ -308,7 +308,7 @@
var erp5_document = result_list[0],
worklist_gadget = result_list[1],
field_listbox_begin_from = result_list[2],
view_list = erp5_document._links.action_object_view || [];
view_list = erp5_document._links.view || [];
gadget.property_dict.option_dict = {
// graph_gadget: Keep ending slash to be consistent with the automatically set "base" tag
......
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