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

[erp5_web_renderjs_ui] Logout: remove handlebars dependency

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