]> git.wh0rd.org Git - tt-rss.git/commitdiff
parse_counters: highlight feeds with new articles
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 10 Aug 2007 17:15:24 +0000 (18:15 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 10 Aug 2007 17:15:24 +0000 (18:15 +0100)
functions.js

index 4798c3c20db266034ef254135bcb7c8626ee837a..bcb885ef36b922e0ce28f0509891bafee10f255e 100644 (file)
@@ -686,7 +686,9 @@ function parse_counters(reply, scheduled_call) {
                                if (feedu.innerHTML != ctr && id == getActiveFeedId() && scheduled_call) {
                                        viewCurrentFeed();
                                }
-               
+
+                               var row_needs_hl = (ctr > 0 && ctr > parseInt(feedu.innerHTML));
+
                                feedu.innerHTML = ctr;
 
                                if (error) {
@@ -707,8 +709,12 @@ function parse_counters(reply, scheduled_call) {
                
                                                if (is_selected) {
                                                        feedr.className = feedr.className + "Selected";
-                                               }
-               
+                                               }       
+                                               
+                                       }
+
+                                       if (row_needs_hl) { 
+                                               new Effect.Highlight(feedr, {duration: 0.3, startcolor: "#fff7d5"});
                                        }
                                } else {
                                        feedctr.className = "invisible";