]> git.wh0rd.org Git - tt-rss.git/commitdiff
hotkeys: implement a-prefix hotkeys (a i, a u, a a, a n)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 12 Jul 2011 08:25:59 +0000 (12:25 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 12 Jul 2011 08:25:59 +0000 (12:25 +0400)
help/3.php
tt-rss.js

index d48adc6182c2dac60bd813608e40df0a87400b70..7e2f1deefb56eb63ff1123b6d0559c73bdb6bed1 100644 (file)
 
        </td><td valign='top'>
 
+       <h2><?php echo __("Multiple articles actions") ?></h2>
+
+       <table>
+               <tr><td class='n'>a a</td><td><?php echo __("Select all articles") ?></td></tr>
+               <tr><td class='n'>a u</td><td><?php echo __("Select unread articles") ?></td></tr>
+               <tr><td class='n'>a i</td><td><?php echo __("Invert article selection") ?></td></tr>
+               <tr><td class='n'>a n</td><td><?php echo __("Deselect all articles") ?></td></tr>
+       </table>
+
        <h2><?php echo __("Feed actions") ?></h2>
 
        <table>
index 2d657bca15c0ecede74bcac9e5d3df45d9b350c1..1d8d3add8a7e6dc57171f1d9d94cd12766bff49c 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -654,7 +654,7 @@ function hotkey_handler(e) {
                if (keycode == 16) return; // ignore lone shift
                if (keycode == 17) return; // ignore lone ctrl
 
-               if ((keycode == 70 || keycode == 67 || keycode == 71)
+               if ((keycode == 70 || keycode == 67 || keycode == 71 || keycode == 65)
                                && !hotkey_prefix) {
 
                        var date = new Date();
@@ -766,7 +766,6 @@ function hotkey_handler(e) {
                                return;
                        }
 
-
                        if (keycode == 85) { // u
                                selectionToggleUnread(undefined, false, true)
                                return;
@@ -815,6 +814,33 @@ function hotkey_handler(e) {
                        }
                }
 
+               /* Prefix a */
+
+               if (hotkey_prefix == 65) { // a
+                       hotkey_prefix = false;
+
+                       if (keycode == 65) { // a
+                               selectArticles('all');
+                               return;
+                       }
+
+                       if (keycode == 85) { // u
+                               selectArticles('unread');
+                               return;
+                       }
+
+                       if (keycode == 73) { // i
+                               selectArticles('invert');
+                               return;
+                       }
+
+                       if (keycode == 78) { // n
+                               selectArticles('none');
+                               return;
+                       }
+
+               }
+
                /* Prefix f */
 
                if (hotkey_prefix == 70) { // f