From bfa0e7921d81a925c68bdc9e0f0e24bd55cacbf7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 10 Nov 2010 11:38:55 +0300 Subject: [PATCH] cdm: tweak the way hotkey article dismissing works; toggle select article by clicking on it --- functions.php | 4 +++- help/3.php | 2 +- tt-rss.js | 5 +++-- viewfeed.js | 18 ++++++++++++++++++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 09efbd332..c080e3947 100644 --- a/functions.php +++ b/functions.php @@ -5476,7 +5476,9 @@ print ""; - print "
"; print "
"; diff --git a/help/3.php b/help/3.php index 3b65147c5..47ef3c9d7 100644 --- a/help/3.php +++ b/help/3.php @@ -17,7 +17,7 @@ S u T - D + D o c n/c p N/P diff --git a/tt-rss.js b/tt-rss.js index 27d499304..82199cc14 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -1006,8 +1006,9 @@ function hotkey_handler(e) { } if (keycode == 68 && shift_key) { // shift-D - if (isCdmMode() && active_post_id) { - cdmDismissArticle(active_post_id); + if (isCdmMode()) { + //cdmDismissArticle(active_post_id); + cdmDismissSelectedArticles(); } } diff --git a/viewfeed.js b/viewfeed.js index d12e95380..5df91c330 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -2366,3 +2366,21 @@ function cdmDismissArticle(id) { exception_error("cdmDismissArticle", e); } } + +function cdmDismissSelectedArticles() { + try { + + var ids = getSelectedArticleIds2(); + + for (var i = 0; i < ids.length; i++) { + var elem = $("RROW-" + ids[i]); + new Effect.Fade(elem, {duration : 0.5}); + } + + if (ids.length > 0) + selectionToggleUnread(false); + + } catch (e) { + exception_error("cdmDismissArticle", e); + } +}