summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-23 08:41:36 +0100
committerAndrew Dolgov <[email protected]>2005-11-23 08:41:36 +0100
commit703b632ee95a633f33084ffe6cd5db1017791276 (patch)
treeaaebae42d547655cffeb5eb73c31bbadcd75ef89
parent54d3ba50affc7e48ea4e823c3ece03e3f9033df3 (diff)
feedlist display fixes for category mode
-rw-r--r--backend.php10
-rw-r--r--functions.js22
2 files changed, 23 insertions, 9 deletions
diff --git a/backend.php b/backend.php
index 28e636a42..8987f627c 100644
--- a/backend.php
+++ b/backend.php
@@ -174,7 +174,7 @@
if (get_pref($link, 'ENABLE_FEED_CATS')) {
print "<li class=\"feedCat\">Special</li>";
- print "<ul class=\"feedCatList\">";
+ print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
}
$result = db_query($link, "SELECT count(id) as num_starred
@@ -192,7 +192,7 @@
"images/mark_set.png", $link);
if (get_pref($link, 'ENABLE_FEED_CATS')) {
- print "</ul>";
+ print "</li></ul>";
}
if (get_pref($link, 'ENABLE_LABELS')) {
@@ -203,7 +203,7 @@
if (db_num_rows($result) > 0) {
if (get_pref($link, 'ENABLE_FEED_CATS')) {
print "<li class=\"feedCat\">Labels</li>";
- print "<ul class=\"feedCatList\">";
+ print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
} else {
print "<li><hr></li>";
}
@@ -235,7 +235,7 @@
if (db_num_rows($result) > 0) {
if (get_pref($link, 'ENABLE_FEED_CATS')) {
- print "</ul>";
+ print "</li></ul>";
}
}
@@ -311,7 +311,7 @@
$category = $tmp_category;
print "<li class=\"feedCat\">$category</li>";
- print "<li><ul class=\"feedCatList\">";
+ print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
}
printFeedEntry($feed_id, $class, $feed, $unread,
diff --git a/functions.js b/functions.js
index c7f1b8a64..6aaea8d8e 100644
--- a/functions.js
+++ b/functions.js
@@ -126,11 +126,25 @@ function hotkey_handler(e) {
function cleanSelectedList(element) {
var content = document.getElementById(element);
- for (i = 0; i < content.childNodes.length; i++) {
- content.childNodes[i].className =
- content.childNodes[i].className.replace("Selected", "");
- }
+ if (!document.getElementById("feedCatHolder")) {
+ for (i = 0; i < content.childNodes.length; i++) {
+ var child = content.childNodes[i];
+ child.className = child.className.replace("Selected", "");
+ }
+ } else {
+ for (i = 0; i < content.childNodes.length; i++) {
+ var child = content.childNodes[i];
+
+ if (child.id == "feedCatHolder") {
+ var fcat = child.firstChild;
+ for (j = 0; j < fcat.childNodes.length; j++) {
+ var feed = fcat.childNodes[j];
+ feed.className = feed.className.replace("Selected", "");
+ }
+ }
+ }
+ }
}