hideOrShowFeedsCategory: fix for offline feedlist

This commit is contained in:
Andrew Dolgov 2009-02-03 21:28:30 +03:00
parent 45a6446d87
commit f4ce1f83d1
1 changed files with 21 additions and 18 deletions

View File

@ -854,25 +854,28 @@ function hideOrShowFeedsCategory(id, hide) {
}
// debug("end cat: " + node.id + " unread " + cat_unread);
if (cat_unread == 0) {
if (cat_node.style == undefined) {
debug("ERROR: supplied cat_node " + cat_node +
" has no styles. WTF?");
return;
}
if (hide) {
//cat_node.style.display = "none";
Effect.Fade(cat_node, {duration : 0.3,
queue: { position: 'end', scope: 'CFADE-' + node.id, limit: 1 }});
if (cat_node) {
if (cat_unread == 0) {
if (cat_node.style == undefined) {
debug("ERROR: supplied cat_node " + cat_node +
" has no styles. WTF?");
return;
}
if (hide) {
//cat_node.style.display = "none";
Effect.Fade(cat_node, {duration : 0.3,
queue: { position: 'end', scope: 'CFADE-' + node.id, limit: 1 }});
} else {
cat_node.style.display = "list-item";
}
} else {
cat_node.style.display = "list-item";
}
} else {
try {
cat_node.style.display = "list-item";
} catch (e) {
debug(e);
try {
cat_node.style.display = "list-item";
} catch (e) {
debug(e);
}
}
}