From fe14aeb84c58141ca1fb4acde3fd6082c95a80c9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 13 Dec 2005 09:53:56 +0100 Subject: [PATCH] collapsable categories --- backend.php | 29 ++++++++++++++++++++++++++--- feedlist.js | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ tt-rss.css | 8 ++++++++ tt-rss.js | 1 - 4 files changed, 83 insertions(+), 4 deletions(-) diff --git a/backend.php b/backend.php index 97b5c519..e8e4f992 100644 --- a/backend.php +++ b/backend.php @@ -372,7 +372,10 @@ AND ttrss_user_entries.ref_id = ttrss_entries.id AND owner_uid = '$owner_uid') as unread, (SELECT title FROM ttrss_feed_categories - WHERE id = cat_id) AS category + WHERE id = cat_id) AS category, + cat_id, + (SELECT collapsed FROM ttrss_feed_categories + WHERE id = cat_id) AS collapsed FROM ttrss_feeds WHERE owner_uid = '$owner_uid' ORDER BY $order_by_qpart"); $actid = $_GET["actid"]; @@ -395,6 +398,8 @@ $total = $line["total"]; $unread = $line["unread"]; + $cat_id = $line["cat_id"]; + $tmp_category = $line["category"]; if (!$tmp_category) { @@ -420,9 +425,19 @@ } $category = $tmp_category; + + $collapsed = $line["collapsed"]; + + if ($collapsed == "t" || $collapsed == "1") { + $holder_class = "invisible"; + $tmp_category .= "..."; + } else { + $holder_class = ""; + } - print "
  • $category
  • "; - print "