Commit 7881c2b0 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Logout: remove handlebars dependency

parent eca65602
......@@ -13,24 +13,20 @@
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<script id="form-template" type="text/x-handlebars-template">
<!-- custom script -->
<script src="gadget_erp5_page_logout.js" type="text/javascript"></script>
</head>
<body>
<article>
<section>
<form>
<input type="submit" value="{{button_text}}" />
<input type="submit" />
</form>
</section>
</article>
</script>
<!-- custom script -->
<script src="gadget_erp5_page_logout.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>970.13790.51027.29644</string> </value>
<value> <string>971.52441.15467.16503</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1537198030.99</float>
<float>1542905896.75</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, UriTemplate, Handlebars */
/*global window, rJS, UriTemplate */
/*jslint indent: 2, maxerr: 3, nomen: true */
(function (window, rJS, UriTemplate, Handlebars) {
(function (window, rJS, UriTemplate) {
"use strict";
var gadget_klass = rJS(window),
form_template = Handlebars.compile(
gadget_klass.__template_element
.getElementById("form-template")
.innerHTML
);
gadget_klass
rJS(window)
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
......@@ -45,9 +38,7 @@
return gadget.translate('Confirm');
})
.push(function (translated_text) {
gadget.element.innerHTML = form_template({
button_text: translated_text
});
gadget.element.querySelector('input').value = translated_text;
});
})
......@@ -76,4 +67,4 @@
.declareMethod("triggerSubmit", function () {
return;
});
}(window, rJS, UriTemplate, Handlebars));
\ No newline at end of file
}(window, rJS, UriTemplate));
\ No newline at end of file
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>968.45482.36373.28842</string> </value>
<value> <string>971.7721.48108.61320</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1536227235.47</float>
<float>1542905890.66</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