]> git.wh0rd.org Git - tt-rss.git/commitdiff
prefs: add loading progressbar
authorAndrew Dolgov <fox@bah.spb.su>
Mon, 19 May 2008 12:00:35 +0000 (13:00 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Mon, 19 May 2008 12:00:35 +0000 (13:00 +0100)
feedlist.js
functions.js
prefs.js
prefs.php

index 0020de1795da8a0e3220c3e243bbf0eac2cffb16..ac2985a2fed036772d55be901fcc043cce6db8df 100644 (file)
@@ -460,10 +460,4 @@ function init_collapsable_feedlist(theme) {
 
 }
 
-function remove_splash() {
-       if (Element.visible("overlay")) {
-               debug("about to remove splash, OMG!");
-               Element.hide("overlay");
-               debug("removed splash!");
-       }
-}
+
index 01de05b22da2b9cd603b7f79c6791445d3d2880b..83e24bf09944835818a7013e194f15ae371f0453 100644 (file)
@@ -1697,3 +1697,11 @@ function loading_set_progress(p) {
                exception_error("loading_set_progress", e);
        }
 }
+
+function remove_splash() {
+       if (Element.visible("overlay")) {
+               debug("about to remove splash, OMG!");
+               Element.hide("overlay");
+               debug("removed splash!");
+       }
+}
index 41b4d76884a1001cfee3019803d3bfff4051f0a2..b4d7169312f193c9321458e4c08d3f5375d71fc2 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -87,6 +87,8 @@ function feedlist_callback() {
                                correctPNG();
                        }
                        notify("");
+                       remove_splash();
+
                } catch (e) {
                        exception_error("feedlist_callback", e);
                }
@@ -128,6 +130,7 @@ function filterlist_callback() {
                        correctPNG();
                }
                notify("");
+               remove_splash();
        }
 }
 
@@ -153,6 +156,7 @@ function labellist_callback() {
                        correctPNG();
                }
                notify("");
+               remove_splash();
        }
 }
 
@@ -161,6 +165,7 @@ function feed_browser_callback() {
        if (xmlhttp.readyState == 4) {
                container.innerHTML=xmlhttp.responseText;
                notify("");
+               remove_splash();
        }
 }
 
@@ -169,16 +174,16 @@ function userlist_callback() {
        if (xmlhttp.readyState == 4) {
                container.innerHTML=xmlhttp.responseText;
                notify("");
+               remove_splash();
        }
 }
 
 function prefslist_callback() {
        var container = document.getElementById('prefContent');
        if (xmlhttp.readyState == 4) {
-
                container.innerHTML=xmlhttp.responseText;
-               
                notify("");
+               remove_splash();
        }
 }
 
@@ -1434,6 +1439,9 @@ function init_second_stage() {
                        selectTab(active_tab);
                }
                notify("");
+
+               loading_set_progress(60);
+
        } catch (e) {
                exception_error("init_second_stage", e);
        }
@@ -1459,6 +1467,8 @@ function init() {
                        return;
                }
 
+               loading_set_progress(30);
+
                xmlhttp.open("GET", "backend.php?op=rpc&subop=sanityCheck", true);
                xmlhttp.onreadystatechange=backend_sanity_check_callback;
                xmlhttp.send(null);
index d411a3704697e0e15ffdbaba46ea2fd73cfe8ff7..8a483d70c6de3d338efdaad6a162be1f907264d4 100644 (file)
--- a/prefs.php
+++ b/prefs.php
 
 <body>
 
+<div id="overlay">
+       <div id="overlay_inner">
+               <?php echo __("Loading, please wait...") ?>
+
+               <div id="l_progress_o">
+                       <div id="l_progress_i"></div>
+               </div>
+
+       <noscript>
+               <div class="error"><?php echo
+               __("Your browser doesn't support Javascript, which is required
+               for this application to function properly. Please check your
+               browser settings.") ?></div>
+       </noscript>
+       </div>
+</div> 
+
+
 <div id="hotkey_help_overlay" style="display : none" onclick="Element.hide(this)">
        <?php rounded_table_start("hho"); ?>
        <?php include "help/4.php" ?>