";
@@ -5445,6 +5435,8 @@
$article_content = sanitize_rss($link, $line["content_preview"],
false, false, $feed_site_url);
+ if (!$article_content) $article_content = " ";
+
print "
";
if ($line['note']) {
print format_article_note($id, $line['note']);
@@ -5500,7 +5492,7 @@
print "
";
print "
";
diff --git a/help/3.php b/help/3.php
index 47ef3c9d7..76142417f 100644
--- a/help/3.php
+++ b/help/3.php
@@ -17,7 +17,8 @@
S | |
u | |
T | |
-
D | |
+
D | |
+
X | |
o | |
c n/c p | |
N/P | |
diff --git a/tt-rss.js b/tt-rss.js
index 917196ba9..b97a19aa1 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -953,10 +953,11 @@ function hotkey_handler(e) {
}
if (keycode == 68 && shift_key) { // shift-D
- if (isCdmMode()) {
- //cdmDismissArticle(active_post_id);
- cdmDismissSelectedArticles();
- }
+ dismissSelectedArticles();
+ }
+
+ if (keycode == 88 && shift_key) { // shift-X
+ dismissReadArticles();
}
if (keycode == 78 || keycode == 40) { // n, down
diff --git a/viewfeed.js b/viewfeed.js
index 0551de9ae..dbc166c73 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -2386,7 +2386,7 @@ function emailArticleDo() {
}
}
-function cdmDismissArticle(id) {
+function dismissArticle(id) {
try {
var elem = $("RROW-" + id);
@@ -2395,11 +2395,11 @@ function cdmDismissArticle(id) {
new Effect.Fade(elem, {duration : 0.5});
} catch (e) {
- exception_error("cdmDismissArticle", e);
+ exception_error("dismissArticle", e);
}
}
-function cdmDismissSelectedArticles() {
+function dismissSelectedArticles() {
try {
var ids = getSelectedArticleIds2();
@@ -2413,6 +2413,88 @@ function cdmDismissSelectedArticles() {
selectionToggleUnread(false);
} catch (e) {
- exception_error("cdmDismissArticle", e);
+ exception_error("dismissSelectedArticles", e);
}
}
+
+function dismissReadArticles() {
+ try {
+
+ var ids = getVisibleArticleIds();
+
+ for (var i = 0; i < ids.length; i++) {
+ var elem = $("RROW-" + ids[i]);
+
+ if (elem.className && !elem.className.match("Unread") &&
+ !elem.className.match("Selected")) {
+
+ new Effect.Fade(elem, {duration : 0.5});
+ }
+ }
+
+ } catch (e) {
+ exception_error("dismissSelectedArticles", e);
+ }
+}
+
+function getVisibleArticleIds() {
+ try {
+ if (isCdmMode()) {
+ return cdmGetVisibleArticles();
+ } else {
+ return getVisibleHeadlineIds();
+ }
+ } catch (e) {
+ exception_error("getVisibleArticleIds");
+ }
+}
+
+function cdmClicked(event, id) {
+ try {
+ var shift_key = event.shiftKey;
+
+ if (!event.ctrlKey) {
+ cdmSelectArticles("none");
+ toggleSelected(id);
+
+ var elem = $("RROW-" + id);
+
+ if (elem)
+ elem.className = elem.className.replace("Unread", "");
+
+ var query = "?op=rpc&subop=catchupSelected" +
+ "&cmode=0&ids=" + param_escape(id);
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ handle_rpc_reply(transport);
+ } });
+
+ } else {
+ toggleSelected(id);
+ }
+
+ } catch (e) {
+ exception_error("cdmClicked");
+ }
+
+ return false;
+}
+
+function hlClicked(event, id) {
+ try {
+ var shift_key = event.shiftKey;
+
+ if (!event.ctrlKey) {
+ view(id);
+ } else {
+ toggleSelected(id);
+ }
+
+ } catch (e) {
+ exception_error("hlClicked");
+ }
+
+ return false;
+}