if (kind != "cat") {
//setFeedValue(id, false, 'error', error);
setFeedValue(id, false, 'updated', updated);
+
+ if (id > 0) {
+ if (has_img) {
+ setFeedIcon(id, false,
+ getInitParam("icons_url") + "/" + id + ".ico");
+ } else {
+ setFeedIcon(id, false, 'images/blank_icon.gif');
+ }
+ }
}
}
exception_error("selectFeed", e);
}
}
+
+function setFeedIcon(feed, is_cat, src) {
+ try {
+ var tree = dijit.byId("feedTree");
+
+ if (is_cat)
+ treeNode = tree._itemNodesMap['CAT:' + feed];
+ else
+ treeNode = tree._itemNodesMap['FEED:' + feed];
+
+ if (treeNode) {
+ treeNode = treeNode[0];
+ treeNode.iconNode.src = src;
+ }
+
+ } catch (e) {
+ exception_error("setFeedIcon", e);
+ }
+}
model: treeModel,
_createTreeNode: function(args) {
var tnode = new dijit._TreeNode(args);
- tnode.labelNode.innerHTML = args.label;
+
+ if (args.item.icon)
+ tnode.iconNode.src = args.item.icon[0];
+
+ //tnode.labelNode.innerHTML = args.label;
return tnode;
},
+ getIconClass: function (item, opened) {
+ return (!item || this.model.mayHaveChildren(item)) ? (opened ? "dijitFolderOpened" : "dijitFolderClosed") : "feedIcon";
+ },
getLabelClass: function (item, opened) {
return (item.unread == 0) ? "dijitTreeLabel" : "dijitTreeLabel Unread";
},