]> git.wh0rd.org Git - tt-rss.git/commitdiff
digest: mark read article on zoom
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 13 Sep 2010 04:56:50 +0000 (08:56 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 13 Sep 2010 04:56:50 +0000 (08:56 +0400)
digest.css
digest.js

index 9041f7416633c71b792c4c0552c42f2d7d7e9fb9..45d502e3b86904f36259bf7c4368633569f44f10 100644 (file)
@@ -207,13 +207,25 @@ a:hover {
        clear : left;
 }
 
-#headlines ul#headlines-content a.title {
+#headlines ul#headlines-content li.unread a.title {
        font-weight : bold;
        font-size : 16px;
        display : block;
        padding-left : 21px;
 }
 
+#headlines ul#headlines-content li.read a.title {
+       font-size : 16px;
+       font-weight : bold;
+       display : block;
+       padding-left : 21px;
+       color : #8DB1D6;
+}
+
+#headlines ul#headlines-content li.read a.title:hover {
+       color : gray;
+}
+
 #headlines ul#headlines-content img#H-LOADING-IMG {
        margin-left : 5px;
 }
index 9828dc7c241107866493ae30507a3ecf1d4838d4..a529db7fd492e8f451964a18cffa31cac8302148 100644 (file)
--- a/digest.js
+++ b/digest.js
@@ -130,6 +130,15 @@ function zoom(elem, article_id) {
 
                                        elem.onclick = false;
                                        elem.style.cursor = "auto";
+
+                                       catchup_article(article_id, 
+                                               function() {                                                    
+                                                       window.clearTimeout(_view_update_timeout);
+                                                       _view_update_timeout = window.setTimeout("view_update()", 500);
+                                                       $("A-" + article_id).className = "read";
+                                       });
+
+
                                } else {
                                        elem.innerHTML = __("Error: unable to load article.");
                                }
@@ -199,7 +208,7 @@ function view(article_id, dismiss_only) {
                catchup_article(article_id, 
                        function() { 
                                window.clearTimeout(_view_update_timeout);
-                               _view_update_timeout = window.setTimeout("view_update()", 1000);
+                               _view_update_timeout = window.setTimeout("view_update()", 500);
                        });
 
                return dismiss_only != true;
@@ -372,7 +381,7 @@ function add_headline_entry(article, feed, no_effects) {
                if (article.excerpt.trim() == "")
                        article.excerpt = __("Click to expand article.");
 
-               var tmp_html = "<li id=\"A-"+article.id+"\" "+style+">" + 
+               var tmp_html = "<li id=\"A-"+article.id+"\" "+style+" class=\"unread\">" + 
                        icon_part +
 
                        "<div class='digest-check'>" +