]> git.wh0rd.org - tt-rss.git/commitdiff
disable feed toolbar catchup button when catchup is not applicable
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 17 Oct 2005 03:25:44 +0000 (04:25 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 17 Oct 2005 03:25:44 +0000 (04:25 +0100)
feedlist.js
tt-rss.js
tt-rss.php

index 2e6497a1aac81b1353f57882a9b49a43f445bb09..641bf69e7e8736f5303501e8966fca478d19c4df 100644 (file)
@@ -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("");
 
 }
index 26218889e40b2cdaa95e4050c52f58201906e7d0..a760c4c12c979fb1b5af6e0bb2a3103df6f56b79 100644 (file)
--- 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("");
 
 }
index d5271b84f2108637835c590ff15f39b848d75e19..8a9afd76da403044cd32fc8a2ce181429dcb40cc 100644 (file)
                &nbsp;Feed: <input class="button" type="submit"
                        onclick="javascript:viewCurrentFeed(0, 'ForceUpdate')" value="Update">
 
-               <input class="button" type="submit"
+               <input class="button" type="submit" id="btnMarkFeedAsRead"
                        onclick="javascript:viewCurrentFeed(0, 'MarkAllRead')" value="Mark as read">
 
                </td>