return cat_unread;
},
+ collapseHiddenCats: function() {
+ if (!this.model.hasCats()) return;
+
+ var cats = this.model.store._arrayOfTopLevelItems;
+ var tree = this;
+
+ dojo.forEach(cats, function(cat) {
+ var hidden = tree.model.store.getValue(cat, 'hidden');
+ var id = tree.model.store.getValue(cat, 'id');
+ var node = tree._itemNodesMap[id][0];
+
+ if (hidden)
+ tree._collapseNode(node);
+ else
+ tree._expandNode(node);
+
+ });
+ },
});
new Ajax.Request("backend.php",
{ parameters: "backend.php?op=feeds&subop=collapse&cid=" +
- param_escape(cat_id) + "&mode=1" } );
+ param_escape(cat_id) + "&mode=0" } );
},
onClose: function (item, node) {
var id = String(item.id);
new Ajax.Request("backend.php",
{ parameters: "backend.php?op=feeds&subop=collapse&cid=" +
- param_escape(cat_id) + "&mode=0" } );
+ param_escape(cat_id) + "&mode=1" } );
},
onClick: function (item, node) {
var tmph = dojo.connect(tree, 'onLoad', function() {
dojo.disconnect(tmph);
Element.hide("feedlistLoading");
+
+ tree.collapseHiddenCats();
+
feedlist_init();
// var node = dijit.byId("feedTree")._itemNodesMap['FEED:-2'][0].domNode