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