From c805b031481d5b53b0f5f9d6d39bc83911709834 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 15 Nov 2013 17:26:22 +0100 Subject: Corrige style bigMarkAsRead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige problème héritage de style pour bigMarkAsRead. Plus détails --- public/scripts/main.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'public/scripts/main.js') diff --git a/public/scripts/main.js b/public/scripts/main.js index 04c1977d5..159bf48b3 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -58,12 +58,16 @@ function mark_read(active, only_not_read) { elem = $('#' + feed_id + ' .feed').get(0), feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0, feed_priority = elem ? (parseInt(elem.getAttribute('data-priority'), 10) || 0) : 0; - elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + if (elem) { + elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + } //Update unread: category elem = $('#' + feed_id).parent().prevAll('.category').children(':first').get(0); feed_unread = elem ? (parseInt(elem.getAttribute('data-unread'), 10) || 0) : 0; - elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + if (elem) { + elem.setAttribute('data-unread', Math.max(0, feed_unread + inc)); + } //Update unread: all if (feed_priority > 0) { @@ -589,8 +593,8 @@ function init_persona() { function init_confirm_action() { $('.confirm').click(function () { - return confirm(str_confirmation); - }); + return confirm(str_confirmation); + }); } function init_all() { -- cgit v1.2.3