summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--feedlist.js3
-rw-r--r--functions.js21
-rw-r--r--prefs.js11
-rw-r--r--prefs.php8
-rw-r--r--tt-rss.css4
-rw-r--r--tt-rss.js6
-rw-r--r--tt-rss.php8
-rw-r--r--viewfeed.js4
8 files changed, 23 insertions, 42 deletions
diff --git a/feedlist.js b/feedlist.js
index 734fddaee..1f4819a35 100644
--- a/feedlist.js
+++ b/feedlist.js
@@ -191,8 +191,6 @@ function viewfeed(feed, subop, is_cat, offset) {
function feedlist_init() {
try {
- loading_set_progress(90);
-
console.log("in feedlist init");
hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
@@ -204,7 +202,6 @@ function feedlist_init() {
setTimeout("viewfeed(-3)", 100);
} else {
setTimeout("viewfeed(-5)", 100);
- remove_splash();
}
}
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");
diff --git a/prefs.js b/prefs.js
index 0c627b219..5d9107f97 100644
--- a/prefs.js
+++ b/prefs.js
@@ -25,7 +25,6 @@ function feedlist_callback2(transport) {
caller_subop = false;
}
notify("");
- remove_splash();
} catch (e) {
exception_error("feedlist_callback2", e);
@@ -35,7 +34,6 @@ function feedlist_callback2(transport) {
function filterlist_callback2(transport) {
dijit.byId('filterConfigTab').attr('content', transport.responseText);
notify("");
- remove_splash();
}
function labellist_callback2(transport) {
@@ -46,7 +44,6 @@ function labellist_callback2(transport) {
closeInfoBox();
notify("");
- remove_splash();
} catch (e) {
exception_error("labellist_callback2", e);
@@ -58,7 +55,6 @@ function userlist_callback2(transport) {
dijit.byId('userConfigTab').attr('content', transport.responseText);
notify("");
- remove_splash();
} catch (e) {
exception_error("userlist_callback2", e);
}
@@ -69,7 +65,6 @@ function prefslist_callback2(transport) {
dijit.byId('genConfigTab').attr('content', transport.responseText);
notify("");
- remove_splash();
} catch (e) {
exception_error("prefslist_callback2", e);
}
@@ -1072,7 +1067,7 @@ function init_second_stage() {
caller_subop = caller_subop + ":" + getURLParam("subopparam");
}
- loading_set_progress(60);
+ loading_set_progress(50);
notify("");
@@ -1088,7 +1083,6 @@ function init_second_stage() {
});
setTimeout("hotkey_prefix_timeout()", 5*1000);
- remove_splash();
} catch (e) {
exception_error("init_second_stage", e);
@@ -1117,6 +1111,7 @@ function init() {
dojo.require("dijit.tree.dndSource");
dojo.require("dijit.InlineEditBox");
dojo.require("dijit.ColorPalette");
+ dojo.require("dijit.ProgressBar");
dojo.registerModulePath("lib", "..");
dojo.registerModulePath("fox", "../..");
@@ -1126,7 +1121,7 @@ function init() {
dojo.require("fox.PrefFilterTree");
dojo.require("fox.PrefLabelTree");
- loading_set_progress(30);
+ loading_set_progress(50);
var query = "?op=rpc&subop=sanityCheck";
diff --git a/prefs.php b/prefs.php
index 0e48665b3..972e577ca 100644
--- a/prefs.php
+++ b/prefs.php
@@ -65,12 +65,10 @@
<div id="overlay">
<div id="overlay_inner">
- <?php echo __("Loading, please wait...") ?>
-
- <div id="l_progress_o">
- <div id="l_progress_i"></div>
+ <div class="insensitive"><?php echo __("Loading, please wait...") ?></div>
+ <div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar"
+ progress="0" maximum="100">
</div>
-
<noscript>
<p><?php print_error(__("Your browser doesn't support Javascript, which is required
for this application to function properly. Please check your
diff --git a/tt-rss.css b/tt-rss.css
index 9edd15c33..98040440d 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -185,7 +185,7 @@ input.editbox {
display : none;
float : right;
font-size : 12px;
- z-index : 998;
+ z-index : 99;
padding : 5px 5px 5px 5px;
}
@@ -807,7 +807,7 @@ div.browserFeedInfo div.detailsPart {
#overlay_inner {
font-weight : bold;
- margin : 10px;
+ margin : 1em;
}
#noDaemonWarning {
diff --git a/tt-rss.js b/tt-rss.js
index 4ad6ca2f4..674623112 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -120,6 +120,7 @@ function updateFeedList() {
var tmph = dojo.connect(tree, 'onLoad', function() {
dojo.disconnect(tmph);
Element.hide("feedlistLoading");
+ loading_set_progress(25);
});
tree.startup();
@@ -254,6 +255,7 @@ function init() {
dojo.require("dijit.Tree");
dojo.require("dijit.form.Select");
dojo.require("dijit.Toolbar");
+ dojo.require("dijit.ProgressBar");
dojo.require("dojo.parser");
dojo.registerModulePath("fox", "../..");
@@ -279,7 +281,7 @@ function init() {
var params = "&ua=" + param_escape(navigator.userAgent);
- loading_set_progress(30);
+ loading_set_progress(20);
new Ajax.Request("backend.php", {
parameters: "backend.php?op=rpc&subop=sanityCheck" + params,
@@ -305,7 +307,7 @@ function init_second_stage() {
feeds_sort_by_unread = getInitParam("feeds_sort_by_unread") == 1;
- loading_set_progress(60);
+ loading_set_progress(30);
if (has_local_storage())
localStorage.clear();
diff --git a/tt-rss.php b/tt-rss.php
index 286ebf9d9..8ee817f90 100644
--- a/tt-rss.php
+++ b/tt-rss.php
@@ -61,12 +61,10 @@
<div id="overlay" style="display : block">
<div id="overlay_inner">
- <?php echo __("Loading, please wait...") ?>
-
- <div id="l_progress_o">
- <div id="l_progress_i"></div>
+ <div class="insensitive"><?php echo __("Loading, please wait...") ?></div>
+ <div dojoType="dijit.ProgressBar" places="0" style="width : 300px" id="loading_bar"
+ progress="0" maximum="100">
</div>
-
<noscript>
<p>
<?php print_error(__("Your browser doesn't support Javascript, which is required
diff --git a/viewfeed.js b/viewfeed.js
index d8448afc7..37a068234 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -35,7 +35,7 @@ function headlines_callback2(transport, feed_cur_page) {
if (!handle_rpc_reply(transport)) return;
- loading_set_progress(100);
+ loading_set_progress(25);
console.log("headlines_callback2 [page=" + feed_cur_page + "]");
@@ -193,8 +193,6 @@ function headlines_callback2(transport, feed_cur_page) {
notify("");
- remove_splash();
-
} catch (e) {
exception_error("headlines_callback2", e, transport);
}