diff --git a/src/assets/js/app.js b/src/assets/js/app.js index 1b567f9..ac911bf 100644 --- a/src/assets/js/app.js +++ b/src/assets/js/app.js @@ -27,10 +27,11 @@ var App = (function() { if (app.counters.length) { var source = $('#timer-template').html(); + console.log(app.counters); + for (i in app.counters) { if (app.counters[i]) { var c = app.counters[i]; - var $counter = $counters.children('li[data-id="' + c.issue.id + '"]'); if (!$counter.length) { @@ -166,9 +167,8 @@ var App = (function() { if (!$('.issue-time').length) { app.flash('Some forms are not correct.', 'danger'); } else { - app.counters = []; $('#content').empty(); - $('#counters > ul').remove(); + $('#counters > ul').remove(); app.flash('Redmine has been fully updated!', 'info'); @@ -312,7 +312,7 @@ var App = (function() { $('#content').show(); $('#loading').hide(); console.log('Request failed.'); - console.log([uri, type, data]); + console.log([uri, type, data]); app.flash('Request failed.', 'danger'); }, always: function() {}