]> git.wh0rd.org Git - tt-rss.git/commitdiff
cdm: tweak the way hotkey article dismissing works; toggle select article by clicking...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 10 Nov 2010 08:38:55 +0000 (11:38 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 10 Nov 2010 08:38:55 +0000 (11:38 +0300)
functions.php
help/3.php
tt-rss.js
viewfeed.js

index 09efbd33209040bcc544011c5d9d8758c94d2b89..c080e39472ec506673869df4706ca55f976b47cb 100644 (file)
 
                                        print "</div>";
 
-                                       print "<div class=\"cdmContent\" $content_hidden 
+                                       print "<div class=\"cdmContent\" $content_hidden
+                                               title=\"".__("Click to select article")."\"
+                                               onclick=\"toggleSelected($id);\"
                                                id=\"CICD-$id\">";
 
                                        print "<div class=\"cdmContentInner\">";
index 3b65147c5d544c33cfcdfd92a30777d5b64be4d8..47ef3c9d7d98a47d4506532687c6acd82c5efe4c 100644 (file)
@@ -17,7 +17,7 @@
                <tr><td class='n'>S</td><td><?php echo __("Toggle published") ?></td></tr>
                <tr><td class='n'>u</td><td><?php echo __("Toggle unread") ?></td></tr>
                <tr><td class='n'>T</td><td><?php echo __("Edit tags") ?></td></tr>
-               <tr><td class='n'>D</td><td><?php echo __("In combined mode, dismiss article") ?></td></tr>
+               <tr><td class='n'>D</td><td><?php echo __("In combined mode, dismiss selected articles") ?></td></tr>
                <tr><td class='n'>o</td><td><?php echo __("Open article in new window") ?></td></tr>
                <tr><td class='n'>c n/c p</td><td><?php echo __("Mark articles below/above active one as read") ?></td></tr>
                <tr><td class='n'>N/P</td><td><?php echo __("Scroll article content") ?></td></tr>
index 27d4993041cc956fca67fe194a51e26f2533fd9a..82199cc14c8e48e31be034c34469ada1d69fad8c 100644 (file)
--- 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();
                                }
                        }
 
index d12e953809fca892d544c17ba031e8f075f2ba0d..5df91c330b77da167a3cf5cdae834e5d48ea388e 100644 (file)
@@ -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);
+       }
+}