Commit 82698cbd authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Simplify relation string field

parent c9402a2f
...@@ -3,19 +3,7 @@ ...@@ -3,19 +3,7 @@
(function (window, rJS) { (function (window, rJS) {
"use strict"; "use strict";
rJS(window) rJS(window)
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.ready(function (my_gadget) {
my_gadget.props = {};
return my_gadget.getDeclaredGadget("relation_input")
.push(function (relation_input_gadget) {
my_gadget.props.relation_input_gadget = relation_input_gadget;
});
})
.allowPublicAcquisition("addRelationInput", function () { .allowPublicAcquisition("addRelationInput", function () {
return; return;
}) })
...@@ -23,12 +11,16 @@ ...@@ -23,12 +11,16 @@
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareMethod('render', function (options) { .declareMethod('render', function (options) {
return this.props.relation_input_gadget.render(options, { return this.getDeclaredGadget("relation_input")
index: 0 .push(function (gadget) {
}); return gadget.render(options, {index: 0});
});
}) })
.declareMethod('getContent', function (options) { .declareMethod('getContent', function (options) {
return this.props.relation_input_gadget.getContent(options); return this.getDeclaredGadget("relation_input")
.push(function (gadget) {
return gadget.getContent(options);
});
}); });
}(window, rJS)); }(window, rJS));
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>952.57684.18946.52326</string> </value> <value> <string>954.45675.44850.53452</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>1469806154.16</float> <float>1477037965.54</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