Commit 0fb7146d authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: select first option if no graphic type selected

parent 34c30f73
...@@ -582,7 +582,7 @@ ...@@ -582,7 +582,7 @@
// graphic // graphic
enable_graphic: options.enable_graphic, enable_graphic: options.enable_graphic,
graphic_type: graphic_type graphic_type: graphic_type || option_list[0][0]
}); });
}); });
}); });
...@@ -1215,6 +1215,9 @@ ...@@ -1215,6 +1215,9 @@
gadget.state.graphic_type && gadget.state.graphic_type &&
gadget.state.option_list.length > 0 && gadget.state.option_list.length > 0 &&
gadget.state.graphic_type !== "") { gadget.state.graphic_type !== "") {
gadget.element.querySelector(
'select[name="GraphicSelect"]'
).value = gadget.state.graphic_type;
result_queue result_queue
.push(function () { .push(function () {
return gadget.declareGadget('gadget_graphic.html', { return gadget.declareGadget('gadget_graphic.html', {
...@@ -1230,9 +1233,6 @@ ...@@ -1230,9 +1233,6 @@
domain_list = [], domain_list = [],
domain_id, domain_id,
domain; domain;
gadget.element.querySelector(
'select[name="GraphicSelect"]'
).value = gadget.state.graphic_type;
for (i = 0; i < column_list_json.length; i += 1) { for (i = 0; i < column_list_json.length; i += 1) {
if (column_list_json[i][0] === gadget.state.graphic_type) { if (column_list_json[i][0] === gadget.state.graphic_type) {
group_by = column_list_json[i][0]; group_by = column_list_json[i][0];
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>997.31801.5987.49169</string> </value> <value> <string>997.32335.40434.60296</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1642089281.52</float> <float>1642121302.43</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