From 08827aafd72ccc84d8856e3a7a07abd7d93fad33 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 19 May 2008 13:00:35 +0100 Subject: [PATCH] prefs: add loading progressbar --- feedlist.js | 8 +------- functions.js | 8 ++++++++ prefs.js | 14 ++++++++++++-- prefs.php | 18 ++++++++++++++++++ 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/feedlist.js b/feedlist.js index 0020de17..ac2985a2 100644 --- a/feedlist.js +++ b/feedlist.js @@ -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!"); - } -} + diff --git a/functions.js b/functions.js index 01de05b2..83e24bf0 100644 --- a/functions.js +++ b/functions.js @@ -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!"); + } +} diff --git a/prefs.js b/prefs.js index 41b4d768..b4d71693 100644 --- 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); diff --git a/prefs.php b/prefs.php index d411a370..8a483d70 100644 --- a/prefs.php +++ b/prefs.php @@ -69,6 +69,24 @@ +
+
+ + +
+
+
+ + +
+
+ +