Replace spin.js with animated gif for updating table rows.
Fixes bug 1035111 Change-Id: Ideccd6090d1ec5fd0830a1468479c3b0edde9800
This commit is contained in:
parent
c779f4c919
commit
dfdb8375de
|
@ -61,13 +61,13 @@ horizon.datatables = {
|
||||||
|
|
||||||
if($new_row.hasClass('status_unknown')) {
|
if($new_row.hasClass('status_unknown')) {
|
||||||
var spinner_elm = $new_row.find("td.status_unknown:last");
|
var spinner_elm = $new_row.find("td.status_unknown:last");
|
||||||
|
// Replacing spin.js here with an animated gif to reduce CPU
|
||||||
// FIXME(gabriel): This style mucking shouldn't be in the javascript.
|
spinner_elm.prepend(
|
||||||
spinner_elm.css('padding-left', '32px');
|
$("<div />")
|
||||||
spinner_elm.spin(horizon.conf.spinner_options.inline);
|
.addClass("loading_gif")
|
||||||
|
.append(
|
||||||
$(spinner_elm.data().spinner.el).css('top', '9px');
|
$("<img />")
|
||||||
$(spinner_elm.data().spinner.el).css('left', '-15px');
|
.attr("src", "/static/dashboard/img/loading.gif")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only replace row if the html content has changed
|
// Only replace row if the html content has changed
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
|
@ -1380,3 +1380,12 @@ label.log-length {
|
||||||
.dropdown_fix {
|
.dropdown_fix {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Replaces CPU hungry spin.js with animated gif */
|
||||||
|
.loading_gif {
|
||||||
|
width: 35px;
|
||||||
|
height: 13px;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-right: 5px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue