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