Commit 8b40ecdf authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Worklist: simplify code

parent 19937c97
......@@ -14,26 +14,9 @@
table_template = Handlebars.compile(source);
gadget_klass
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (g) {
g.props = {};
})
// Assign the element to a variable
.ready(function (g) {
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod("updateHeader", "updateHeader")
......@@ -101,7 +84,7 @@
})
.push(function (my_translated_html) {
gadget.props.element.querySelector('.document_list').innerHTML =
gadget.element.querySelector('.document_list').innerHTML =
my_translated_html;
});
});
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>947.21012.16488.34935</string> </value>
<value> <string>954.47218.14887.48486</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1448376284.81</float>
<float>1476956693.83</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