summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.js7
-rw-r--r--functions.php10
-rw-r--r--tt-rss.css4
3 files changed, 16 insertions, 5 deletions
diff --git a/functions.js b/functions.js
index c3158e34e..a3a46a9c9 100644
--- a/functions.js
+++ b/functions.js
@@ -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;
}
diff --git a/functions.php b/functions.php
index c07f95b22..83f37b619 100644
--- a/functions.php
+++ b/functions.php
@@ -2926,12 +2926,14 @@
$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
diff --git a/tt-rss.css b/tt-rss.css
index fa99ebfe0..f610bc248 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -1313,3 +1313,7 @@ a.feedUpdErrLink {
display : block;
margin-bottom : 0.5em;
}
+
+.catCtrHasUnread {
+ font-weight : bold;
+}