Commit cd41ab57 authored by Roque's avatar Roque

erp5_web_renderjs_ui: fixing bug in listbox buttons hiding

parent 60b987de
...@@ -660,7 +660,7 @@ ...@@ -660,7 +660,7 @@
}) })
.push(function (hide_listbox_buttons) { .push(function (hide_listbox_buttons) {
// XXX Disable select and clipboard functionalities on migrated apps: 'uid'-workaround made for renderjs UI doesn't work on officejs // XXX Disable select and clipboard functionalities on migrated apps: 'uid'-workaround made for renderjs UI doesn't work on officejs
hide_buttons = ((hide_listbox_buttons !== undefined && hide_listbox_buttons == "1") ? false : true); hide_buttons = ((hide_listbox_buttons !== undefined && hide_listbox_buttons == "1") ? true : false);
return RSVP.all([ return RSVP.all([
gadget.getUrlForList(url_for_option_list), gadget.getUrlForList(url_for_option_list),
is_sortable_list, is_sortable_list,
...@@ -779,7 +779,7 @@ ...@@ -779,7 +779,7 @@
button_element.type = 'button'; button_element.type = 'button';
button_element.setAttribute('class', 'ui-icon-list-ul ui-btn-icon-left ' + gadget.state.hide_class); button_element.setAttribute('class', 'ui-icon-list-ul ui-btn-icon-left ' + gadget.state.hide_class);
button_element.textContent = translation_list[5]; button_element.textContent = translation_list[5];
if (hide_buttons && gadget.state.hide_class !== "ui-disabled") { if (!hide_buttons) {
div_element.appendChild(button_element); div_element.appendChild(button_element);
} }
...@@ -792,7 +792,7 @@ ...@@ -792,7 +792,7 @@
button_element.type = 'button'; button_element.type = 'button';
button_element.setAttribute('class', 'ui-icon-check-square-o ui-btn-icon-left ' + gadget.state.hide_class); button_element.setAttribute('class', 'ui-icon-check-square-o ui-btn-icon-left ' + gadget.state.hide_class);
button_element.textContent = translation_list[1]; button_element.textContent = translation_list[1];
if (hide_buttons && gadget.state.hide_class !== "ui-disabled") { if (!hide_buttons) {
div_element.appendChild(button_element); div_element.appendChild(button_element);
} }
} }
......
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