]> git.wh0rd.org - tt-rss.git/commitdiff
loading progress bar for main window (2)
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 19 May 2008 08:03:53 +0000 (09:03 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 19 May 2008 08:03:53 +0000 (09:03 +0100)
feedlist.js
functions.js
functions.php
tt-rss.css
tt-rss.php

index b222c9bdb93590cda3ea0e92bc76a6b8e03dc017..d16a56e064ee99be6a2ff450724f0c589337e30d 100644 (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!");
 }
index c37a7812c60e87c284ca09911370be31b0335e76..b0665b174e4e38710f9cb06553a568f414784fac 100644 (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);
index 698efeb208d1c094cc144490b0b9df1ad81b3d40..a2d1750c456f6c52f15cbf090c9e8559020834e6 100644 (file)
 
                        $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
                                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"];
        
index dafb9db4f051cf9188da08d82256975cf69cae9b..b92e8f9aa485b2783df11b7b6afddfb7a75c38f1 100644 (file)
@@ -1940,5 +1940,5 @@ div#l_progress_o {
 div#l_progress_i {
        width : 10px;
        background-color : #88b0f0;
-       padding : 5px;
+       height : 10px;
 }
index d5fd39fe4dab1d3f4324286fb2e68c837ca55742..c2ef53ce0bab7f513901045f12dfd1dc5ef633f6 100644 (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>