From 65f8581478a3fff9b39d9c9a6011f8b0d3225655 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 16 Dec 2005 06:37:18 +0100 Subject: [PATCH] workaround for Uncategorized collapse state, fix pre-collapsed category display in outputFeedList --- backend.php | 12 ++++++++++-- feedlist.js | 6 ++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/backend.php b/backend.php index 024eab30..ec1ffcc2 100644 --- a/backend.php +++ b/backend.php @@ -450,11 +450,19 @@ $collapsed = $line["collapsed"]; + // workaround for NULL category + if ($category == "Uncategorized") { + if ($_COOKIE["ttrss_vf_uclps"] == 1) { + $collapsed = "t"; + } + } + if ($collapsed == "t" || $collapsed == "1") { $holder_class = "invisible"; - $tmp_category .= "..."; + $ellipsis = "..."; } else { $holder_class = ""; + $ellipsis = ""; } if ($cat_id) { @@ -476,7 +484,7 @@ print "
  • $tmp_category ($cat_unread unread)
  • "; + class=\"$catctr_class\">($cat_unread unread)$ellipsis"; // !!! NO SPACE before keyboard navigation, etc. diff --git a/feedlist.js b/feedlist.js index e9310837..52652664 100644 --- a/feedlist.js +++ b/feedlist.js @@ -170,9 +170,15 @@ function toggleCollapseCat(cat) { if (cat_list.className.match("invisible")) { cat_list.className = ""; caption.innerHTML = caption.innerHTML.replace("...", ""); + if (cat == 0) { + setCookie("ttrss_vf_uclps", "0"); + } } else { cat_list.className = "invisible"; caption.innerHTML = caption.innerHTML + "..."; + if (cat == 0) { + setCookie("ttrss_vf_uclps", "1"); + } } xmlhttp_rpc.open("GET", "backend.php?op=feeds&subop=collapse&cid=" + -- 2.39.5