Commit cd9bbb5c authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: hide or deactivate the button properly

parent f69ee075
...@@ -72,31 +72,35 @@ ...@@ -72,31 +72,35 @@
listbox_button_class = "ui-btn-icon-notext ui-icon-list-alt switch-listbox", listbox_button_class = "ui-btn-icon-notext ui-icon-list-alt switch-listbox",
graphic_button_class = "ui-btn-icon-notext ui-icon-bar-chart-o switch-graph"; graphic_button_class = "ui-btn-icon-notext ui-icon-bar-chart-o switch-graph";
if (gadget.state.enable_graphic) { if (gadget.state.hasOwnProperty("enable_graphic")) {
if (!only_graphic) { if (gadget.state.enable_graphic) {
listbox_button_class = listbox_button_class + " " + hide_button_class; if (!only_graphic) {
} else if (only_graphic) { listbox_button_class = listbox_button_class + " " + hide_button_class;
graphic_button_class = graphic_button_class + " " + hide_button_class; } else if (only_graphic) {
} graphic_button_class = graphic_button_class + " " + hide_button_class;
}
domsugar(graphic_container, [ domsugar(graphic_container, [
domsugar("button", { domsugar("button", {
"class": listbox_button_class, "class": listbox_button_class,
"type": "button" "type": "button"
}), }),
domsugar("button", { domsugar("button", {
"class": graphic_button_class, "class": graphic_button_class,
"type": "button" "type": "button"
}) })
]); ]);
} else {
domsugar(graphic_container, [
domsugar("button", {
"class": graphic_button_class,
"type": "button",
"disabled": true
})
]);
}
} else { } else {
domsugar(graphic_container, [ domsugar(graphic_container, []);
domsugar("button", {
"class": graphic_button_class,
"type": "button",
"disabled": true
})
]);
} }
if (gadget.state.extended_search) { if (gadget.state.extended_search) {
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1007.6115.7683.34611</string> </value> <value> <string>1007.7357.22099.45977</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1679005696.95</float> <float>1679080300.57</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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