From 1a66d16e4689d827268455c28aa3aee8d46b9cb1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 7 Sep 2005 04:53:29 +0100 Subject: [PATCH] scrollable feedlist (iframe) --- TODO | 1 - backend.php | 33 ++++++--- feedlist.js | 89 ++++++++++++++++++++++++ functions.js | 8 ++- tt-rss.css | 23 ++++--- tt-rss.js | 186 ++++++++++++--------------------------------------- tt-rss.php | 4 +- viewfeed.js | 4 +- 8 files changed, 181 insertions(+), 167 deletions(-) create mode 100644 feedlist.js diff --git a/TODO b/TODO index 6c829ea1..bfdd8182 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ - better error handling - better keyboard navigation -- add another iframe for scrollable feedlist Mysterious Future diff --git a/backend.php b/backend.php index 8ed16ee5..bb8f8653 100644 --- a/backend.php +++ b/backend.php @@ -23,6 +23,14 @@ function outputFeedList($link) { + print " + Tiny Tiny RSS : Feedlist + + + + + "; + $result = pg_query($link, "SELECT *, (SELECT count(id) FROM ttrss_entries WHERE feed_id = ttrss_feeds.id) AS total, @@ -30,7 +38,9 @@ WHERE feed_id = ttrss_feeds.id AND unread = true) as unread FROM ttrss_feeds ORDER BY title"); - print ""; + $actid = $_GET["actid"]; + + print "
"; $lnum = 0; @@ -50,6 +60,10 @@ if ($unread > 0) $class .= "Unread"; + if ($actid == $feed_id) { + $class .= "Selected"; + } + $total_unread += $unread; print ""; @@ -92,6 +106,7 @@ print "
"; print "
$total_unread
"; + print "
$actid
"; /* print "

All feeds: @@ -104,6 +119,7 @@ print "

$total_unread
"; */ + } @@ -144,12 +160,10 @@ if ($subop == "forceUpdateAllFeeds") { update_all_feeds($link, true); - outputFeedList($link); } if ($subop == "updateAllFeeds") { update_all_feeds($link, false); - outputFeedList($link); } if ($subop == "catchupPage") { @@ -264,7 +278,7 @@ // FIXME: check for null value here - $result = pg_query("SELECT *,SUBSTRING(last_updated,1,16) as last_updated, + $result = pg_query("SELECT *,SUBSTRING(last_updated,1,16) as last_updated_s, EXTRACT(EPOCH FROM NOW()) - EXTRACT(EPOCH FROM last_updated) as update_timeout FROM ttrss_feeds WHERE id = '$feed'"); @@ -273,7 +287,8 @@ $line = pg_fetch_assoc($result); if ($subop == "ForceUpdate" || - (!$subop && $line["update_timeout"] > MIN_UPDATE_TIME)) { + $line["last_updated"] == "" || + $line["update_timeout"] > MIN_UPDATE_TIME) { update_rss_feed($link, $line["feed_url"], $feed); @@ -422,9 +437,11 @@ print "