Commit ef48eaf6 authored by Boris Kocherov's avatar Boris Kocherov

erp5_web_renderjs_ui: doesn't save panel state in launcher.props

because no needs.
and
rename updateHeader and updatePanel to lUpdateHeader lUpdatePanel
for avoiding naming conflict thanks @jerome
parent 9b390ba0
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
}; };
} }
function initPanelOptions(gadget) {
gadget.props.panel_argument_list = {};
}
function route(my_root_gadget, my_scope, my_method, argument_list) { function route(my_root_gadget, my_scope, my_method, argument_list) {
return my_root_gadget.getDeclaredGadget(my_scope) return my_root_gadget.getDeclaredGadget(my_scope)
.push(function (my_gadget) { .push(function (my_gadget) {
...@@ -45,7 +41,7 @@ ...@@ -45,7 +41,7 @@
}); });
} }
function updateHeader(gadget) { function lUpdateHeader(gadget) {
var header_gadget; var header_gadget;
return gadget.getDeclaredGadget("header") return gadget.getDeclaredGadget("header")
.push(function (result) { .push(function (result) {
...@@ -57,10 +53,10 @@ ...@@ -57,10 +53,10 @@
}); });
} }
function updatePanel(gadget) { function lUpdatePanel(gadget, panel_state) {
return gadget.getDeclaredGadget("panel") return gadget.getDeclaredGadget("panel")
.push(function (panel_gadget) { .push(function (panel_gadget) {
return panel_gadget.render(gadget.props.panel_argument_list); return panel_gadget.render(panel_state || {});
}); });
} }
...@@ -472,11 +468,8 @@ ...@@ -472,11 +468,8 @@
}); });
}) })
.allowPublicAcquisition("updatePanel", function (param_list) { .allowPublicAcquisition("updatePanel", function updatePanel(param_list) {
var gadget = this; return lUpdatePanel(this, param_list[0]);
initPanelOptions(gadget);
gadget.props.panel_argument_list = param_list[0];
return updatePanel(gadget);
}) })
.allowPublicAcquisition('hidePanel', function hidePanel(param_list) { .allowPublicAcquisition('hidePanel', function hidePanel(param_list) {
...@@ -594,8 +587,8 @@ ...@@ -594,8 +587,8 @@
element.appendChild(content_container); element.appendChild(content_container);
return RSVP.all([ return RSVP.all([
updateHeader(gadget), lUpdateHeader(gadget),
updatePanel(gadget) lUpdatePanel(gadget)
]); ]);
// XXX Drop notification // XXX Drop notification
// return header_gadget.notifyLoaded(); // return header_gadget.notifyLoaded();
...@@ -610,8 +603,8 @@ ...@@ -610,8 +603,8 @@
}) })
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
updateHeader(gadget), lUpdateHeader(gadget),
updatePanel(gadget) lUpdatePanel(gadget)
]); ]);
}); });
}) })
...@@ -624,7 +617,6 @@ ...@@ -624,7 +617,6 @@
// By default, init the header options to be empty // By default, init the header options to be empty
// (ERP5 title by default + sidebar) // (ERP5 title by default + sidebar)
initHeaderOptions(gadget); initHeaderOptions(gadget);
initPanelOptions(gadget);
return increaseLoadingCounter(gadget) return increaseLoadingCounter(gadget)
.push(function () { .push(function () {
var promise_list = [ var promise_list = [
...@@ -671,4 +663,4 @@ ...@@ -671,4 +663,4 @@
}); });
}(window, document, RSVP, rJS, }(window, document, RSVP, rJS,
XMLHttpRequest, location, console, navigator, ProgressEvent)); XMLHttpRequest, location, console, navigator, ProgressEvent));
\ No newline at end of file
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