summaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-26 13:56:44 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-26 13:56:44 +0200
commitd19824b919289ad63743f27da7861f2422da5baa (patch)
treef99fe4c3dec6382289a0e25dddaeccbdd046cc2f /p/scripts
parent584665eed4dfc1bf31c7557edd96e90b64f90c54 (diff)
Hide read feeds and read categories when in unread mode
https://github.com/marienfressinaud/FreshRSS/issues/430 There are some repeated HTML attributes (`data-unread` and `active`) which could maybe be simplified. If some people do not like this behaviour, we could consider having an option.
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index d0f3c27e9..1cc26f57f 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -69,6 +69,10 @@ function incUnreadsFeed(article, feed_id, nb) {
feed_priority = elem ? str2int(elem.getAttribute('data-priority')) : 0;
if (elem) {
elem.setAttribute('data-unread', numberFormat(feed_unreads + nb));
+ elem = $(elem).closest('li').get(0);
+ if (elem) {
+ elem.setAttribute('data-unread', feed_unreads + nb);
+ }
}
//Update unread: category
@@ -76,6 +80,10 @@ function incUnreadsFeed(article, feed_id, nb) {
feed_unreads = elem ? str2int(elem.getAttribute('data-unread')) : 0;
if (elem) {
elem.setAttribute('data-unread', numberFormat(feed_unreads + nb));
+ elem = $(elem).closest('li').get(0);
+ if (elem) {
+ elem.setAttribute('data-unread', feed_unreads + nb);
+ }
}
//Update unread: all