From 6e35a862dd7c2f292ab805cf5a0d5bf8770a6525 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 7 Oct 2009 14:22:44 +0400 Subject: [PATCH] fix view() being called twice on every headline click, experimental progress indicators for feedlist/headlines --- feedlist.js | 12 ++++++++++- functions.php | 8 ++++++-- images/indicator_tiny.gif | Bin 0 -> 723 bytes tt-rss.css | 11 ++++++++++ viewfeed.js | 42 ++++++++++++++++++++++++++++++-------- 5 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 images/indicator_tiny.gif diff --git a/feedlist.js b/feedlist.js index 05109ad2..37c80001 100644 --- a/feedlist.js +++ b/feedlist.js @@ -315,7 +315,17 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { } else { if (!page_offset) { - notify_progress("Loading, please wait...", true); + var feedr = $('FEEDR-' + feed); + + if (feedr) { + var ll = document.createElement('img'); + + ll.src = 'images/indicator_tiny.gif'; + ll.className = 'hlLoading'; + ll.id = 'FLL-' + feed; + + feedr.appendChild(ll); + } } new Ajax.Request(query, { diff --git a/functions.php b/functions.php index effd2000..2c2a81c5 100644 --- a/functions.php +++ b/functions.php @@ -5119,11 +5119,11 @@ # truncate_string($line["feed_title"],30)." "; # } else { - print ""; + print ""; print "" . + onclick=\"return false\">" . $line["title"]; if (get_pref($link, 'SHOW_CONTENT_PREVIEW')) { @@ -5147,6 +5147,10 @@ "; } } + +// print ""; + print ""; # } diff --git a/images/indicator_tiny.gif b/images/indicator_tiny.gif new file mode 100644 index 0000000000000000000000000000000000000000..09d621ede9dbe610877292e554c858d60573359e GIT binary patch literal 723 zcmZ?wbhEHb6ky3UH!ouR`=lAT{vl};VeEIUl!ouRtojadCecHBd+kyoPPMtdS z?%g|}ArPSWpWDwhB-q(8z|~04fSC~}s`yXJxhOTUBsE2$JhLQ2Au%hlA}2pFMK3ci zEuTU0CkrPxP?ZiyKgf{`thx#ceJPpqmMq|Ubc$)6gFv&z8PkHx)%R}in9s-lM6i9! zBZm__dd2Imak;LY=7h}zm4rkI)`WR0GG*E)?mKYn(8@QLmiIn?v-kDx2z`w?tc})! zof1sgG@1de?oQNs+@Zp$B*l}wBx#YxN$K-jdS4q!9hlC1plNUP#}nRyjb|@j-XZKa z^H3#V%=s`!CV{ zGZTv~S)?jgU+dnbH8)5Rn@L8H@VK@q;+ad}wo4-xl69peI z>rMAn>7QZ36tBx*W_EhPz6U`Z*qo#fG3yD?Ju5c7TU8{Z8nlJ?f$93++hq!-bARhP dGOMsv=2x69g9)2+