]> git.wh0rd.org Git - tt-rss.git/commitdiff
progressbar fixes
authorAndrew Dolgov <fox@bah.spb.su>
Mon, 19 May 2008 08:12:54 +0000 (09:12 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Mon, 19 May 2008 08:12:54 +0000 (09:12 +0100)
functions.js
tt-rss.js

index b0665b174e4e38710f9cb06553a568f414784fac..6fe449239306dd5447217302df2940b881f1ff5e 100644 (file)
@@ -1674,7 +1674,9 @@ function focus_element(id) {
 
 function loading_set_progress(p) {
        try {
-               if (!Element.visible("overlay")) return;
+               if (p < last_progress_point || !Element.visible("overlay")) return;
+
+               debug("<b>loading_set_progress : " + p + " (" + last_progress_point + ")</b>");
 
                var o = document.getElementById("l_progress_i");
 
index 538a318d9cdcfffa3601a45673fc280b2b6d655a..6f8f29de7a8d41dfa1cecd50a1e95da85ee195c1 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -325,8 +325,6 @@ function init() {
 
        try {
 
-               loading_set_progress(30);
-
                // this whole shebang is based on http://www.birnamdesigns.com/misc/busted2.html
 
                if (arguments.callee.done) return;
@@ -346,6 +344,8 @@ function init() {
 
                var params = "&ua=" + param_escape(navigator.userAgent);
 
+               loading_set_progress(30);
+
                new Ajax.Request("backend.php?op=rpc&subop=sanityCheck" + params,       {
                        onComplete: function(transport) {
                                        backend_sanity_check_callback(transport);
@@ -424,7 +424,7 @@ function init_second_stage() {
                setTimeout('updateFeedList(false, false)', 50);
 
                debug("second stage ok");
-       
+
                loading_set_progress(60);
 
        } catch (e) {