From 7c0d68f2076cd341ccdd14b7ba8def2750b39fa0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 22 Mar 2016 10:28:34 +0300 Subject: [PATCH] remove dismiss* functions --- include/functions2.php | 4 --- js/tt-rss.js | 8 ------ js/viewfeed.js | 64 ------------------------------------------ 3 files changed, 76 deletions(-) diff --git a/include/functions2.php b/include/functions2.php index 811c72ee..f31a6194 100644 --- a/include/functions2.php +++ b/include/functions2.php @@ -64,8 +64,6 @@ "toggle_publ" => __("Toggle published"), "toggle_unread" => __("Toggle unread"), "edit_tags" => __("Edit tags"), - "dismiss_selected" => __("Dismiss selected"), - "dismiss_read" => __("Dismiss read"), "open_in_new_window" => __("Open in new window"), "catchup_below" => __("Mark below as read"), "catchup_above" => __("Mark above as read"), @@ -135,8 +133,6 @@ "*s" => "toggle_publ", "u" => "toggle_unread", "*t" => "edit_tags", - "*d" => "dismiss_selected", - "*x" => "dismiss_read", "o" => "open_in_new_window", "c p" => "catchup_below", "c n" => "catchup_above", diff --git a/js/tt-rss.js b/js/tt-rss.js index 5261485a..daba8f90 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -343,12 +343,6 @@ function init() { editArticleTags(id); }; } - hotkey_actions["dismiss_selected"] = function() { - dismissSelectedArticles(); - }; - hotkey_actions["dismiss_read"] = function() { - dismissReadArticles(); - }; hotkey_actions["open_in_new_window"] = function() { if (getActiveArticleId()) { openArticleInNewWindow(getActiveArticleId()); @@ -375,8 +369,6 @@ function init() { if (isCdmMode()) { if (!getInitParam("cdm_expanded")) { cdmCollapseArticle(false, getActiveArticleId()); - } else { - dismissArticle(getActiveArticleId()); } } else { closeArticlePanel(); diff --git a/js/viewfeed.js b/js/viewfeed.js index bd0e0690..0b37c071 100755 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -1631,70 +1631,6 @@ function show_labels_in_headlines(transport) { } } -function dismissArticles(ids) { - try { - - console.log("dismissArticles: " + ids); - - for (var i = 0; i < ids.length; i++) { - var elem = $("RROW-" + ids[i]); - - new Effect.Fade(elem, { - duration: 0.5, afterFinish: function (obj) { - Element.remove(obj.element); - } - }); - - if (ids[i] == getActiveArticleId()) { - setActiveArticleId(0); - } - } - - selectionToggleUnread(false, false, false, ids); - - } catch (e) { - exception_error("dismissArticles", e); - } - -} - -function dismissArticle(id) { - try { - dismissArticles([id]); - } catch (e) { - exception_error("dismissArticle", e); - } -} - -function dismissSelectedArticles() { - try { - dismissArticles(getSelectedArticleIds2()); - } catch (e) { - exception_error("dismissSelectedArticles", e); - } -} - -function dismissReadArticles() { - try { - var ids = getLoadedArticleIds(); - var tmp = []; - - ids.each(function(id) { - var elem = $("RROW-" + id); - - if (elem && !elem.hasClassName("Unread")) { - tmp.push(id); - } - - }); - - dismissArticles(tmp); - - } catch (e) { - exception_error("dismissReadArticles", e); - } -} - function cdmClicked(event, id) { try { //var shift_key = event.shiftKey; -- 2.39.5