Commit 7a2c7c2c authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Xiaowu Zhang

erp5_officejs: Fix Panel close

parent 226cedcb
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
.push(function (element) { .push(function (element) {
g.props.element = element; g.props.element = element;
g.props.jelement = $(element.querySelector("div")); g.props.jelement = $(element.querySelector("div"));
g.props.render_deferred = RSVP.defer();
}); });
}) })
...@@ -83,15 +84,23 @@ ...@@ -83,15 +84,23 @@
value = element_list[i].textContent; value = element_list[i].textContent;
push(key, value); push(key, value);
} }
return queue; return queue
.push(function () {
return gadget.props.render_deferred.resolve();
});
}) })
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared services // declared services
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareService(function () { .declareService(function () {
var panel_gadget, var panel_gadget = this;
form_list, return new RSVP.Queue()
.push(function () {
return panel_gadget.props.render_deferred.promise;
})
.push(function () {
var form_list,
event_list, event_list,
i, i,
len; len;
...@@ -101,7 +110,6 @@ ...@@ -101,7 +110,6 @@
panel_gadget.toggle(); panel_gadget.toggle();
} }
panel_gadget = this;
form_list = panel_gadget.props.element.querySelectorAll('form'); form_list = panel_gadget.props.element.querySelectorAll('form');
event_list = []; event_list = [];
...@@ -120,6 +128,7 @@ ...@@ -120,6 +128,7 @@
return RSVP.all(event_list); return RSVP.all(event_list);
}); });
}); });
});
}(window, rJS, Handlebars, jQuery, RSVP, loopEventListener)); }(window, rJS, Handlebars, jQuery, RSVP, loopEventListener));
\ No newline at end of file
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<value> <value>
<tuple> <tuple>
<string>contributor/person_module/1</string> <string>contributor/person_module/1</string>
<string>contributor/person_module/2</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -251,7 +252,7 @@ ...@@ -251,7 +252,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>zope</string> </value> <value> <string>supercedriclen</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -265,7 +266,7 @@ ...@@ -265,7 +266,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>954.32960.61602.49578</string> </value> <value> <string>956.47493.18553.34594</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -283,7 +284,7 @@ ...@@ -283,7 +284,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1476099905.42</float> <float>1484749934.29</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