Permalink
Browse files

Don't show errors unless we have some

  • Loading branch information...
1 parent b72c296 commit 486f5b1adf4425dde35316ba85588d5234658dcc @matterkkila committed Jun 1, 2011
Showing with 9 additions and 6 deletions.
  1. +4 −1 html/static/css/kestrelweb.css
  2. +2 −2 html/static/js/lib.js
  3. +3 −3 templates/content.html
@@ -132,7 +132,10 @@ header label {
border: 0;
font-family: sans-serif,arial,helvetica !important;
}
-#kw_refresh #error_count.error {
+#kw_refresh #errors {
+ display: none;
+}
+#kw_refresh #error_count {
background-color: #e90000 !important;
border: 0;
margin: 0;
@@ -70,11 +70,11 @@ var get_stats = function() {
}
}));
$('#error_count').html(0);
- $('#error_count').removeClass('error');
+ $('#errors').hide();
},
error: function(jqXHR, textStatus, errorThrown) {
$('#error_count').html(parseInt($('#error_count').html()) + 1);
- $('#error_count').addClass('error');
+ $('#errors').show().css('display', 'inline-block');
},
});
};
@@ -13,6 +13,9 @@
</fieldset>
</form>
<form id="kw_refresh">
+ <div id="errors">
+ <span id="error_count">0</span> errors
+ </div>
<fieldset>
<button id="btn_refresh">Pause updates</button>
</fieldset>
@@ -26,9 +29,6 @@
</select>
seconds
</fieldset>
- <div>
- <span id="error_count">0</span> errors
- </div>
</form>
</header>

0 comments on commit 486f5b1

Please sign in to comment.