Skip to content

Commit

Permalink
skip adding spinner animation to row cell if no polling needed
Browse files Browse the repository at this point in the history
 * fix bug 962838

Change-Id: I1a8bd23106285ab329e6fd709ede7711d8f2bc71
  • Loading branch information
andycjw committed Mar 23, 2012
1 parent ab71aff commit c1f34e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion horizon/static/horizon/js/horizon.js
Expand Up @@ -117,7 +117,11 @@ var Horizon = function() {
},
success: function (data, textStatus, jqXHR) {
var $new_row = $(data);
$new_row.find("td.status_unknown").prepend('<i class="icon-updating ajax-updating"></i>');
if($new_row.hasClass('status_unknown')) {
// only add spinning animation if row needs update
var spinner = '<i class="icon-updating ajax-updating"></i>';
$new_row.find("td.status_unknown").prepend(spinner);
}
// Only replace row if the html content has changed
if($new_row.html() != $row.html()) {
if($row.find(':checkbox').is(':checked')) {
Expand Down

0 comments on commit c1f34e6

Please sign in to comment.