summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-10 11:38:55 +0300
committerAndrew Dolgov <[email protected]>2010-11-10 11:38:55 +0300
commitbfa0e7921d81a925c68bdc9e0f0e24bd55cacbf7 (patch)
tree85d861d60275d8036026523a946bb5c283befe12
parent779560b7a388408d032ca42f8828cb5242244b53 (diff)
cdm: tweak the way hotkey article dismissing works; toggle select article by clicking on it
-rw-r--r--functions.php4
-rw-r--r--help/3.php2
-rw-r--r--tt-rss.js5
-rw-r--r--viewfeed.js18
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 "</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\">";
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 @@
<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>
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);
+ }
+}