]> git.wh0rd.org Git - tt-rss.git/commitdiff
rework hotkeys (2)
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 15 May 2008 16:18:29 +0000 (17:18 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 15 May 2008 16:18:29 +0000 (17:18 +0100)
functions.js
help/3.php
tt-rss.css

index ed9a08e5466b9ea17cefd34b2b392a8a59e10d1f..d0169ccb75f19f654754d117e900f015e880c865 100644 (file)
@@ -245,7 +245,7 @@ function hotkey_handler(e) {
 
                if (keycode == 16) return; // ignore lone shift
 
-               if ((keycode == 70 || keycode == 67) && !hotkey_prefix) {
+               if ((keycode == 70 || keycode == 67 || keycode == 71) && !hotkey_prefix) {
                        hotkey_prefix = keycode;
                        debug("KP: PREFIX=" + keycode);
                        return;
@@ -335,14 +335,23 @@ function hotkey_handler(e) {
                                return;
                        }
 
-                       if (keycode == 84) { // t
-                               /* FIXME: edit tags */
-                               return notify_error("Function not implemented");
+                       if (keycode == 84 && shift_key) { // t
+                               var id = getActiveArticleId();
+                               if (id) {
+                                       editArticleTags(id, getActiveFeedId(), isCdmMode());
+                               }
                        }
 
                        if (keycode == 84) { // t
-                               /* FIXME: edit tags */
-                               return notify_error("Function not implemented");
+                               var id = getActiveArticleId();
+                               if (id) {                               
+                                       var cb = document.getElementById("RCHK-" + id);
+
+                                       if (cb) {
+                                               cb.checked = !cb.checked;
+                                               toggleSelectRowById(cb, "RROW-" + id);
+                                       }
+                               }
                        }
 
                        if (keycode == 79) { // o
@@ -411,6 +420,32 @@ function hotkey_handler(e) {
                        }
 
                }
+
+               /* Prefix g */
+
+               if (hotkey_prefix == 71) { // g
+
+                       hotkey_prefix = false;
+
+                       if (keycode == 83) { // s
+                               return viewfeed(-1);
+                       }
+
+                       if (keycode == 80 && shift_key) { // P
+                               return gotoPreferences();
+                       }
+
+                       if (keycode == 80) { // p
+                               return viewfeed(-2);
+                       }
+
+                       if (keycode == 70) { // f
+                               return viewfeed(-3);
+                       }
+
+
+               }
+
 /*
                if (keycode == 48) { // 0
                        return setHotkeyZone(0);
index 28c38e005ebb1af42dda471508f72b84bf46ba34..21331268192bc6a7c4e7303d1e19a8aca12f7490 100644 (file)
                <tr><td class='n'>s</td><td>Toggle starred</td></tr>
                <tr><td class='n'>shift-S</td><td>Toggle published</td></tr>
                <tr><td class='n'>u</td><td>Toggle unread</td></tr>
-               <tr><td class='n'>t</td><td>Edit tags</td></tr>
+               <tr><td class='n'>T</td><td>Edit tags</td></tr>
+
+               <? if (get_pref($link, "COMBINED_DISPLAY_MODE")) { ?>
+                       <tr><td class='n'>t</td><td>Select article under mouse pointer</td></tr>
+               <? } else { ?>
+                       <tr><td class='n'>t</td><td class="insensitive">Select article under mouse pointer <span class="small"></span></td></tr>
+               <? } ?>
+
                <!-- <tr><td class='n'>S</td><td>Edit score</td></tr> -->
        </table>
 
+       <h2>Other actions</h2>
+
+       <table>
+               <tr><td class='n'>c f</td><td>Create filter</td></tr>
+               <tr><td class='n'>c s</td><td>Collapse sidebar</td></tr>
+               <tr><td class='n'>?</td><td>Display this help dialog</td></tr>
+       </table>
+
        </td><td>
 
        <h2>Feed actions</h2>
                <tr><td class='n'>f C</td><td>Mark all feeds as read</td></tr>
        </table>
 
-       <h2>Other actions</h2>
+       <h2>Go to...</h2>
 
        <table>
-               <tr><td class='n'>c f</td><td>Create filter</td></tr>
-               <tr><td class='n'>c s</td><td>Collapse sidebar</td></tr>
-               <tr><td class='n'>?</td><td>Display this help dialog</td></tr>
+               <tr><td class='n'>g s</td><td>Starred articles</td></tr>
+               <tr><td class='n'>g f</td><td>Fresh articles</td></tr>
+               <tr><td class='n'>g p</td><td>Published articles</td></tr>
+               <tr><td class='n'>g P</td><td>Preferences</td></tr>
        </table>
 
+
        </td></tr></table>
 
        <p class="small">Press any key to close this window.</p>
index 14256b610ac543386f736bff7cb6576f87f917ea..a5ab1513515247d2c89c6d95dfb25d2d511073d1 100644 (file)
@@ -674,7 +674,7 @@ span.feed_error {
        color : red;
 }
 
-span.insensitive, div.insensitive, li.insensitive, label.insensitive {
+span.insensitive, div.insensitive, li.insensitive, label.insensitive, td.insensitive {
        color : gray;
 }