Skip to content

Commit

Permalink
Hide last updates rows if there is nothing to show. Fix evernote/poot…
Browse files Browse the repository at this point in the history
…le#61.
  • Loading branch information
ta2-1 authored and unho committed Apr 22, 2014
1 parent a9d1170 commit 5353ce1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pootle/static/js/stats.js
Expand Up @@ -142,8 +142,14 @@
},

updateLastUpdates: function (stats) {
$('#js-last-updated .last-updated').html(stats.lastupdated.snippet);
$('#js-last-action .last-action').html(stats.lastaction.snippet);
$('#js-last-updated').toggle(stats.lastupdated.snippet != '');
if (stats.lastupdated.snippet) {
$('#js-last-updated .last-updated').html(stats.lastupdated.snippet);
}
$('#js-last-action').toggle(stats.lastaction.snippet != '');
if (stats.lastaction.snippet) {
$('#js-last-action .last-action').html(stats.lastaction.snippet);
}
},

load: function (callback) {
Expand Down

0 comments on commit 5353ce1

Please sign in to comment.