]> git.wh0rd.org - tt-rss.git/blobdiff - js/viewfeed.js
cdmExpandArticle: bail out if id not present in buffer (closes #628)
[tt-rss.git] / js / viewfeed.js
index e32d3a990c9d8edb9c13c35aa87f4a2822c8f9b3..ece1f1394e08c3a7bb737a1fe8cb6ec5e1dec35a 100644 (file)
@@ -979,9 +979,9 @@ function deleteSelection() {
                var str;
 
                if (getActiveFeedId() != 0) {
-                       str = __("Delete %d selected articles in %s?");
+                       str = ngettext("Delete %d selected article in %s?", "Delete %d selected articles in %s?" , rows.length);
                } else {
-                       str = __("Delete %d selected articles?");
+                       str = ngettext("Delete %d selected article?", "Delete %d selected articles?", rows.length);
                }
 
                str = str.replace("%d", rows.length);
@@ -1023,10 +1023,10 @@ function archiveSelection() {
                var op;
 
                if (getActiveFeedId() != 0) {
-                       str = __("Archive %d selected articles in %s?");
+                       str = ngettext("Archive %d selected article in %s?", "Archive %d selected articles in %s?", rows.length);
                        op = "archive";
                } else {
-                       str = __("Move %d archived articles back?");
+                       str = ngettext("Move %d archived article back?", "Move %d archived articles back?", rows.length);
                        op = "unarchive";
                }
 
@@ -1070,7 +1070,7 @@ function catchupSelection() {
 
                var fn = getFeedName(getActiveFeedId(), activeFeedIsCat());
 
-               var str = __("Mark %d selected articles in %s as read?");
+               var str = ngettext("Mark %d selected article in %s as read?", "Mark %d selected articles in %s as read?", rows.length);
 
                str = str.replace("%d", rows.length);
                str = str.replace("%s", fn);
@@ -1317,7 +1317,7 @@ function catchupRelativeToArticle(below, id) {
                if (ids_to_mark.length == 0) {
                        alert(__("No articles found to mark"));
                } else {
-                       var msg = __("Mark %d article(s) as read?").replace("%d", ids_to_mark.length);
+                       var msg = ngettext("Mark %d article as read?", "Mark %d articles as read?", ids_to_mark.length).replace("%d", ids_to_mark.length);
 
                        if (getInitParam("confirm_feed_catchup") != 1 || confirm(msg)) {
 
@@ -1374,6 +1374,8 @@ function cdmExpandArticle(id) {
        try {
                console.log("cdmExpandArticle " + id);
 
+               if (!$("RROW-" + id)) return false;
+
                hideAuxDlg();
 
                var elem = $("CICD-" + getActiveArticleId());