Commit 4a857ddc authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Worklist: stop using translateHTML

parent bc65ba72
......@@ -29,7 +29,7 @@
</ul>
{{else}}
<div class="worklist-empty">
<h2 data-i18n="All work caught up!">All work caught up!</h2>
<h2>{{empty_text}}</h2>
<img src="gadget_erp5_worklist_empty.svg?format=svg">
</div>
{{/if}}
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.1183.1144.61900</string> </value>
<value> <string>968.5552.51560.44322</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1505133662.18</float>
<float>1530534499.22</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -18,7 +18,7 @@
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
......@@ -53,7 +53,7 @@
.push(function (links) {
var action_list = links.worklist,
query_string,
promise_list = [],
promise_list = [gadget.translate('All work caught up!')],
display_options,
i;
for (i = 0; i < action_list.length; i += 1) {
......@@ -86,19 +86,18 @@
.push(function (result_list) {
var line_list = [],
i;
for (i = 0; i < result_list.length; i += 1) {
for (i = 1; i < result_list.length; i += 1) {
line_list.push({
link: result_list[i][0],
title: result_list[i][1],
count: result_list[i][2]
});
}
return gadget.translateHtml(table_template({
document_list: line_list
}));
})
.push(function (translated_html) {
gadget.element.querySelector('.document_list').innerHTML = translated_html;
gadget.element.querySelector('.document_list').innerHTML =
table_template({
document_list: line_list,
empty_text: result_list[0]
});
});
});
......
......@@ -216,7 +216,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>superkato</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>965.39086.65235.37700</string> </value>
<value> <string>968.41423.51057.42700</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1522751880.06</float>
<float>1530534841.9</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