Show a blank icon in PrefFeedTree if there is no favicon for a feed.

Duplicates behavior of FeedTree.
Prevents a broken request to 'false' if a feed doesn't have a favicon.
This commit is contained in:
wn_ 2017-05-27 12:25:59 -05:00
parent e50a647916
commit b3e3cb06d9
1 changed files with 6 additions and 4 deletions

View File

@ -23,12 +23,14 @@ require(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functi
_createTreeNode: function(args) {
var tnode = this.inherited(arguments);
if (args.item.icon) {
var icon = dojo.doc.createElement('img');
var icon = dojo.doc.createElement('img');
if (args.item.icon && args.item.icon[0]) {
icon.src = args.item.icon[0];
icon.className = 'tinyFeedIcon';
domConstruct.place(icon, tnode.iconNode, 'only');
} else {
icon.src = 'images/blank_icon.gif';
}
icon.className = 'tinyFeedIcon';
domConstruct.place(icon, tnode.iconNode, 'only');
var param = this.model.store.getValue(args.item, 'param');