]> git.wh0rd.org Git - tt-rss.git/commitdiff
add hotkey to catchup all feeds, add optional warning to catchupAllFeeds()
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 18 Apr 2008 06:27:49 +0000 (07:27 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 18 Apr 2008 06:27:49 +0000 (07:27 +0100)
functions.js
localized_js.php
tt-rss.js

index d30e6bee8ba4f50ad8992c337853d6c5e8c226bd..8f58f35368104dc647152111bbe996b60bc51442 100644 (file)
@@ -347,6 +347,12 @@ function hotkey_handler(e) {
                        }
                }
 
+               if (keycode == 81 && shift_key) { // shift + q
+                       if (typeof catchupAllFeeds != 'undefined') {
+                               return catchupAllFeeds();
+                       }
+               }
+
                if (typeof localHotkeyHandler != 'undefined') {
                        try {
                                return localHotkeyHandler(e);
index fbfdd4123f5e17f55950663a50f50da5c433423f..6c1ff7768273af5e321dbd302534414b541bc3c7 100644 (file)
@@ -130,7 +130,7 @@ print T_js_decl("Publish article");
 print T_js_decl("Unpublish article");
 print T_js_decl("You can't clear this type of feed.");
 print T_js_decl("Erase all non-starred articles in %s?");
-#print T_js_decl(
+print T_js_decl("Mark all articles as read?");
 #print T_js_decl(
 #print T_js_decl(
 #print T_js_decl(
index b7a6fca18363357e4c45971d4e83dd6f1d452630..e165ec1c77360ca8b75593bd6336c1d4007ae059 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -219,20 +219,24 @@ function updateFeedList(silent, fetch) {
 
 function catchupAllFeeds() {
 
-       var query_str = "backend.php?op=feeds&subop=catchupAll";
+       var str = __("Mark all articles as read?");
 
-       notify_progress("Marking all feeds as read...");
+       if (getInitParam("confirm_feed_catchup") != 1 || confirm(str)) {
 
-       debug("catchupAllFeeds Q=" + query_str);
+               var query_str = "backend.php?op=feeds&subop=catchupAll";
 
-       new Ajax.Request(query_str, {
-               onComplete: function(transport) { 
-                       feedlist_callback2(transport); 
-               } });
+               notify_progress("Marking all feeds as read...");
 
-       global_unread = 0;
-       updateTitle("");
+               debug("catchupAllFeeds Q=" + query_str);
 
+               new Ajax.Request(query_str, {
+                       onComplete: function(transport) { 
+                               feedlist_callback2(transport); 
+                       } });
+
+               global_unread = 0;
+               updateTitle("");
+       }
 }
 
 function viewCurrentFeed(subop) {