diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-08-09 14:13:16 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-08-09 14:13:16 -0400 |
commit | 202195c30527a879915d414869c46a0d04522adf (patch) | |
tree | 834fd845a2958e15d0e54f8a21226dabad06f320 | |
parent | 2944bc645a9875e6eadcab7b21df0a97643d82fa (diff) |
shows feeds with unread items in bold
-rw-r--r-- | js/news.js | 4 | ||||
-rw-r--r-- | templates/part.listfeed.php | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/js/news.js b/js/news.js index c583683f6..e485e4a4b 100644 --- a/js/news.js +++ b/js/news.js @@ -181,11 +181,13 @@ News={ currentitem.addClass('title_read'); // decrement counter - var counterplace = $('.feed[data-id="'+feedid+'"]').find('.unreaditemcounter'); + var counterplace = $('li.feed[data-id="'+feedid+'"]').find('.unreaditemcounter'); + var title = $('li.feed[data-id="'+feedid+'"] > a'); var oldcount = counterplace.html(); counterplace.empty(); if (oldcount <= 1) { counterplace.removeClass('nonzero').addClass('zero'); + title.removeClass('nonzero').addClass('zero'); } else { counterplace.append(--oldcount); diff --git a/templates/part.listfeed.php b/templates/part.listfeed.php index 6e988f4df..530ab3ba8 100644 --- a/templates/part.listfeed.php +++ b/templates/part.listfeed.php @@ -10,7 +10,8 @@ if ($favicon == null) { } echo '<li class="feed" data-id="' . $child->getId() . '">'; -echo '<a href="#" style="background: url(' . $favicon . ') left center no-repeat; background-size:16px 16px;">' . $child->getTitle() .'</a>'; +echo '<a href="#" style="background: url(' . $favicon . ') left center no-repeat; background-size:16px 16px;" class="' . + (($unreadItems > 0) ? 'nonzero' : 'zero') . '">' . $child->getTitle() .'</a>'; if ($unreadItems > 0) { echo '<span class="unreaditemcounter nonzero">' . $unreadItems . '</span>'; } |