From a7de14fce1f8a895177465d44b4d90411338f122 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 17 Oct 2005 04:25:44 +0100 Subject: [PATCH] disable feed toolbar catchup button when catchup is not applicable --- feedlist.js | 7 +++++++ tt-rss.js | 7 +++++++ tt-rss.php | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/feedlist.js b/feedlist.js index 2e6497a1a..641bf69e7 100644 --- a/feedlist.js +++ b/feedlist.js @@ -77,6 +77,13 @@ function viewfeed(feed, skip, subop, doc) { disableContainerChildren("headlinesToolbar", false, doc); + var btnMarkAsRead = doc.getElementById("btnMarkFeedAsRead"); + + if (btnMarkAsRead && (feed < 0 || !isNumeric(feed))) { + btnMarkAsRead.disabled = true; + btnMarkAsRead.className = "disabledButton"; + } + // notify(""); } diff --git a/tt-rss.js b/tt-rss.js index 26218889e..a760c4c12 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -276,6 +276,13 @@ function viewfeed(feed, skip, subop) { disableContainerChildren("headlinesToolbar", false, doc); + var btnMarkAsRead = document.getElementById("btnMarkFeedAsRead"); + + if (btnMarkAsRead && (feed < 0 || !isNumeric(feed))) { + btnMarkAsRead.disabled = true; + btnMarkAsRead.className = "disabledButton"; + } + // notify(""); } diff --git a/tt-rss.php b/tt-rss.php index d5271b84f..8a9afd76d 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -110,7 +110,7 @@  Feed: -