return label;
},
+ expandParentNodes: function(feed, is_cat, list) {
+ try {
+ for (var i = 0; i < list.length; i++) {
+ var id = String(list[i].id);
+ var item = this._itemNodesMap[id];
+
+ if (item) {
+ item = item[0];
+ this._expandNode(item);
+ }
+ }
+ } catch (e) {
+ exception_error("expandParentNodes", e);
+ }
+ },
+ findNodeParentsAndExpandThem: function(feed, is_cat, root, parents) {
+ // expands all parents of specified feed to properly mark it as active
+ // my fav thing about frameworks is doing everything myself
+ try {
+ var test_id = is_cat ? 'CAT:' + feed : 'FEED:' + feed;
+
+ if (!root) {
+ if (!this.model || !this.model.store) return false;
+
+ var items = this.model.store._arrayOfTopLevelItems;
+
+ for (var i = 0; i < items.length; i++) {
+ if (String(items[i].id) == test_id) {
+ this.expandParentNodes(feed, is_cat, parents);
+ } else {
+ this.findNodeParentsAndExpandThem(feed, is_cat, items[i], []);
+ }
+ }
+ } else {
+ if (root.items) {
+ parents.push(root);
+
+ for (var i = 0; i < root.items.length; i++) {
+ if (String(root.items[i].id) == test_id) {
+ this.expandParentNodes(feed, is_cat, parents);
+ } else {
+ this.findNodeParentsAndExpandThem(feed, is_cat, root.items[i], parents);
+ }
+ }
+ } else {
+ if (String(root.id) == test_id) {
+ this.expandParentNodes(feed, is_cat, parents);
+ }
+ }
+ }
+ } catch (e) {
+ exception_error("findNodeParentsAndExpandThem", e);
+ }
+ },
selectFeed: function(feed, is_cat) {
+ this.findNodeParentsAndExpandThem(feed, is_cat, false, false);
+
if (is_cat)
treeNode = this._itemNodesMap['CAT:' + feed];
else