]> git.wh0rd.org - tt-rss.git/commitdiff
add some scriptaculous stuff
authorAndrew Dolgov <fox@bah.org.ru>
Sun, 12 Sep 2010 10:50:45 +0000 (14:50 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Sun, 12 Sep 2010 10:50:45 +0000 (14:50 +0400)
digest.js

index 51c824ee489f5c3bc902fa86f61c5521a816f51b..886fbce89b1b74505305dc62fdf36531a6a24075 100644 (file)
--- a/digest.js
+++ b/digest.js
@@ -437,22 +437,30 @@ function parse_headlines(transport, replace) {
 
                        $("headlines-title").innerHTML = title;
 
-                       if (replace) $('headlines-content').innerHTML = '';
+                       if (replace) {
+                               $('headlines-content').innerHTML = '';
+                               Element.hide('headlines-content');
+                       }
 
                        var pr = $('H-MORE-PROMPT');
 
                        if (pr) pr.parentNode.removeChild(pr);
 
+                       var inserted = false;
+
                        for (var i = 0; i < headlines.length; i++) {
                                
                                if (!$('A-' + headlines[i].id)) {
                                        add_headline_entry(headlines[i], 
                                                        find_feed(last_feeds, headlines[i].feed_id));
+
+                                       inserted = $("A-" + headlines[i].id);
                                }
                        }
 
                        if (pr) {
                                $('headlines-content').appendChild(pr);
+                               new Effect.ScrollTo(inserted);
                        } else {
                                $('headlines-content').innerHTML += "<li id='H-MORE-PROMPT'>" +
                                        "<div class='body'>" +
@@ -463,7 +471,9 @@ function parse_headlines(transport, replace) {
                                        "</div></li>";
                        }
 
-                       new Effect.Appear('headlines-content');
+                       if (replace) new Effect.Appear('headlines-content', {duration : 0.3});
+
+                       //new Effect.Appear('headlines-content');
                }
 
        } catch (e) {