]> git.wh0rd.org - tt-rss.git/blobdiff - js/feedlist.js
viewfeed: remove force_nocache (unused)
[tt-rss.git] / js / feedlist.js
index 941fe9e8bfae4bbba5342ed131796bac5da7265f..628b912349f5edc2c6ff0fa5a6d5ac7683a3ed51 100644 (file)
@@ -124,7 +124,6 @@ function viewfeed(params) {
 
        if (!background) {
                if (_search_query) {
-                       force_nocache = true;
                        query = query + "&" + _search_query;
                        //_search_query = false;
                }
@@ -164,7 +163,7 @@ function viewfeed(params) {
                window.open("backend.php" + query + "&debug=1&csrf_token=" + getInitParam("csrf_token"));
        }
 
-       timeout_ms = can_wait ? 250 : 0;
+       var timeout_ms = can_wait ? 250 : 0;
        _viewfeed_timeout = setTimeout(function() {
 
                new Ajax.Request("backend.php", {
@@ -198,9 +197,34 @@ function feedlist_init() {
 
        hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
 
-       request_counters(true);
-       timeout();
+       if (getInitParam("is_default_pw")) {
+               console.warn("user password is at default value");
+
+               var dialog = new dijit.Dialog({
+                       title: __("Your password is at default value"),
+                       href: "backend.php?op=dlg&method=defaultpasswordwarning",
+                       id: 'infoBox',
+                       style: "width: 600px",
+                       onCancel: function() {
+                               return true;
+                       },
+                       onExecute: function() {
+                               return true;
+                       },
+                       onClose: function() {
+                               return true;
+                       }
+               });
+
+               dialog.show();
+       }
 
+       // bw_limit disables timeout() so we request initial counters separately
+    if (getInitParam("bw_limit") == "1") {
+               request_counters(true);
+    } else {
+       setTimeout(timeout, 250);
+    }
 }
 
 
@@ -301,7 +325,7 @@ function parse_counters(elems) {
                        if (id > 0) {
                                if (has_img) {
                                        setFeedIcon(id, false,
-                                               getInitParam("icons_url") + "/" + id + ".ico");
+                                               getInitParam("icons_url") + "/" + id + ".ico?" + has_img);
                                } else {
                                        setFeedIcon(id, false, 'images/blank_icon.gif');
                                }
@@ -484,28 +508,31 @@ function catchupFeed(feed, is_cat, mode) {
 
        switch (mode) {
        case "1day":
-               str = __("Mark all articles in %s older than 1 day as read?");
+               str = __("Mark %w in %s older than 1 day as read?");
                break;
        case "1week":
-               str = __("Mark all articles in %s older than 1 week as read?");
+               str = __("Mark %w in %s older than 1 week as read?");
                break;
        case "2week":
-               str = __("Mark all articles in %s older than 2 weeks as read?");
+               str = __("Mark %w in %s older than 2 weeks as read?");
                break;
        default:
-               str = __("Mark all articles in %s as read?");
+               str = __("Mark %w in %s as read?");
        }
 
+       var mark_what = last_search_query && last_search_query[0] ? __("search results") : __("all articles");
        var fn = getFeedName(feed, is_cat);
 
-       str = str.replace("%s", fn);
+       str = str.replace("%s", fn)
+               .replace("%w", mark_what);
 
        if (getInitParam("confirm_feed_catchup") == 1 && !confirm(str)) {
                return;
        }
 
-       var catchup_query = "?op=rpc&method=catchupFeed&feed_id=" +
-               feed + "&is_cat=" + is_cat + "&mode=" + mode;
+       var catchup_query = {op: 'rpc', method: 'catchupFeed', feed_id: feed,
+               is_cat: is_cat, mode: mode, search_query: last_search_query[0],
+               search_lang: last_search_query[1]};
 
        console.log(catchup_query);