Commit 910ebf35 authored by Mukul's avatar Mukul

[erp5_officejs] Prevents ojs_controller to remove child gadget from DOM if not changed.

parent 94df7891
......@@ -60,10 +60,18 @@
});
});
})
.onStateChange(function () {
.onStateChange(function (modification_dict) {
var fragment = document.createElement('div'),
gadget = this;
if (!modification_dict.hasOwnProperty('child_gadget_url')) {
return gadget.getDeclaredGadget('fg')
.push(function (child_gadget) {
return child_gadget.render({
jio_key: modification_dict.jio_key,
doc: modification_dict.doc
});
});
}
// Clear first to DOM, append after to reduce flickering/manip
while (this.element.firstChild) {
this.element.removeChild(this.element.firstChild);
......
......@@ -213,7 +213,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -227,7 +227,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.45561.47559.9591</string> </value>
<value> <string>967.6014.60137.10240</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>1515602403.02</float>
<float>1524650935.99</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