summaryrefslogtreecommitdiff
path: root/feedlist.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-11 15:29:46 +0300
committerAndrew Dolgov <[email protected]>2010-11-11 15:29:46 +0300
commit2ab31493c9732d34185274582aae4bc4e3351f7f (patch)
tree64c513f6ee369f68f8fa53b6b7cfb14c3711a8d0 /feedlist.js
parent3974aad8742135094e3b4c0e694e57301228b212 (diff)
when trying to load a feed from collapsed category, show loading indicator in category title
Diffstat (limited to 'feedlist.js')
-rw-r--r--feedlist.js37
1 files changed, 31 insertions, 6 deletions
diff --git a/feedlist.js b/feedlist.js
index 3ae69d74a..9032ba026 100644
--- a/feedlist.js
+++ b/feedlist.js
@@ -287,11 +287,28 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
if (!is_cat && img) {
- if (!img.src.match("indicator_white")) {
- img.alt = img.src;
- img.src = getInitParam("sign_progress");
- }
+ var cat_list = feedr.parentNode;
+
+ if (!cat_list || Element.visible(cat_list)) {
+ if (!img.src.match("indicator_white")) {
+ img.alt = img.src;
+ img.src = getInitParam("sign_progress");
+ }
+ } else if (cat_list) {
+ feed_cat_id = cat_list.id.replace("FCATLIST-", "");
+
+ if (!$('FLL-' + feed_cat_id)) {
+
+ var ll = document.createElement('img');
+ ll.src = getInitParam("sign_progress_tiny");
+ ll.className = 'hlLoading';
+ ll.id = 'FLL-' + feed;
+
+ $("FCAP-" + feed_cat_id).appendChild(ll);
+ }
+ }
+
} else {
if (!$('FLL-' + feed)) {
@@ -304,8 +321,8 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
feedr.appendChild(ll);
}
}
- }
- }
+ }
+ }
new Ajax.Request("backend.php", {
parameters: query,
@@ -362,6 +379,14 @@ function toggleCollapseCat(cat) {
}
}
+function isCatCollapsed(cat) {
+ try {
+ return Element.visible("FCATLIST-" + cat);
+ } catch (e) {
+ exception_error("isCatCollapsed", e);
+ }
+}
+
function feedlist_dragsorted(ctr) {
try {
var elem = $("feedList");