Commit d00a76b4 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Allow the page relation search to be rendered multiple time

parent dbd0e899
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<script src="renderjs.js" type="text/javascript"></script> <script src="renderjs.js" type="text/javascript"></script>
<!-- custom script --> <!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_page_relation_search.js" type="text/javascript"></script> <script src="gadget_erp5_page_relation_search.js" type="text/javascript"></script>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>950.53250.43607.26129</string> </value> <value> <string>952.64761.25287.18397</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1461848814.52</float> <float>1475744547.02</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS */
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, RSVP, Handlebars, loopEventListener*/ /*global window, rJS, RSVP, Handlebars*/
(function (window, rJS, RSVP, Handlebars, loopEventListener) { (function (window, rJS, RSVP, Handlebars) {
"use strict"; "use strict";
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
...@@ -130,25 +129,18 @@ ...@@ -130,25 +129,18 @@
return gadget.triggerSubmit.apply(gadget, argument_list); return gadget.triggerSubmit.apply(gadget, argument_list);
}); });
}) })
.declareService(function () { .onEvent('change', function (evt) {
var gadget = this, var target = evt.target,
select = gadget.props.element.querySelector("select"); value;
if (select) { if (target.nodeName === 'SELECT') {
return loopEventListener( value = target.options[target.selectedIndex].value;
select, return this.redirect({
'change', command: 'change',
false, options: {
function (event) { select_template: value
var target = event.target,
value = target.options[target.selectedIndex].value;
return gadget.redirect({
command: 'change',
options: {
select_template: value
}
});
} }
); });
} }
}); });
}(window, rJS, RSVP, Handlebars, loopEventListener));
\ No newline at end of file }(window, rJS, RSVP, Handlebars));
\ No newline at end of file
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>951.48046.6494.25736</string> </value> <value> <string>954.27036.35871.42001</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1466092941.35</float> <float>1475744573.87</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