Commit 08512b1c authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Set the listbox loader next to its title

parent 969eb88e
......@@ -4,7 +4,6 @@
<!--
data-i18n=No records
data-i18n=Records
data-i18n=Searching
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
......@@ -150,7 +149,7 @@
<script id="listbox-template" type="text/x-handlebars-template">
<div class="ui-table-header ui-header ui-bar-c ui-corner-all">
<h1 data-i18n="{{title}}" class="ui-title ui-override-theme">{{title}}</h1>
<h1 data-i18n="{{title}}" class="ui-title ui-override-theme">{{title}}<span> <span class="listboxloader ui-icon-spinner ui-btn-icon-left"></span></span></h1>
<!--div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls"-->
<button data-rel="hide" data-i18n="Hide Rows" name="Hide" type="submit" class="submit responsive ui-last-child ui-btn ui-icon-eye ui-btn-icon-left {{hide_class}}">Hide Rows</button>
......@@ -164,7 +163,7 @@
</div>
<table class="ui-responsive ui-body-c ui-table-inset">
<thead class="ui-bar-inherit thead"></thead>
<tbody><tr><td colspan="1" data-i18n="Searching" class="ui-icon-spinner ui-btn-icon-left">Searching</td></tr></tbody>
<tbody></tbody>
<tfoot class="ui-bar-inherit tfoot"></tfoot>
</table>
</div>
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>957.55104.33212.52821</string> </value>
<value> <string>957.57984.47063.18944</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1488881000.24</float>
<float>1489052266.08</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -318,6 +318,8 @@
dataset,
counter,
limit_options,
loading_element_classList = gadget.element.querySelector(".listboxloader").classList,
loading_class_list = ['ui-icon-spinner', 'ui-btn-icon-left'],
i;
if (only_cancel) {
......@@ -353,6 +355,7 @@
} else {
limit_options = [begin_from, lines + 1];
}
loading_element_classList.add.apply(loading_element_classList, loading_class_list);
return gadget.jio_allDocs({
// XXX Not jIO compatible, but until a better api is found...
......@@ -471,6 +474,7 @@
return renderListboxTfoot(gadget);
})
.push(function (my_html) {
loading_element_classList.remove.apply(loading_element_classList, loading_class_list);
gadget.element.querySelector(".tfoot").innerHTML = my_html;
});
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.15532.4001.22118</string> </value>
<value> <string>957.57991.29866.61081</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1482835694.43</float>
<float>1489052755.84</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