From: Andrew Dolgov Date: Sat, 17 May 2008 15:58:15 +0000 (+0100) Subject: new shortcut: tab (selects article under cursor) X-Git-Tag: 1.2.23-final~83 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=314fcd2bfdc42bef86ff479d720d7e9352612ce8;p=tt-rss.git new shortcut: tab (selects article under cursor) --- diff --git a/functions.php b/functions.php index 2696f9f2..fcbfe40f 100644 --- a/functions.php +++ b/functions.php @@ -4945,8 +4945,11 @@ $line["feed_title"]." $vf_catchup_link:"; } } - - print ""; + + $mouseover_attrs = "onmouseover='postMouseIn($id)' + onmouseout='postMouseOut($id)'"; + + print ""; print "$update_pic"; @@ -5033,10 +5036,13 @@ $cdm_cstyle = "style=\"display : none\""; } + $mouseover_attrs = "onmouseover='postMouseIn($id)' + onmouseout='postMouseOut($id)'"; + print "
"; + $mouseover_attrs'>"; print "
"; diff --git a/help/3.php b/help/3.php index 32004056..97f91439 100644 --- a/help/3.php +++ b/help/3.php @@ -23,6 +23,8 @@

+ + diff --git a/tt-rss.js b/tt-rss.js index c8604584..6dd34274 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -1012,13 +1012,15 @@ function hotkey_handler(e) { if (keycode == 78 || keycode == 40) { // n, down if (typeof moveToPost != 'undefined') { - return moveToPost('next'); + moveToPost('next'); + return false; } } if (keycode == 80 || keycode == 38) { // p, up if (typeof moveToPost != 'undefined') { - return moveToPost('prev'); + moveToPost('prev'); + return false; } } @@ -1047,15 +1049,15 @@ function hotkey_handler(e) { return; } - if (keycode == 84) { // t + if (keycode == 84 && shift_key) { // T var id = getActiveArticleId(); if (id) { editArticleTags(id, getActiveFeedId(), isCdmMode()); } } -/* if (keycode == 84) { // t - var id = getActiveArticleId(); + if (keycode == 9) { // tab + var id = getArticleUnderPointer(); if (id) { var cb = document.getElementById("RCHK-" + id); @@ -1063,8 +1065,10 @@ function hotkey_handler(e) { cb.checked = !cb.checked; toggleSelectRowById(cb, "RROW-" + id); } + + return false; } - } */ + } if (keycode == 79) { // o if (getActiveArticleId()) { @@ -1346,4 +1350,3 @@ function hotkey_handler(e) { } } - diff --git a/viewfeed.js b/viewfeed.js index caaec2da..3bb121e2 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -18,6 +18,7 @@ var _cdm_wd_vishist = new Array(); var article_cache = new Array(); var vgroup_last_feed = false; +var post_under_pointer = false; function catchup_callback() { if (xmlhttp_rpc.readyState == 4) { @@ -1603,6 +1604,22 @@ function cdmClicked(elem) { } } +function postMouseIn(id) { + try { + post_under_pointer = id; + } catch (e) { + exception_error("postMouseIn", e); + } +} + +function postMouseOut(id) { + try { + post_under_pointer = false; + } catch (e) { + exception_error("postMouseOut", e); + } +} + function cdmMouseIn(elem) { /* try { if (elem.id && elem.id.match("RROW-")) { @@ -1798,5 +1815,8 @@ function subtoolbarSearch() { } catch (e) { exception_error("subtoolbarSearch", e); } +} +function getArticleUnderPointer() { + return post_under_pointer; }
[tab]
c f
c s
?