Commit 8f5c527d authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: add comments and make jslint happy

parent 0f305253
...@@ -29,14 +29,24 @@ ...@@ -29,14 +29,24 @@
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareAcquiredMethod("getUrlParameter",
"getUrlParameter")
.declareMethod('render', function (options) { .declareMethod('render', function (options) {
var state_dict = { var gadget = this,
extended_search: options.extended_search || "", state_dict = {
enable_graphic: options.enable_graphic || false, // XXX probably get from url
graphic_type: options.graphic_type, extended_search: options.extended_search || "",
jio_key: options.jio_key // XXX probably get from url
}; enable_graphic: options.enable_graphic || false,
return this.changeState(state_dict); // XXX probably get from url
graphic_type: options.graphic_type,
jio_key: options.jio_key
};
return gadget.getUrlParameter("only_graphic")
.push(function (only_graphic) {
state_dict.only_graphic = only_graphic || false;
return gadget.changeState(state_dict);
});
}) })
.declareAcquiredMethod("triggerListboxGraphicSelection", .declareAcquiredMethod("triggerListboxGraphicSelection",
"triggerListboxGraphicSelection") "triggerListboxGraphicSelection")
...@@ -59,8 +69,10 @@ ...@@ -59,8 +69,10 @@
continue_full_text_query_search = true; continue_full_text_query_search = true;
if (gadget.state.extended_search) { if (gadget.state.extended_search) {
if (modification_dict.graphic_type) { if (modification_dict.graphic_type && !modification_dict.only_graphic) {
button_graphic.classList.remove(graphic_css_class); button_graphic.classList.remove(graphic_css_class);
} else if (modification_dict.only_graphic) {
change_button_graphic.classList.remove(graphic_css_class);
} }
// Parse the raw query // Parse the raw query
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>997.50833.30307.35925</string> </value> <value> <string>997.50887.11419.51200</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1643231133.68</float> <float>1643288555.22</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
var options = { var options = {
extended_search: result_list[0], extended_search: result_list[0],
jio_key: gadget.state.jio_key jio_key: gadget.state.jio_key
} };
if (result_list[1]) { if (result_list[1]) {
options.graphic_type = result_list[1]; options.graphic_type = result_list[1];
} }
......
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1643211674.58</float> <float>1643288573.04</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