diff options
author | Andrew Dolgov <[email protected]> | 2009-10-09 13:14:51 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-10-09 13:14:51 +0400 |
commit | 584d3e035f616fe89df2a019cdae7ae1eb505719 (patch) | |
tree | ed0e120b57466ef3639f8df3329628263c715341 | |
parent | f274f2a59a959bb9e16808b54a2b2a80bb3112aa (diff) | |
parent | 78935092b540278e388749b7b0620fce62098fc9 (diff) |
Merge branch 'master' of /home/fox/public_html/testbox/tt-rss
-rw-r--r-- | functions.js | 22 | ||||
-rw-r--r-- | images/shadow_dark.png | bin | 2761 -> 141 bytes | |||
-rw-r--r-- | prefs.js | 16 | ||||
-rw-r--r-- | prefs.php | 2 | ||||
-rw-r--r-- | tt-rss.css | 12 | ||||
-rw-r--r-- | tt-rss.js | 26 | ||||
-rw-r--r-- | tt-rss.php | 2 |
7 files changed, 61 insertions, 19 deletions
diff --git a/functions.js b/functions.js index 1e28f1392..6ab23b0f2 100644 --- a/functions.js +++ b/functions.js @@ -2169,3 +2169,25 @@ function html5AudioOrFlash(type) { } } } */ + +function hotkey_prefix_timeout() { + try { + + var date = new Date(); + var ts = Math.round(date.getTime() / 1000); + + if (hotkey_prefix_pressed && ts - hotkey_prefix_pressed >= 5) { + debug("hotkey_prefix seems to be stuck, aborting"); + hotkey_prefix_pressed = false; + hotkey_prefix = false; + Element.hide('cmdline'); + } + + setTimeout("hotkey_prefix_timeout()", 1000); + + } catch (e) { + exception_error("hotkey_prefix_timeout", e); + } +} + + diff --git a/images/shadow_dark.png b/images/shadow_dark.png Binary files differindex a300e9492..3a26b2a5c 100644 --- a/images/shadow_dark.png +++ b/images/shadow_dark.png @@ -6,6 +6,7 @@ var init_params = new Array(); var caller_subop = false; var sanity_check_done = false; var hotkey_prefix = false; +var hotkey_prefix_pressed = false; var color_picker_active = false; var selection_disabled = false; @@ -1205,6 +1206,8 @@ function init_second_stage() { loading_set_progress(60); + setTimeout("hotkey_prefix_timeout()", 5*1000); + } catch (e) { exception_error("init_second_stage", e); } @@ -1408,6 +1411,8 @@ function pref_hotkey_handler(e) { var keycode; var shift_key = false; + var cmdline = $('cmdline'); + try { shift_key = e.shiftKey; } catch (e) { @@ -1440,6 +1445,15 @@ function pref_hotkey_handler(e) { if ((keycode == 67 || keycode == 71) && !hotkey_prefix) { hotkey_prefix = keycode; + + var date = new Date(); + var ts = Math.round(date.getTime() / 1000); + + hotkey_prefix_pressed = ts; + + cmdline.innerHTML = keychar; + Element.show(cmdline); + debug("KP: PREFIX=" + keycode + " CHAR=" + keychar); return; } @@ -1456,6 +1470,8 @@ function pref_hotkey_handler(e) { /* Global hotkeys */ + Element.hide(cmdline); + if (!hotkey_prefix) { if (keycode == 68 && shift_key) { // d @@ -147,6 +147,8 @@ window.onload = init; <div id="notify" class="notify"><span id="notify_body"> </span></div> <div id="infoBoxShadow"><div id="infoBox">BAH</div></div> +<div id="cmdline" style="display : none"></div> + <div id="errorBoxShadow" style="display : none"> <div id="errorBox"> <div id="xebTitle">Fatal Exception</div><div id="xebContent"> </div> diff --git a/tt-rss.css b/tt-rss.css index 2d4f2c23a..f18896784 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -2214,3 +2214,15 @@ option { color : black; } +div#cmdline { + position : absolute; + left : 5px; + bottom : 5px; + font-size : 11px; + color : gray; + font-weight : bold; + background-color : white; + border : 1px solid #88b0f0; + padding : 3px 5px 3px 5px; + z-index : 5; +} @@ -314,25 +314,6 @@ function viewfeed(feed, subop) { f.viewfeed(feed, subop); } -function hotkey_prefix_timeout() { - try { - - var date = new Date(); - var ts = Math.round(date.getTime() / 1000); - - if (hotkey_prefix_pressed && ts - hotkey_prefix_pressed >= 5) { - debug("hotkey_prefix seems to be stuck, aborting"); - hotkey_prefix_pressed = false; - hotkey_prefix = false; - } - - setTimeout("hotkey_prefix_timeout()", 10); - - } catch (e) { - exception_error("hotkey_prefix_timeout", e); - } -} - function timeout() { if (getInitParam("bw_limit") == "1") return; @@ -1060,6 +1041,7 @@ function hotkey_handler(e) { var keycode; var shift_key = false; + var cmdline = $('cmdline'); var feedlist = $('feedList'); try { @@ -1099,6 +1081,10 @@ function hotkey_handler(e) { hotkey_prefix = keycode; hotkey_prefix_pressed = ts; + + cmdline.innerHTML = keychar; + Element.show(cmdline); + debug("KP: PREFIX=" + keycode + " CHAR=" + keychar + " TS=" + ts); return true; } @@ -1109,6 +1095,8 @@ function hotkey_handler(e) { /* Global hotkeys */ + Element.hide(cmdline); + if (!hotkey_prefix) { if (keycode == 68 && shift_key) { // d diff --git a/tt-rss.php b/tt-rss.php index baf58a088..607bedb1d 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -104,6 +104,8 @@ window.onload = init; <div id="infoBoxShadow" style="display : none"><div id="infoBox"> </div></div> +<div id="cmdline" style="display : none"></div> + <div id="errorBoxShadow" style="display : none"> <div id="errorBox"> <div id="xebTitle">Fatal Exception</div><div id="xebContent"> </div> |