Commit e4f882b5 authored by Gabriel Monnerat's avatar Gabriel Monnerat

fixup! erp5_web_renderjs_ui: Initial implementation of Graphic Gadget

Minor improvements
parent cb33501c
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
.declareAcquiredMethod("getTranslationList", "getTranslationList") .declareAcquiredMethod("getTranslationList", "getTranslationList")
.declareAcquiredMethod("getUrlForList", "getUrlForList") .declareAcquiredMethod("getUrlForList", "getUrlForList")
.declareAcquiredMethod("redirect", "redirect") .declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("trigger", "trigger")
////////////////////////////////////////////// //////////////////////////////////////////////
// initialize the gadget content // initialize the gadget content
...@@ -28,11 +27,9 @@ ...@@ -28,11 +27,9 @@
option_list = modification_dict.graphic_option_list, option_list = modification_dict.graphic_option_list,
url_list = [], url_list = [],
gadget = this; gadget = this;
console.log(modification_dict);
console.log(gadget.state);
for (i = 0; i < option_list.length; i += 1) { for (i = 0; i < option_list.length; i += 1) {
url_list.push({ url_list.push({
"command": "display_with_history", "command": "store_and_change",
"options": { "options": {
"jio_key": gadget.state.jio_key, "jio_key": gadget.state.jio_key,
"graphic_type": option_list[i][0] "graphic_type": option_list[i][0]
...@@ -89,7 +86,12 @@ ...@@ -89,7 +86,12 @@
.onEvent('click', function click(evt) { .onEvent('click', function click(evt) {
if (evt.target.classList.contains('close')) { if (evt.target.classList.contains('close')) {
evt.preventDefault(); evt.preventDefault();
return this.trigger(); // When we close, the button to change the graphic does not appears again.
// How to display the button to change the graphic again?
// XXX reload is probably too much.
return this.redirect({
command: 'reload'
});
} }
}, false, false); }, false, false);
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1001.19378.56731.49920</string> </value> <value> <string>1001.20452.549.2611</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>1656640536.67</float> <float>1656704980.99</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