]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix frontend not knowing about always expanded cdm
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Nov 2010 09:19:28 +0000 (12:19 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Nov 2010 09:19:28 +0000 (12:19 +0300)
functions.php
tt-rss.js
viewfeed.js

index 0eb1987bb12519c6cdc9c6e104053c0f17daa962..da10098ec51107a7c988a3d9a294af9c1bacfa87 100644 (file)
                $data = array();
 
                $data['num_feeds'] = (int) $num_feeds;
-
                $data['last_article_id'] = getLastArticleId($link);
+               $data['cdm_expanded'] = get_pref($link, 'CDM_EXPANDED');
 
                if (ENABLE_UPDATE_DAEMON) {
 
index 841d4b337642368f4c19c2b29a32548c5f75046b..917196ba9c445a6ca910b6b96c803610c9abce68 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -556,10 +556,6 @@ function parse_runtime_info(elem) {
 
                // console.log("RI: " + k + " => " + v);
 
-               if (k == "num_feeds" || k == "last_article_id") {
-                       init_params[k] = v;                                     
-               }
-
                if (k == "new_version_available") {
                        var icon = $("newVersionIcon");
                        if (icon) {
@@ -569,24 +565,23 @@ function parse_runtime_info(elem) {
                                        icon.style.display = "none";
                                }
                        }
+                       return;
                }
 
                var error_flag;
 
                if (k == "daemon_is_running" && v != 1) {
                        notify_error("<span onclick=\"javascript:explainError(1)\">Update daemon is not running.</span>", true);
-                       error_flag = true;
+                       return;
                }
 
                if (k == "daemon_stamp_ok" && v != 1) {
                        notify_error("<span onclick=\"javascript:explainError(3)\">Update daemon is not updating feeds.</span>", true);
-                       error_flag = true;
+                       return;
                }
 
-               if (!error_flag) {
-                       notify('');
-               } 
-
+               init_params[k] = v;                                     
+               notify('');
        }
 }
 
index 4dacb2003f6aa49534bc99df52704e3143a9f58d..0551de9ae7d0c6b062059e0312479193a2368934 100644 (file)
@@ -164,7 +164,7 @@ function headlines_callback2(transport, feed_cur_page) {
                        } else {
                                if (headlines) {
                                        if (headlines_count > 0) {
-                                               console.warn("adding some more headlines...");
+                                               console.log("adding some more headlines...");
        
                                                var c = $("headlinesList");
                
@@ -2088,7 +2088,7 @@ function cdmExpandArticle(id) {
 
                var old_offset = $("RROW-" + id).offsetTop;
 
-               if (active_post_id && elem) {
+               if (active_post_id && elem && !getInitParam("cdm_expanded")) {
                        Element.hide(elem);
                        Element.show("CEXC-" + active_post_id);
                }