]> git.wh0rd.org Git - tt-rss.git/commitdiff
tweak category counter display, new styles: .catCtrNoUnread, .catCtrHasUnread
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 6 Dec 2006 09:11:59 +0000 (10:11 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 6 Dec 2006 09:11:59 +0000 (10:11 +0100)
functions.js
functions.php
tt-rss.css

index c3158e34e228996d6d36944388d0b1d87ab99eb8..a3a46a9c9cd96080bc65cf5960319e2aaa2aa135 100644 (file)
@@ -529,7 +529,12 @@ function parse_counters(reply, scheduled_call) {
                        if (t == "category") {
                                var catctr = document.getElementById("FCATCTR-" + id);
                                if (catctr) {
-                                       catctr.innerHTML = "(" + ctr + " unread)";
+                                       catctr.innerHTML = "(" + ctr + ")";
+                                       if (ctr > 0) {
+                                               catctr.className = "catCtrHasUnread";
+                                       } else {
+                                               catctr.className = "catCtrNoUnread";
+                                       }
                                }
                                continue;
                        }
index c07f95b22792078522255f2d210badf7dbd97a6e..83f37b61905dc7ec002bc9c7b1cc27815504cc0d 100644 (file)
                                        $cat_id = sprintf("%d", $cat_id);
 
                                        $cat_unread = getCategoryUnread($link, $cat_id);
-                                       
+
+                                       $catctr_class = ($cat_unread > 0) ? "catCtrHasUnread" : "catCtrNoUnread";
+
                                        print "<li class=\"feedCat\" id=\"FCAT-$cat_id\">
-                                               <a id=\"FCATN-$cat_id\" href=\"#\" onclick=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category</a>
+                                               <a id=\"FCATN-$cat_id\" href=\"#\"onclick=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category</a>
                                                        <a href=\"#\" onclick=\"javascript:viewCategory($cat_id)\" id=\"FCAP-$cat_id\">
-                                                       <span id=\"FCATCTR-$cat_id\" 
-                                                       class=\"$catctr_class\">($cat_unread unread)</span> $ellipsis
+                                                       <span id=\"FCATCTR-$cat_id\" title=\"Click to browse category\" 
+                                                       class=\"$catctr_class\">($cat_unread)</span> $ellipsis
                                                        </a></li>";
 
                                        // !!! NO SPACE before <ul...feedCatList - breaks firstChild DOM function
index fa99ebfe03f8bcd167788ea33a187ed14f8e2c5a..f610bc248346e3e2f9ffda7681828fcf47844000 100644 (file)
@@ -1313,3 +1313,7 @@ a.feedUpdErrLink {
        display : block;
        margin-bottom : 0.5em;
 }
+
+.catCtrHasUnread {
+       font-weight : bold;
+}