loading progress bar for main window (2)

This commit is contained in:
Andrew Dolgov 2008-05-19 09:03:53 +01:00
parent 730dbf1910
commit 9950945175
5 changed files with 22 additions and 17 deletions

View File

@ -321,7 +321,7 @@ function feedlist_init() {
// if (arguments.callee.done) return;
// arguments.callee.done = true;
loading_set_progress(80);
loading_set_progress(90);
debug("in feedlist init");
@ -346,7 +346,7 @@ function feedlist_init() {
debug("some feed is open on feedlist refresh, reloading");
setTimeout("viewCurrentFeed()", 100);
} else {
if (getInitParam("cdm_auto_catchup") != 1) {
if (getInitParam("cdm_auto_catchup") != 1 && get_feed_unread(-3) > 0) {
notify_silent_next();
setTimeout("viewfeed(-3)", 100);
} else {
@ -366,8 +366,6 @@ function feedlist_init() {
init_collapsable_feedlist(getInitParam("theme"));
loading_set_progress(80);
} catch (e) {
exception_error("feedlist/init", e);
}
@ -463,11 +461,6 @@ 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!");
}
Element.hide("overlay");
debug("removed splash!");
}

View File

@ -2,6 +2,7 @@ var hotkeys_enabled = true;
var debug_mode_enabled = false;
var xmlhttp_rpc = Ajax.getTransport();
var notify_silent = false;
var last_progress_point = 0;
/* add method to remove element from array */
@ -1671,10 +1672,19 @@ function focus_element(id) {
return false;
}
function loading_set_progress(v) {
function loading_set_progress(p) {
try {
if (!Element.visible("overlay")) return;
var o = document.getElementById("l_progress_i");
o.style.width = (v*2) + "px";
new Effect.Scale(o, p, {
scaleY : false,
scaleFrom : last_progress_point,
scaleMode: { originalWidth : 200 },
queue: { position: 'end', scope: 'LSP-Q', limit: 1 } });
last_progress_point = p;
} catch (e) {
exception_error("loading_set_progress", e);

View File

@ -4173,7 +4173,7 @@
$age_qpart = getMaxAgeSubquery();
$result = db_query($link, "SELECT ttrss_feeds.*,
$query = "SELECT ttrss_feeds.*,
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated_noms,
(SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries
WHERE feed_id = ttrss_feeds.id AND unread = true
@ -4188,7 +4188,9 @@
WHERE
ttrss_feeds.hidden = false AND
ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL
ORDER BY $order_by_qpart");
ORDER BY $order_by_qpart";
$result = db_query($link, $query);
$actid = $_GET["actid"];

View File

@ -1940,5 +1940,5 @@ div#l_progress_o {
div#l_progress_i {
width : 10px;
background-color : #88b0f0;
padding : 5px;
height : 10px;
}

View File

@ -75,7 +75,7 @@
<?php echo __("Loading, please wait...") ?>
<div id="l_progress_o">
<div id="l_progress_i"> </div>
<div id="l_progress_i"></div>
</div>
<noscript>