From d3f1300032fd6b0faabddbe58655401582a0dd54 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 12 Sep 2010 20:21:41 +0400 Subject: [PATCH] digest: show loading indicator in feedlist --- digest.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/digest.js b/digest.js index 2bf7779c8..7a034f80e 100644 --- a/digest.js +++ b/digest.js @@ -210,6 +210,11 @@ function viewfeed(feed_id, offset, replace, no_effects) { console.log(query); + var img = $("F-" + feed_id).getElementsByTagName("IMG")[0]; + + img.setAttribute("orig_src", img.src); + img.src = 'images/indicator_tiny.gif'; + new Ajax.Request("backend.php", { parameters: query, onComplete: function(transport) { @@ -217,6 +222,7 @@ function viewfeed(feed_id, offset, replace, no_effects) { parse_headlines(transport, replace, no_effects); set_selected_feed(feed_id); _active_feed_offset = offset; + img.src = img.getAttribute("orig_src"); } }); } catch (e) {