From ca8e3d75f4ef8feeace4a39d8a42c9f9c13f13e4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Nov 2010 15:55:51 +0300 Subject: use multiple classes to mark statuses, JS code cleanup --- functions.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 00d2dcf20..44f5af4dc 100644 --- a/functions.php +++ b/functions.php @@ -1679,7 +1679,7 @@ if (!$feed_title) $feed_title = getFeedTitle($link, $feed_id, false); if (!$unread) $unread = getFeedUnread($link, $feed_id); - if ($unread > 0) $class .= "Unread"; + if ($unread > 0) $class .= " Unread"; if (!$icon_file) $icon_file = getFeedIcon($feed_id); @@ -1730,9 +1730,9 @@ print "$feed"; if ($unread != 0) { - $fctr_class = "class=\"feedCtrHasUnread\""; + $fctr_class = "class=\"feedCtr Unread\""; } else { - $fctr_class = "class=\"feedCtrNoUnread\""; + $fctr_class = "class=\"feedCtr\""; } print " @@ -4273,7 +4273,7 @@ $collapse_pic = "cat-collapse.png"; } - $catctr_class = ($cat_unread > 0) ? "catCtrHasUnread" : "catCtrNoUnread"; + $catctr_class = ($cat_unread > 0) ? "catCtr Unread" : "catCtr"; if ($can_browse) { $browse_cat_link = "onclick=\"javascript:viewCategory($cat_id)\""; @@ -4452,7 +4452,7 @@ } if ($actid == $feed_id) { - $class .= "Selected"; + $class .= " Selected"; } $total_unread += $unread; @@ -5123,7 +5123,7 @@ } if ($line["unread"] == "t" || $line["unread"] == "1") { - $class .= "Unread"; + $class .= " Unread"; ++$num_unread; $is_unread = true; } else { @@ -5313,12 +5313,6 @@ } } - if ($is_unread) { - $add_class = "Unread"; - } else { - $add_class = ""; - } - $expand_cdm = get_pref($link, 'CDM_EXPANDED'); $mouseover_attrs = "onmouseover='postMouseIn($id)' @@ -5344,7 +5338,7 @@ print ""; print ""; + 'RROW-$id')\" id=\"RCHK-$id\"/>"; print "$marked_pic"; print "$published_pic"; -- cgit v1.2.3