mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 09:35:55 +00:00
lib: Upgrade Dojo and Dijit from 1.8.3 to 1.12.1
The itemNode and expandoNode elements have changed from img to span (https://bugs.dojotoolkit.org/ticket/16699), so we now put our tree icons inside them rather than replacing them. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
@@ -104,8 +104,14 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
|
||||
_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));
|
||||
@@ -121,7 +127,7 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
|
||||
color: fg_color,
|
||||
backgroundColor: bg_color});
|
||||
|
||||
domConstruct.place(span, tnode.iconNode, 'replace');
|
||||
domConstruct.place(span, tnode.iconNode, 'only');
|
||||
}
|
||||
|
||||
if (id.match("FEED:")) {
|
||||
@@ -358,7 +364,10 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
|
||||
|
||||
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;
|
||||
@@ -375,7 +384,9 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
|
||||
treeNode.loadingNode.src = src;
|
||||
return true;
|
||||
} else {
|
||||
treeNode.expandoNode.src = src;
|
||||
var icon = dojo.doc.createElement('img');
|
||||
icon.src = src;
|
||||
domConstruct.place(icon, treeNode.expandoNode, 'only');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user