_createTreeNode: function(args) {
var tnode = new dijit._TreeNode(args);
- if (args.item.icon && args.item.icon[0])
- tnode.iconNode.src = args.item.icon[0];
+ var icon = dojo.doc.createElement('img');
+ if (args.item.icon && args.item.icon[0]) {
+ icon.src = args.item.icon[0];
+ } else {
+ icon.src = 'images/blank_icon.gif';
+ }
+ icon.className = 'tinyFeedIcon';
+ domConstruct.place(icon, tnode.iconNode, 'only');
var id = args.item.id[0];
var bare_id = parseInt(id.substr(id.indexOf(':')+1));
color: fg_color,
backgroundColor: bg_color});
- domConstruct.place(span, tnode.iconNode, 'replace');
+ domConstruct.place(span, tnode.iconNode, 'only');
}
if (id.match("FEED:")) {
ctr = node.counterNode;
ctr.innerHTML = item.unread > 0 ? item.unread : item.auxcounter;
item.unread > 0 || item.auxcounter > 0 ?
- Effect.Appear(ctr, {duration : 0.3,
- queue: { position: 'end', scope: 'CAPPEAR-' + item.id, limit: 1 }}) :
+ item.unread > 0 ?
+ Effect.Appear(ctr, {duration : 0.3,
+ queue: { position: 'end', scope: 'CAPPEAR-' + item.id, limit: 1 }}) :
+ Element.show(ctr) :
Element.hide(ctr);
item.unread == 0 && item.auxcounter > 0 ? ctr.addClassName("aux") : ctr.removeClassName("aux");
}
}
} catch (e) {
- exception_error("expandParentNodes", e);
+ exception_error(e);
}
},
findNodeParentsAndExpandThem: function(feed, is_cat, root, parents) {
}
}
} catch (e) {
- exception_error("findNodeParentsAndExpandThem", e);
+ exception_error(e);
}
},
selectFeed: function(feed, is_cat) {
treeNode = treeNode[0];
if (!is_cat) this._expandNode(treeNode);
this.set("selectedNodes", [treeNode]);
+ this.focusNode(treeNode);
+
+ // focus headlines to route key events there
+ setTimeout(function() {
+ $("headlines-frame").focus();
+ }, 0);
}
},
setFeedIcon: function(feed, is_cat, src) {
if (treeNode) {
treeNode = treeNode[0];
- treeNode.iconNode.src = src;
+ var icon = dojo.doc.createElement('img');
+ icon.src = src;
+ icon.className = 'tinyFeedIcon';
+ domConstruct.place(icon, treeNode.iconNode, 'only');
return true;
}
return false;
treeNode.loadingNode.src = src;
return true;
} else {
- treeNode.expandoNode.src = src;
+ var icon = dojo.doc.createElement('img');
+ icon.src = src;
+ icon.className = 'loadingExpando';
+ domConstruct.place(icon, treeNode.expandoNode, 'only');
return true;
}
}