]> git.wh0rd.org Git - tt-rss.git/commitdiff
more feedback & race condition fix in browserToggleExpand()
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 19 May 2006 03:17:36 +0000 (04:17 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 19 May 2006 03:17:36 +0000 (04:17 +0100)
prefs.js

index 1994495a9cc4d296c072b48b55a4fcd5c748850a..85c707e618323df04c305b75f2dcd7bb8ee47e01 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -1451,6 +1451,11 @@ function browserToggleExpand(id) {
                        d.style.display = "none";
                } */
 
+               if (!xmlhttp_ready(xmlhttp)) {
+                       printLockingError();
+                       return
+               }
+
                var d = document.getElementById("BRDET-" + id);
 
                if (d.style.display == "block") {               
@@ -1460,6 +1465,9 @@ function browserToggleExpand(id) {
        
                        feed_to_expand = id;
 
+                       d.style.display = "block";
+                       d.innerHTML = "Loading, please wait...";
+
                        xmlhttp.open("GET", "backend.php?op=pref-feed-browser&subop=details&id="
                                + param_escape(id), true);
                        xmlhttp.onreadystatechange=expand_feed_callback;