From 6eed9e8071c5a4cff23ab956d616c0ab85313303 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 12 Sep 2010 14:50:45 +0400 Subject: [PATCH] add some scriptaculous stuff --- digest.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/digest.js b/digest.js index 51c824ee..886fbce8 100644 --- 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 += "
  • " + "
    " + @@ -463,7 +471,9 @@ function parse_headlines(transport, replace) { "
  • "; } - new Effect.Appear('headlines-content'); + if (replace) new Effect.Appear('headlines-content', {duration : 0.3}); + + //new Effect.Appear('headlines-content'); } } catch (e) {