]> git.wh0rd.org - tt-rss.git/commitdiff
move counters processing to different xmlhttp object
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 29 Sep 2006 03:44:58 +0000 (04:44 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 29 Sep 2006 03:44:58 +0000 (04:44 +0100)
themes/compat/theme.css
tt-rss.css
tt-rss.js
viewfeed.js

index cbfe367cccf539f23be191336c88f92ed2f117a6..40a437c59f22ab147aca6ef1ab269c5b9b2c34ec 100644 (file)
@@ -112,6 +112,7 @@ div.postReply {
        background-repeat : repeat-x;
        height : 100%;
        padding : 10px;
+       margin-left : 1px;
 }
 
 div.postReply a {
@@ -907,3 +908,100 @@ div.cdmContent a:hover {
        color : black;
 }
 
+/* layout */
+
+#header {
+       position : absolute;
+       white-space: nowrap;
+       top : 10px;
+       left : 15px;
+       right : 5px;
+       height : 40px;
+       color : gray;
+       font-size : x-small;
+}
+
+#feeds-holder {
+       border-width : 1px 1px 1px 0px;
+       border-style : solid;
+       border-color : #c0c0c0;
+       top : 70px;
+       left : 0px;
+       position : absolute;
+       width : 260px;
+       overflow : auto;
+       bottom : 50px;
+}
+
+#toolbar {
+       position : absolute;
+       left : 261px;
+       padding : 5px 10px 5px 10px;
+       top : 70px;
+       right : 0px;
+       white-space: nowrap;
+       height : 30px;
+       background-image : url("images/vgrad_light.png");
+       background-position : bottom left;
+       background-repeat : repeat-x;
+       font-size : small;
+}
+
+div.headlines_normal {
+       position : absolute;
+       border-width : 1px 0px 0px 0px;
+       border-style : solid;
+       border-color : #c0c0c0;
+       left : 260px;
+       height : 280px;
+       top : 105px;
+       right : 0px;
+       overflow : auto;
+       font-size : small;
+}
+
+div.headlines_cdm {
+       position : absolute;
+       border-width : 1px 0px 1px 0px;
+       border-style : solid;
+       border-color : #c0c0c0;
+       left : 260px;
+       bottom : 50px;
+       top : 105px;
+       right : 0px;
+       overflow : auto;
+       font-size : small;
+}
+
+#content-frame {
+       position : absolute;
+       border-width : 1px 0px 1px 0px;
+       border-style : solid;
+       border-color : #c0c0c0;
+       overflow : auto;
+       top : 390px;
+       left : 260px;
+       bottom : 50px;
+       right : 0px;
+}
+
+#footer {
+       position : absolute;
+       bottom : 0px;
+       height : 30px;
+       text-align : center;
+       color : gray;
+       font-size : x-small;
+       background-image : url("images/vgrad_light_rev2.png");
+       background-position : top left;
+       background-repeat : repeat-x; 
+       background-color : white;
+       right : 0px;
+       left : 0px;
+       padding : 10px;
+}
+
+#headlinesContainer {
+       margin-left : 1px;
+       background-color : white;
+}
index 0a2ba0a5d7a52876bf398d853358a3f1ebd37f4a..c17b9d45f2982914bda528ee395309c1434c1584 100644 (file)
@@ -1234,6 +1234,7 @@ div.loadingPrompt {
 div.whiteBox {
        background-color : white;
        margin-left : 1px;
+       text-align : center;
 }
 
 /* layout */
index c85dd09fd3a85d373f4560cca36e7a7894a28661..688a9c8094384c5944817e3554a52fd8de402294 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -16,6 +16,7 @@ var active_feed_is_cat = false;
 var number_of_feeds = 0;
 
 var xmlhttp = Ajax.getTransport();
+var xmlhttp_ctr = Ajax.getTransport();
 
 var init_params = new Object();
 
@@ -34,27 +35,35 @@ function toggleTags() {
 }
 
 function dlg_frefresh_callback() {
-       if (xmlhttp.readyState == 4) {
+       if (xmlhttp.readyState == 4) {          
                notify(xmlhttp.responseText);
+
+               if (getActiveFeedId() == _qfd_deleted_feed) {
+                       var h = document.getElementById("headlines-frame");
+                       if (h) {
+                               h.innerHTML = "<div class='whiteBox'>No feed selected.</div>";
+                       }
+               }
+
                setTimeout('updateFeedList(false, false)', 50);
                closeInfoBox();
        } 
 }
 
 function refetch_callback() {
-       if (xmlhttp.readyState == 4) {
+       if (xmlhttp_ctr.readyState == 4) {
                try {
 
                        var date = new Date();
 
                        last_refetch = date.getTime() / 1000;
 
-                       if (!xmlhttp.responseXML) {
+                       if (!xmlhttp_ctr.responseXML) {
                                notify("refetch_callback: backend did not return valid XML", true, true);
                                return;
                        }
                
-                       var reply = xmlhttp.responseXML.firstChild;
+                       var reply = xmlhttp_ctr.responseXML.firstChild;
        
                        if (!reply) {
                                notify("refetch_callback: backend did not return expected XML object", true, true);
@@ -175,19 +184,19 @@ function scheduleFeedUpdate(force) {
 
        var date = new Date();
 
-       if (!xmlhttp_ready(xmlhttp) && last_refetch < date.getTime() / 1000 - 60) {
+       if (!xmlhttp_ready(xmlhttp_ctr) && last_refetch < date.getTime() / 1000 - 60) {
                debug("<b>xmlhttp seems to be stuck, aborting</b>");
-               xmlhttp.abort();
+               xmlhttp_ctr.abort();
        }
 
        debug("REFETCH query: " + query_str);
 
-       if (xmlhttp_ready(xmlhttp)) {
-               xmlhttp.open("GET", query_str, true);
-               xmlhttp.onreadystatechange=refetch_callback;
-               xmlhttp.send(null);
+       if (xmlhttp_ready(xmlhttp_ctr)) {
+               xmlhttp_ctr.open("GET", query_str, true);
+               xmlhttp_ctr.onreadystatechange=refetch_callback;
+               xmlhttp_ctr.send(null);
        } else {
-               debug("xmlhttp busy");
+               debug("xmlhttp_ctr busy");
                //printLockingError();
        }   
 }
index 1fab250271dd4a35164c5a29054ba5b0b8a3afe9..9951636cb214cef77cab0163f1723fb9aa0a0116 100644 (file)
@@ -1,7 +1,5 @@
 var active_post_id = false;
 
-//var xmlhttp_rpc = Ajax.getTransport();
-
 function headlines_callback() {
        if (xmlhttp.readyState == 4) {
                debug("headlines_callback");
@@ -54,8 +52,6 @@ function view(id, feed_id) {
                var query = "backend.php?op=view&id=" + param_escape(id) +
                        "&feed=" + param_escape(feed_id);
 
-               xmlhttp.abort();
-
                if (xmlhttp_ready(xmlhttp)) {
                        xmlhttp.open("GET", query, true);
                        xmlhttp.onreadystatechange=article_callback;