loading progress bar for main window
This commit is contained in:
parent
36cebe0f8d
commit
730dbf1910
22
feedlist.js
22
feedlist.js
|
@ -321,20 +321,22 @@ function feedlist_init() {
|
|||
// if (arguments.callee.done) return;
|
||||
// arguments.callee.done = true;
|
||||
|
||||
loading_set_progress(80);
|
||||
|
||||
debug("in feedlist init");
|
||||
|
||||
hideOrShowFeeds(document, getInitParam("hide_read_feeds") == 1);
|
||||
document.onkeydown = hotkey_handler;
|
||||
setTimeout("timeout()", 0);
|
||||
|
||||
debug("about to remove splash, OMG!");
|
||||
/* debug("about to remove splash, OMG!");
|
||||
|
||||
var o = document.getElementById("overlay");
|
||||
|
||||
if (o) {
|
||||
o.style.display = "none";
|
||||
debug("removed splash!");
|
||||
}
|
||||
} */
|
||||
|
||||
if (typeof correctPNG != 'undefined') {
|
||||
correctPNG();
|
||||
|
@ -345,7 +347,10 @@ function feedlist_init() {
|
|||
setTimeout("viewCurrentFeed()", 100);
|
||||
} else {
|
||||
if (getInitParam("cdm_auto_catchup") != 1) {
|
||||
notify_silent_next();
|
||||
setTimeout("viewfeed(-3)", 100);
|
||||
} else {
|
||||
remove_splash();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,6 +366,8 @@ function feedlist_init() {
|
|||
|
||||
init_collapsable_feedlist(getInitParam("theme"));
|
||||
|
||||
loading_set_progress(80);
|
||||
|
||||
} catch (e) {
|
||||
exception_error("feedlist/init", e);
|
||||
}
|
||||
|
@ -453,3 +460,14 @@ function init_collapsable_feedlist(theme) {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
function remove_splash() {
|
||||
debug("about to remove splash, OMG!");
|
||||
|
||||
var o = document.getElementById("overlay");
|
||||
|
||||
if (o) {
|
||||
o.style.display = "none";
|
||||
debug("removed splash!");
|
||||
}
|
||||
}
|
||||
|
|
19
functions.js
19
functions.js
|
@ -1,6 +1,7 @@
|
|||
var hotkeys_enabled = true;
|
||||
var debug_mode_enabled = false;
|
||||
var xmlhttp_rpc = Ajax.getTransport();
|
||||
var notify_silent = false;
|
||||
|
||||
/* add method to remove element from array */
|
||||
|
||||
|
@ -134,8 +135,17 @@ function hide_notify() {
|
|||
}
|
||||
}
|
||||
|
||||
function notify_silent_next() {
|
||||
notify_silent = true;
|
||||
}
|
||||
|
||||
function notify_real(msg, no_hide, n_type) {
|
||||
|
||||
if (notify_silent) {
|
||||
notify_silent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var n = document.getElementById("notify");
|
||||
var nb = document.getElementById("notify_body");
|
||||
|
||||
|
@ -1661,3 +1671,12 @@ function focus_element(id) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function loading_set_progress(v) {
|
||||
try {
|
||||
var o = document.getElementById("l_progress_i");
|
||||
o.style.width = (v*2) + "px";
|
||||
|
||||
} catch (e) {
|
||||
exception_error("loading_set_progress", e);
|
||||
}
|
||||
}
|
||||
|
|
14
tt-rss.css
14
tt-rss.css
|
@ -1245,7 +1245,6 @@ a.cdmToggleLink:hover {
|
|||
|
||||
#overlay_inner {
|
||||
font-weight : bold;
|
||||
text-align : center;
|
||||
margin : 10px;
|
||||
}
|
||||
|
||||
|
@ -1930,3 +1929,16 @@ div.prefKbdHelp {
|
|||
div.prefKbdHelp img {
|
||||
vertical-align : middle;
|
||||
}
|
||||
|
||||
div#l_progress_o {
|
||||
width : 200px;
|
||||
border : 1px solid black;
|
||||
background-color : white;
|
||||
margin-top : 10px;
|
||||
}
|
||||
|
||||
div#l_progress_i {
|
||||
width : 10px;
|
||||
background-color : #88b0f0;
|
||||
padding : 5px;
|
||||
}
|
||||
|
|
|
@ -325,6 +325,8 @@ 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;
|
||||
|
@ -423,6 +425,8 @@ function init_second_stage() {
|
|||
|
||||
debug("second stage ok");
|
||||
|
||||
loading_set_progress(60);
|
||||
|
||||
} catch (e) {
|
||||
exception_error("init_second_stage", e);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,12 @@
|
|||
|
||||
<div id="overlay">
|
||||
<div id="overlay_inner">
|
||||
<p><?php echo __("Loading, please wait...") ?></p>
|
||||
<?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
|
||||
|
|
|
@ -65,6 +65,8 @@ function clean_feed_selections() {
|
|||
function headlines_callback2(transport, active_feed_id, is_cat, feed_cur_page) {
|
||||
try {
|
||||
|
||||
loading_set_progress(100);
|
||||
|
||||
debug("headlines_callback2 [page=" + feed_cur_page + "]");
|
||||
|
||||
clean_feed_selections();
|
||||
|
@ -228,6 +230,9 @@ function headlines_callback2(transport, active_feed_id, is_cat, feed_cur_page) {
|
|||
_infscroll_request_sent = 0;
|
||||
|
||||
notify("");
|
||||
|
||||
remove_splash();
|
||||
|
||||
} catch (e) {
|
||||
exception_error("headlines_callback2", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue