summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-19 16:08:02 +0300
committerAndrew Dolgov <[email protected]>2010-11-19 16:08:02 +0300
commitfcc3674439275d62fd007d34e61bf0cbaa7c910b (patch)
treef52cbc596a0619757107192d4a8272beffcb3e77 /functions.js
parentb8aa9ca7f083a5c62084e2752168f9ecc6170e46 (diff)
rework loading progressbar
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js21
1 files changed, 7 insertions, 14 deletions
diff --git a/functions.js b/functions.js
index 527a6f817..48a9ef230 100644
--- a/functions.js
+++ b/functions.js
@@ -1,6 +1,6 @@
var hotkeys_enabled = true;
var notify_silent = false;
-var last_progress_point = 0;
+var loading_progress = 0;
var sanity_check_done = false;
/* add method to remove element from array */
@@ -879,21 +879,13 @@ function displayHelpInfobox(topic_id) {
function loading_set_progress(p) {
try {
- if (p < last_progress_point || !Element.visible("overlay")) return;
+ loading_progress += p;
- console.log("loading_set_progress : " + p + " (" + last_progress_point + ")");
+ if (dijit.byId("loading_bar"))
+ dijit.byId("loading_bar").update({progress: loading_progress});
- var o = $("l_progress_i");
-
-// o.style.width = (p * 2) + "px";
-
- new Effect.Scale(o, p, {
- scaleY : false,
- scaleFrom : last_progress_point,
- scaleMode: { originalWidth : 200 },
- queue: { position: 'end', scope: 'LSP-Q', limit: 3 } });
-
- last_progress_point = p;
+ if (loading_progress >= 90)
+ remove_splash();
} catch (e) {
exception_error("loading_set_progress", e);
@@ -901,6 +893,7 @@ function loading_set_progress(p) {
}
function remove_splash() {
+
if (Element.visible("overlay")) {
console.log("about to remove splash, OMG!");
Element.hide("overlay");