]> git.wh0rd.org Git - tt-rss.git/commitdiff
block no-articles-selected prompt for catchupPage
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 11 May 2007 05:51:47 +0000 (06:51 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 11 May 2007 05:51:47 +0000 (06:51 +0100)
viewfeed.js

index 2d8ff605f1d9fa909333eb9d9dd66cfcce6f8554..8a35180532b6230b6d7b1a852d0b9a6ca60fbea6 100644 (file)
@@ -286,7 +286,7 @@ function toggleUnread(id, cmode) {
        }
 }
 
-function selectionToggleUnread(cdm_mode, set_state, callback_func) {
+function selectionToggleUnread(cdm_mode, set_state, callback_func, no_error) {
        try {
                if (!xmlhttp_ready(xmlhttp_rpc)) {
                        printLockingError();
@@ -301,7 +301,7 @@ function selectionToggleUnread(cdm_mode, set_state, callback_func) {
                        rows = getSelectedTableRowIds("headlinesList", "RROW", "RCHK");
                }
 
-               if (rows.length == 0) {
+               if (rows.length == 0 && !no_error) {
                        alert(__("No articles are selected."));
                        return;
                }
@@ -458,11 +458,11 @@ function catchupPage() {
 
        if (document.getElementById("headlinesList")) {
                selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', true, 'Unread', true);
-               selectionToggleUnread(false, false, 'viewCurrentFeed()');
+               selectionToggleUnread(false, false, 'viewCurrentFeed()', true);
                selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false);
        } else {
                cdmSelectArticles('all');
-               selectionToggleUnread(true, false, 'viewCurrentFeed()')
+               selectionToggleUnread(true, false, 'viewCurrentFeed()', true)
                cdmSelectArticles('none');
        }
 }