Permalink
Browse files

skip adding spinner animation to row cell if no polling needed

 * fix bug 962838

Change-Id: I1a8bd23106285ab329e6fd709ede7711d8f2bc71
  • Loading branch information...
1 parent ab71aff commit c1f34e6145e4c26f618d4c655a6d2ea2897166da @andycjw andycjw committed Mar 23, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 horizon/static/horizon/js/horizon.js
@@ -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')) {

0 comments on commit c1f34e6

Please sign in to comment.