]> git.wh0rd.org Git - tt-rss.git/commitdiff
misc fixes, rework hotkeys code placement
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 16 May 2008 01:38:32 +0000 (02:38 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 16 May 2008 01:38:32 +0000 (02:38 +0100)
functions.js
prefs.php
tt-rss.css
tt-rss.js
viewfeed.js

index d0169ccb75f19f654754d117e900f015e880c865..010889cab4a9580fb32af51eb7345862b7d325e5 100644 (file)
@@ -1,7 +1,6 @@
 var hotkeys_enabled = true;
 var debug_mode_enabled = false;
 var xmlhttp_rpc = Ajax.getTransport();
-var hotkey_prefix = false;
 var hotkey_zone = 0;
 
 /* add method to remove element from array */
@@ -209,428 +208,6 @@ function printLockingError() {
        notify_info("Please wait until operation finishes.");
 }
 
-function hotkey_handler(e) {
-
-       try {
-
-               var keycode;
-               var shift_key = false;
-
-               var feedlist = document.getElementById('feedList');
-
-               try {
-                       shift_key = e.shiftKey;
-               } catch (e) {
-
-               }
-       
-               if (window.event) {
-                       keycode = window.event.keyCode;
-               } else if (e) {
-                       keycode = e.which;
-               }
-
-               if (keycode == 27) { // escape
-                       if (Element.visible("hotkey_help_overlay")) {
-                               Element.hide("hotkey_help_overlay");
-                       }
-                       hotkey_prefix = false;
-                       closeInfoBox();
-               } 
-
-               if (!hotkeys_enabled) {
-                       debug("hotkeys disabled");
-                       return;
-               }
-
-               if (keycode == 16) return; // ignore lone shift
-
-               if ((keycode == 70 || keycode == 67 || keycode == 71) && !hotkey_prefix) {
-                       hotkey_prefix = keycode;
-                       debug("KP: PREFIX=" + keycode);
-                       return;
-               }
-
-               if (Element.visible("hotkey_help_overlay")) {
-                       Element.hide("hotkey_help_overlay");
-               }
-
-               /* Global hotkeys */
-
-               if (!hotkey_prefix) {
-
-                       if (keycode == 68 && shift_key) { // d
-                               if (!debug_mode_enabled) {
-                                       document.getElementById('debug_output').style.display = 'block';
-                                       debug('debug mode activated');
-                               } else {
-                                       document.getElementById('debug_output').style.display = 'none';
-                               }
-       
-                               debug_mode_enabled = !debug_mode_enabled;
-                               return;
-                       }
-       
-                       if (keycode == 191 && shift_key) { // ?
-                               if (!Element.visible("hotkey_help_overlay")) {
-                                       Element.show("hotkey_help_overlay");
-                               } else {
-                                       Element.hide("hotkey_help_overlay");
-                               }
-                               return;
-                       }
-       
-                       if (keycode == 191) { // /
-                               return displayDlg("search", getActiveFeedId());
-                       }
-
-                       if (keycode == 74) { // j
-                               var feed = getActiveFeedId();
-                               var new_feed = getRelativeFeedId(feedlist, feed, 'prev');
-                               if (new_feed) viewfeed(new_feed, '');
-                               return;
-                       }
-       
-                       if (keycode == 75) { // k
-                               var feed = getActiveFeedId();
-                               var new_feed = getRelativeFeedId(feedlist, feed, 'next');
-                               if (new_feed) viewfeed(new_feed, '');
-                               return;
-                       }
-
-                       if (keycode == 78 || keycode == 40) { // n, down
-                               if (typeof moveToPost != 'undefined') {
-                                       return moveToPost('next');
-                               }
-                       }
-       
-                       if (keycode == 80 || keycode == 38) { // p, up
-                               if (typeof moveToPost != 'undefined') {
-                                       return moveToPost('prev');
-                               }
-                       }
-
-                       if (keycode == 83 && shift_key) { // S
-                               var id = getActiveArticleId();
-                               if (id) {                               
-                                       togglePub(id);
-                               }
-                               return;
-                       }
-
-                       if (keycode == 83) { // s
-                               var id = getActiveArticleId();
-                               if (id) {                               
-                                       toggleMark(id);
-                               }
-                               return;
-                       }
-
-
-                       if (keycode == 85) { // u
-                               var id = getActiveArticleId();
-                               if (id) {                               
-                                       toggleUnread(id);
-                               }
-                               return;
-                       }
-
-                       if (keycode == 84 && shift_key) { // t
-                               var id = getActiveArticleId();
-                               if (id) {
-                                       editArticleTags(id, getActiveFeedId(), isCdmMode());
-                               }
-                       }
-
-                       if (keycode == 84) { // t
-                               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
-                               if (getActiveArticleId()) {
-                                       openArticleInNewWindow(getActiveArticleId());
-                               }
-                       }
-
-               }
-
-               /* Prefix f */
-
-               if (hotkey_prefix == 70) { // f 
-
-                       hotkey_prefix = false;
-
-                       if (keycode == 65) { // a
-                               return toggleDispRead();
-                       }
-
-                       if (keycode == 85 && shift_key) { // r
-                               return scheduleFeedUpdate(true);
-                       }
-
-                       if (keycode == 85) { // u
-                               if (getActiveFeedId()) {
-                                       return viewfeed(getActiveFeedId(), "ForceUpdate");
-                               }
-                       }
-
-                       if (keycode == 69) { // e
-                               return editFeedDlg(getActiveFeedId());
-                       }
-
-                       if (keycode == 83) { // s
-                               return displayDlg("quickAddFeed");
-                       }
-
-                       if (keycode == 67 && shift_key) { // C
-                               if (typeof catchupAllFeeds != 'undefined') {
-                                       return catchupAllFeeds();
-                               }
-                       }
-
-                       if (keycode == 67) { // c
-                               if (getActiveFeedId()) {
-                                       return catchupCurrentFeed();
-                               }
-                       }
-
-               }
-
-               /* Prefix c */
-
-               if (hotkey_prefix == 67) { // c
-                       hotkey_prefix = false;
-
-                       if (keycode == 70) { // f
-                               return displayDlg("quickAddFilter", getActiveFeedId()); 
-                       }
-
-                       if (keycode == 83) { // s
-                               if (typeof collapse_feedlist != 'undefined') {
-                                       return collapse_feedlist();
-                               }
-                       }
-
-               }
-
-               /* 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);
-               }
-
-               if (keycode == 49) { // 1
-                       return setHotkeyZone(1);
-               }
-
-               if (keycode == 50) { // 2
-                       return setHotkeyZone(2);
-               }
-
-               if (keycode == 51) { // 3
-                       return setHotkeyZone(3);
-               }
-
-               if (keycode == 82) { // r
-                       return scheduleFeedUpdate(true);
-               }
-
-               if (keycode == 83) { // s
-                       return displayDlg("search", getActiveFeedId());
-               }
-
-               if (keycode == 85) { // u
-                       if (getActiveFeedId()) {
-                               return viewfeed(getActiveFeedId(), "ForceUpdate");
-                       }
-               }
-       
-               if (keycode == 65) { // a
-                       return toggleDispRead();
-               }
-       
-               var feedlist = document.getElementById('feedList');
-       
-               if (keycode == 74) { // j
-                       var feed = getActiveFeedId();
-                       var new_feed = getRelativeFeedId(feedlist, feed, 'prev');
-                       if (new_feed) viewfeed(new_feed, '');
-               }
-       
-               if (keycode == 75) { // k
-                       var feed = getActiveFeedId();
-                       var new_feed = getRelativeFeedId(feedlist, feed, 'next');
-                       if (new_feed) viewfeed(new_feed, '');
-               }
-
-               if (shift_key && (keycode == 78 || keycode == 40)) { // shift - n, down
-                       return catchupRelativeToArticle(1);
-               }
-
-               if (shift_key && (keycode == 80 || keycode == 38)) { // shift - p, up
-                       return catchupRelativeToArticle(0);                     
-               }
-
-               if (keycode == 78 || keycode == 40) { // n, down
-                       if (typeof moveToPost != 'undefined') {
-                               return moveToPost('next');
-                       }
-               }
-       
-               if (keycode == 80 || keycode == 38) { // p, up
-                       if (typeof moveToPost != 'undefined') {
-                               return moveToPost('prev');
-                       }
-               }
-               
-               if (keycode == 68 && shift_key) { // d
-                       if (!debug_mode_enabled) {
-                               document.getElementById('debug_output').style.display = 'block';
-                               debug('debug mode activated');
-                       } else {
-                               document.getElementById('debug_output').style.display = 'none';
-                       }
-
-                       debug_mode_enabled = !debug_mode_enabled;
-               }
-
-               if (keycode == 191 && shift_key) { // ?
-                       if (!Element.visible("hotkey_help_overlay")) {
-                               Element.show("hotkey_help_overlay");
-                       } else {
-                               Element.hide("hotkey_help_overlay");
-                       }
-               }
-
-               if (keycode == 69 && shift_key) { // e
-                       return editFeedDlg(getActiveFeedId());
-               }
-
-               if (keycode == 70 && shift_key) { // f
-                       if (getActiveFeedId()) {
-                               return catchupCurrentFeed();
-                       }
-               }
-
-               if (keycode == 80 && shift_key) { // p 
-                       if (getActiveFeedId()) {
-                               return catchupPage();
-                       }
-               }
-
-               if (keycode == 86) { // v
-                       if (getActiveArticleId()) {
-                               openArticleInNewWindow(getActiveArticleId());
-                       }
-               }
-
-               if (keycode == 84) { // t
-
-                       var id = getActiveArticleId();
-
-                       if (id) {                               
-
-                               var cb = document.getElementById("RCHK-" + id);
-
-                               if (cb) {
-                                       cb.checked = !cb.checked;
-                                       toggleSelectRowById(cb, "RROW-" + id);
-                               }
-                       }
-               }
-
-               if (keycode == 67) { // c
-                       var id = getActiveArticleId();
-
-                       if (id) {                               
-                               toggleUnread(id, 0);
-                       }
-               }
-
-               if (keycode == 67 && shift_key) { // c
-                       if (typeof collapse_feedlist != 'undefined') {
-                               return collapse_feedlist();
-                       }
-               }
-
-               if (keycode == 81 && shift_key) { // shift + q
-                       if (typeof catchupAllFeeds != 'undefined') {
-                               return catchupAllFeeds();
-                       }
-               }
-
-               if (keycode == 73 && shift_key) { // shift + i
-                       if (document.getElementById("subtoolbar_search")) {
-                               if (Element.visible("subtoolbar_search")) {
-                                       Element.hide("subtoolbar_search");
-                                       Element.show("subtoolbar_ftitle");
-                                       setTimeout("Element.focus('subtoolbar_search_box')", 100);
-                               } else {
-                                       Element.show("subtoolbar_search");
-                                       Element.hide("subtoolbar_ftitle");
-                               }
-                       }
-               }
-
-               if (keycode == 27) { // escape
-                       if (Element.visible("hotkey_help_overlay")) {
-                               Element.hide("hotkey_help_overlay");
-                       }
-               } */
-
-               if (typeof localHotkeyHandler != 'undefined') {
-                       try {
-                               return localHotkeyHandler(e);
-                       } catch (e) {
-                               exception_error("hotkey_handler, local:", e);
-                       }
-               }
-
-               if (hotkey_prefix) {
-                       debug("KP: PREFIX=" + hotkey_prefix + " CODE=" + keycode);
-
-               } else {
-                       debug("KP: CODE=" + keycode);
-               }
-
-
-       } catch (e) {
-               exception_error("hotkey_handler", e);
-       }
-}
-
 function cleanSelectedList(element) {
        var content = document.getElementById(element);
 
index d328beaf48f1a9a57f642cabfcb773a03edf7267..bf58aa3bd9def4cf69608b91d66efbf92c63021c 100644 (file)
--- a/prefs.php
+++ b/prefs.php
 
 <img id="piggie" src="images/piggie.png" style="display : none" alt="piggie">
 
+<div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
+       <?php include "help/4.php" ?>
+</div>
+
 <script type="text/javascript">
 if (document.addEventListener) {
        document.addEventListener("DOMContentLoaded", init, null);
index 73db3b4a094666111ebd56926fd0162a4adde928..fc7aa94c8d660eb40fef3b86b38ca724ab4c966a 100644 (file)
@@ -1796,10 +1796,9 @@ div#hotkey_help_overlay {
        right : 15%;
        top : 15%;
        z-index : 999;
-       padding : 1em;
        background : url("images/shadow_dark.png");
+       padding : 1em;
        color : white;
-       border : 1px solid black;
        font-size : 12pt;
 }
 
@@ -1839,3 +1838,5 @@ div#hotkey_help_overlay h2 {
        text-align : center;
        color : #88b0f0;
 }
+
+
index a8a54fb4c72e4b05f494a2ac063ad6da846f3ef8..3e691245df4673006f946cfb51ae84064b65349c 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -14,7 +14,7 @@ var active_feed_is_cat = false;
 var number_of_feeds = 0;
 var sanity_check_done = false;
 var _hfd_scrolltop = 0;
-
+var hotkey_prefix = false;
 var init_params = new Object();
 
 function tagsAreDisplayed() {
@@ -900,4 +900,426 @@ function rescoreCurrentFeed() {
        }
 }
 
+function hotkey_handler(e) {
+
+       try {
+
+               var keycode;
+               var shift_key = false;
+
+               var feedlist = document.getElementById('feedList');
+
+               try {
+                       shift_key = e.shiftKey;
+               } catch (e) {
+
+               }
+       
+               if (window.event) {
+                       keycode = window.event.keyCode;
+               } else if (e) {
+                       keycode = e.which;
+               }
+
+               if (keycode == 27) { // escape
+                       if (Element.visible("hotkey_help_overlay")) {
+                               Element.hide("hotkey_help_overlay");
+                       }
+                       hotkey_prefix = false;
+                       closeInfoBox();
+               } 
+
+               if (!hotkeys_enabled) {
+                       debug("hotkeys disabled");
+                       return;
+               }
+
+               if (keycode == 16) return; // ignore lone shift
+
+               if ((keycode == 70 || keycode == 67 || keycode == 71) && !hotkey_prefix) {
+                       hotkey_prefix = keycode;
+                       debug("KP: PREFIX=" + keycode);
+                       return;
+               }
+
+               if (Element.visible("hotkey_help_overlay")) {
+                       Element.hide("hotkey_help_overlay");
+               }
+
+               /* Global hotkeys */
+
+               if (!hotkey_prefix) {
+
+                       if (keycode == 68 && shift_key) { // d
+                               if (!debug_mode_enabled) {
+                                       document.getElementById('debug_output').style.display = 'block';
+                                       debug('debug mode activated');
+                               } else {
+                                       document.getElementById('debug_output').style.display = 'none';
+                               }
+       
+                               debug_mode_enabled = !debug_mode_enabled;
+                               return;
+                       }
+       
+                       if (keycode == 191 && shift_key) { // ?
+                               if (!Element.visible("hotkey_help_overlay")) {
+                                       Element.show("hotkey_help_overlay");
+                               } else {
+                                       Element.hide("hotkey_help_overlay");
+                               }
+                               return;
+                       }
+       
+                       if (keycode == 191) { // /
+                               return displayDlg("search", getActiveFeedId());
+                       }
+
+                       if (keycode == 74) { // j
+                               var feed = getActiveFeedId();
+                               var new_feed = getRelativeFeedId(feedlist, feed, 'prev');
+                               if (new_feed) viewfeed(new_feed, '');
+                               return;
+                       }
+       
+                       if (keycode == 75) { // k
+                               var feed = getActiveFeedId();
+                               var new_feed = getRelativeFeedId(feedlist, feed, 'next');
+                               if (new_feed) viewfeed(new_feed, '');
+                               return;
+                       }
+
+                       if (keycode == 78 || keycode == 40) { // n, down
+                               if (typeof moveToPost != 'undefined') {
+                                       return moveToPost('next');
+                               }
+                       }
+       
+                       if (keycode == 80 || keycode == 38) { // p, up
+                               if (typeof moveToPost != 'undefined') {
+                                       return moveToPost('prev');
+                               }
+                       }
+
+                       if (keycode == 83 && shift_key) { // S
+                               var id = getActiveArticleId();
+                               if (id) {                               
+                                       togglePub(id);
+                               }
+                               return;
+                       }
+
+                       if (keycode == 83) { // s
+                               var id = getActiveArticleId();
+                               if (id) {                               
+                                       toggleMark(id);
+                               }
+                               return;
+                       }
+
+
+                       if (keycode == 85) { // u
+                               var id = getActiveArticleId();
+                               if (id) {                               
+                                       toggleUnread(id);
+                               }
+                               return;
+                       }
+
+                       if (keycode == 84 && shift_key) { // t
+                               var id = getActiveArticleId();
+                               if (id) {
+                                       editArticleTags(id, getActiveFeedId(), isCdmMode());
+                               }
+                       }
+
+                       if (keycode == 84) { // t
+                               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
+                               if (getActiveArticleId()) {
+                                       openArticleInNewWindow(getActiveArticleId());
+                               }
+                       }
+
+               }
+
+               /* Prefix f */
+
+               if (hotkey_prefix == 70) { // f 
+
+                       hotkey_prefix = false;
+
+                       if (keycode == 65) { // a
+                               return toggleDispRead();
+                       }
+
+                       if (keycode == 85 && shift_key) { // r
+                               return scheduleFeedUpdate(true);
+                       }
+
+                       if (keycode == 85) { // u
+                               if (getActiveFeedId()) {
+                                       return viewfeed(getActiveFeedId(), "ForceUpdate");
+                               }
+                       }
+
+                       if (keycode == 69) { // e
+                               return editFeedDlg(getActiveFeedId());
+                       }
+
+                       if (keycode == 83) { // s
+                               return displayDlg("quickAddFeed");
+                       }
+
+                       if (keycode == 67 && shift_key) { // C
+                               if (typeof catchupAllFeeds != 'undefined') {
+                                       return catchupAllFeeds();
+                               }
+                       }
+
+                       if (keycode == 67) { // c
+                               if (getActiveFeedId()) {
+                                       return catchupCurrentFeed();
+                               }
+                       }
+
+               }
+
+               /* Prefix c */
+
+               if (hotkey_prefix == 67) { // c
+                       hotkey_prefix = false;
+
+                       if (keycode == 70) { // f
+                               return displayDlg("quickAddFilter", getActiveFeedId()); 
+                       }
+
+                       if (keycode == 83) { // s
+                               if (typeof collapse_feedlist != 'undefined') {
+                                       return collapse_feedlist();
+                               }
+                       }
+
+               }
+
+               /* 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);
+               }
+
+               if (keycode == 49) { // 1
+                       return setHotkeyZone(1);
+               }
+
+               if (keycode == 50) { // 2
+                       return setHotkeyZone(2);
+               }
+
+               if (keycode == 51) { // 3
+                       return setHotkeyZone(3);
+               }
+
+               if (keycode == 82) { // r
+                       return scheduleFeedUpdate(true);
+               }
+
+               if (keycode == 83) { // s
+                       return displayDlg("search", getActiveFeedId());
+               }
+
+               if (keycode == 85) { // u
+                       if (getActiveFeedId()) {
+                               return viewfeed(getActiveFeedId(), "ForceUpdate");
+                       }
+               }
+       
+               if (keycode == 65) { // a
+                       return toggleDispRead();
+               }
+       
+               var feedlist = document.getElementById('feedList');
+       
+               if (keycode == 74) { // j
+                       var feed = getActiveFeedId();
+                       var new_feed = getRelativeFeedId(feedlist, feed, 'prev');
+                       if (new_feed) viewfeed(new_feed, '');
+               }
+       
+               if (keycode == 75) { // k
+                       var feed = getActiveFeedId();
+                       var new_feed = getRelativeFeedId(feedlist, feed, 'next');
+                       if (new_feed) viewfeed(new_feed, '');
+               }
+
+               if (shift_key && (keycode == 78 || keycode == 40)) { // shift - n, down
+                       return catchupRelativeToArticle(1);
+               }
+
+               if (shift_key && (keycode == 80 || keycode == 38)) { // shift - p, up
+                       return catchupRelativeToArticle(0);                     
+               }
+
+               if (keycode == 78 || keycode == 40) { // n, down
+                       if (typeof moveToPost != 'undefined') {
+                               return moveToPost('next');
+                       }
+               }
+       
+               if (keycode == 80 || keycode == 38) { // p, up
+                       if (typeof moveToPost != 'undefined') {
+                               return moveToPost('prev');
+                       }
+               }
+               
+               if (keycode == 68 && shift_key) { // d
+                       if (!debug_mode_enabled) {
+                               document.getElementById('debug_output').style.display = 'block';
+                               debug('debug mode activated');
+                       } else {
+                               document.getElementById('debug_output').style.display = 'none';
+                       }
+
+                       debug_mode_enabled = !debug_mode_enabled;
+               }
+
+               if (keycode == 191 && shift_key) { // ?
+                       if (!Element.visible("hotkey_help_overlay")) {
+                               Element.show("hotkey_help_overlay");
+                       } else {
+                               Element.hide("hotkey_help_overlay");
+                       }
+               }
+
+               if (keycode == 69 && shift_key) { // e
+                       return editFeedDlg(getActiveFeedId());
+               }
+
+               if (keycode == 70 && shift_key) { // f
+                       if (getActiveFeedId()) {
+                               return catchupCurrentFeed();
+                       }
+               }
+
+               if (keycode == 80 && shift_key) { // p 
+                       if (getActiveFeedId()) {
+                               return catchupPage();
+                       }
+               }
+
+               if (keycode == 86) { // v
+                       if (getActiveArticleId()) {
+                               openArticleInNewWindow(getActiveArticleId());
+                       }
+               }
+
+               if (keycode == 84) { // t
+
+                       var id = getActiveArticleId();
+
+                       if (id) {                               
+
+                               var cb = document.getElementById("RCHK-" + id);
+
+                               if (cb) {
+                                       cb.checked = !cb.checked;
+                                       toggleSelectRowById(cb, "RROW-" + id);
+                               }
+                       }
+               }
+
+               if (keycode == 67) { // c
+                       var id = getActiveArticleId();
+
+                       if (id) {                               
+                               toggleUnread(id, 0);
+                       }
+               }
+
+               if (keycode == 67 && shift_key) { // c
+                       if (typeof collapse_feedlist != 'undefined') {
+                               return collapse_feedlist();
+                       }
+               }
+
+               if (keycode == 81 && shift_key) { // shift + q
+                       if (typeof catchupAllFeeds != 'undefined') {
+                               return catchupAllFeeds();
+                       }
+               }
+
+               if (keycode == 73 && shift_key) { // shift + i
+                       if (document.getElementById("subtoolbar_search")) {
+                               if (Element.visible("subtoolbar_search")) {
+                                       Element.hide("subtoolbar_search");
+                                       Element.show("subtoolbar_ftitle");
+                                       setTimeout("Element.focus('subtoolbar_search_box')", 100);
+                               } else {
+                                       Element.show("subtoolbar_search");
+                                       Element.hide("subtoolbar_ftitle");
+                               }
+                       }
+               }
+
+               if (keycode == 27) { // escape
+                       if (Element.visible("hotkey_help_overlay")) {
+                               Element.hide("hotkey_help_overlay");
+                       }
+               } */
+
+               if (typeof localHotkeyHandler != 'undefined') {
+                       try {
+                               return localHotkeyHandler(e);
+                       } catch (e) {
+                               exception_error("hotkey_handler, local:", e);
+                       }
+               }
+
+               if (hotkey_prefix) {
+                       debug("KP: PREFIX=" + hotkey_prefix + " CODE=" + keycode);
+
+               } else {
+                       debug("KP: CODE=" + keycode);
+               }
+
+
+       } catch (e) {
+               exception_error("hotkey_handler", e);
+       }
+}
+
 
index e6e4729f4e87ed6d81dc64df23715d53b87b0a7f..e5e862d59481fa3fc87dbf17de97b7ae74443297 100644 (file)
@@ -795,6 +795,7 @@ function toggleUnread(id, cmode, effect) {
                var row = document.getElementById("RROW-" + id);
                if (row) {
                        var nc = row.className;
+                       var is_selected = row.className.match("Selected");
                        nc = nc.replace("Unread", "");
                        nc = nc.replace("Selected", "");
 
@@ -833,6 +834,9 @@ function toggleUnread(id, cmode, effect) {
                                row.className = nc + "Unread";
                        }
 
+                       // Disable unmarking as selected for the time being (16.05.08) -fox
+                       if (is_selected) row.className = row.className + "Selected";
+
                        if (cmode == undefined) cmode = 2;
 
                        var query = "backend.php?op=rpc&subop=catchupSelected&ids=" +