From: Anders Kaseorg Date: Fri, 20 Jan 2017 17:29:59 +0000 (-0500) Subject: lib: Upgrade Dojo and Dijit from 1.8.3 to 1.12.1 X-Git-Tag: 17.1~14^2~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6887a0f57307820b097b51aee952c555bcf69024;p=tt-rss.git 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 --- diff --git a/css/dijit.css b/css/dijit.css index d5dfb748..68a426e3 100644 --- a/css/dijit.css +++ b/css/dijit.css @@ -417,10 +417,8 @@ button[disabled], border-color: rgba(82, 168, 236, 0.8); } -.claro .dijitMenu .dijitMenuItem.dijitHover, -.claro .dijitMenu .dijitMenuItem.dijitFocused, -.claro .dijitMenuTable .dijitMenuItem.dijitHover .dijitMenuItemLabel, -.claro .dijitMenuTable .dijitMenuItem.dijitFocused .dijitMenuItemLabel { +.claro .dijitMenu .dijitMenuItemSelected, +.claro .dijitMenu .dijitMenuItemSelected td { background : rgb(82, 168, 236); color : white; border-color : rgba(82, 168, 236, 0.8); diff --git a/js/FeedTree.js b/js/FeedTree.js index 5052f38d..320f9926 100644 --- a/js/FeedTree.js +++ b/js/FeedTree.js @@ -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; } } diff --git a/js/PrefFeedTree.js b/js/PrefFeedTree.js index c3a089d0..3cf8257b 100644 --- a/js/PrefFeedTree.js +++ b/js/PrefFeedTree.js @@ -23,8 +23,12 @@ require(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functi _createTreeNode: function(args) { var tnode = this.inherited(arguments); - if (args.item.icon) - tnode.iconNode.src = args.item.icon[0]; + if (args.item.icon) { + var icon = dojo.doc.createElement('img'); + icon.src = args.item.icon[0]; + icon.className = 'tinyFeedIcon'; + domConstruct.place(icon, tnode.iconNode, 'only'); + } var param = this.model.store.getValue(args.item, 'param'); diff --git a/lib/dijit/BackgroundIframe.js b/lib/dijit/BackgroundIframe.js index 8b6f3f85..8f229323 100644 --- a/lib/dijit/BackgroundIframe.js +++ b/lib/dijit/BackgroundIframe.js @@ -1,2 +1,2 @@ //>>built -define("dijit/BackgroundIframe",["require","./main","dojo/_base/config","dojo/dom-construct","dojo/dom-style","dojo/_base/lang","dojo/on","dojo/sniff","dojo/_base/window"],function(_1,_2,_3,_4,_5,_6,on,_7,_8){var _9=new function(){var _a=[];this.pop=function(){var _b;if(_a.length){_b=_a.pop();_b.style.display="";}else{if(_7("ie")<9){var _c=_3["dojoBlankHtmlUrl"]||_1.toUrl("dojo/resources/blank.html")||"javascript:\"\"";var _d="