From: Andrew Dolgov Date: Wed, 10 Nov 2010 08:38:55 +0000 (+0300) Subject: cdm: tweak the way hotkey article dismissing works; toggle select article by clicking... X-Git-Tag: 1.5.0~324 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=bfa0e7921d81a925c68bdc9e0f0e24bd55cacbf7;p=tt-rss.git cdm: tweak the way hotkey article dismissing works; toggle select article by clicking on it --- diff --git a/functions.php b/functions.php index 09efbd33..c080e394 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 3b65147c..47ef3c9d 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 27d49930..82199cc1 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 d12e9538..5df91c33 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); + } +}