Commit bda7f4cb authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Panel: allow to pass the visible state value to render

parent 6f74c779
...@@ -52,12 +52,16 @@ ...@@ -52,12 +52,16 @@
.declareMethod('render', function render(options) { .declareMethod('render', function render(options) {
var erp5_document = options.erp5_document, var erp5_document = options.erp5_document,
view = options.view, view = options.view,
visible = options.visible,
context = this, context = this,
workflow_list, workflow_list,
view_list, view_list,
action_list, action_list,
i; i;
if (visible === undefined) {
visible = context.state.visible;
}
if (erp5_document !== undefined) { if (erp5_document !== undefined) {
workflow_list = ensureArray(erp5_document._links.action_workflow); workflow_list = ensureArray(erp5_document._links.action_workflow);
view_list = ensureArray(erp5_document._links.action_object_view); view_list = ensureArray(erp5_document._links.action_object_view);
...@@ -89,6 +93,7 @@ ...@@ -89,6 +93,7 @@
return context.getUrlParameter('editable') return context.getUrlParameter('editable')
.push(function (editable) { .push(function (editable) {
return context.changeState({ return context.changeState({
visible: visible,
workflow_list: workflow_list, workflow_list: workflow_list,
view_list: view_list, view_list: view_list,
action_list: action_list, action_list: action_list,
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>967.44748.35225.6109</string> </value> <value> <string>968.5552.51560.44322</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1528370824.8</float> <float>1539942701.69</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