tweak category counter display, new styles: .catCtrNoUnread, .catCtrHasUnread

This commit is contained in:
Andrew Dolgov 2006-12-06 10:11:59 +01:00
parent 3ac2f3c767
commit 67dabe1a86
3 changed files with 16 additions and 5 deletions

View File

@ -529,7 +529,12 @@ function parse_counters(reply, scheduled_call) {
if (t == "category") { if (t == "category") {
var catctr = document.getElementById("FCATCTR-" + id); var catctr = document.getElementById("FCATCTR-" + id);
if (catctr) { if (catctr) {
catctr.innerHTML = "(" + ctr + " unread)"; catctr.innerHTML = "(" + ctr + ")";
if (ctr > 0) {
catctr.className = "catCtrHasUnread";
} else {
catctr.className = "catCtrNoUnread";
}
} }
continue; continue;
} }

View File

@ -2927,11 +2927,13 @@
$cat_unread = getCategoryUnread($link, $cat_id); $cat_unread = getCategoryUnread($link, $cat_id);
$catctr_class = ($cat_unread > 0) ? "catCtrHasUnread" : "catCtrNoUnread";
print "<li class=\"feedCat\" id=\"FCAT-$cat_id\"> 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\"> <a href=\"#\" onclick=\"javascript:viewCategory($cat_id)\" id=\"FCAP-$cat_id\">
<span id=\"FCATCTR-$cat_id\" <span id=\"FCATCTR-$cat_id\" title=\"Click to browse category\"
class=\"$catctr_class\">($cat_unread unread)</span> $ellipsis class=\"$catctr_class\">($cat_unread)</span> $ellipsis
</a></li>"; </a></li>";
// !!! NO SPACE before <ul...feedCatList - breaks firstChild DOM function // !!! NO SPACE before <ul...feedCatList - breaks firstChild DOM function

View File

@ -1313,3 +1313,7 @@ a.feedUpdErrLink {
display : block; display : block;
margin-bottom : 0.5em; margin-bottom : 0.5em;
} }
.catCtrHasUnread {
font-weight : bold;
}