define(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"], function (declare, domConstruct) {
return declare("fox.FeedTree", dijit.Tree, {
define(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"], function (declare, domConstruct) {
return declare("fox.FeedTree", dijit.Tree, {
icon.className = 'tinyFeedIcon';
domConstruct.place(icon, tnode.iconNode, 'only');
icon.className = 'tinyFeedIcon';
domConstruct.place(icon, tnode.iconNode, 'only');
- var span = dojo.doc.createElement('span');
- var fg_color = args.item.fg_color[0];
- var bg_color = args.item.bg_color[0];
+ const span = dojo.doc.createElement('span');
+ const fg_color = args.item.fg_color[0];
+ const bg_color = args.item.bg_color[0];
return (item.unread == 0) ? "dijitTreeLabel" : "dijitTreeLabel Unread";
},
getRowClass: function (item, opened) {
return (item.unread == 0) ? "dijitTreeLabel" : "dijitTreeLabel Unread";
},
getRowClass: function (item, opened) {
- for (var i = 0; i < list.length; i++) {
- var id = String(list[i].id);
- var item = this._itemNodesMap[id];
+ for (let i = 0; i < list.length; i++) {
+ const id = String(list[i].id);
+ let item = this._itemNodesMap[id];
// expands all parents of specified feed to properly mark it as active
// my fav thing about frameworks is doing everything myself
try {
// expands all parents of specified feed to properly mark it as active
// my fav thing about frameworks is doing everything myself
try {
if (String(items[i].id) == test_id) {
this.expandParentNodes(feed, is_cat, parents);
} else {
this.findNodeParentsAndExpandThem(feed, is_cat, items[i], []);
}
}
if (String(items[i].id) == test_id) {
this.expandParentNodes(feed, is_cat, parents);
} else {
this.findNodeParentsAndExpandThem(feed, is_cat, items[i], []);
}
}
if (String(root.items[i].id) == test_id) {
this.expandParentNodes(feed, is_cat, parents);
} else {
this.findNodeParentsAndExpandThem(feed, is_cat, root.items[i], parents.slice(0));
}
}
if (String(root.items[i].id) == test_id) {
this.expandParentNodes(feed, is_cat, parents);
} else {
this.findNodeParentsAndExpandThem(feed, is_cat, root.items[i], parents.slice(0));
}
}
icon.src = src;
icon.className = 'tinyFeedIcon';
domConstruct.place(icon, treeNode.iconNode, 'only');
icon.src = src;
icon.className = 'tinyFeedIcon';
domConstruct.place(icon, treeNode.iconNode, 'only');
icon.src = src;
icon.className = 'loadingExpando';
domConstruct.place(icon, treeNode.expandoNode, 'only');
icon.src = src;
icon.className = 'loadingExpando';
domConstruct.place(icon, treeNode.expandoNode, 'only');
- var id = String(cat.id);
- var node = tree._itemNodesMap[id];
- var bare_id = parseInt(id.substr(id.indexOf(":")+1));
+ const id = String(cat.id);
+ const node = tree._itemNodesMap[id];
+ const bare_id = parseInt(id.substr(id.indexOf(":")+1));
if (hide && cat_unread == 0 && check_unread == 0 && (id != "CAT:-1" || !show_special)) {
Effect.Fade(node[0].rowNode, {duration : 0.3,
if (hide && cat_unread == 0 && check_unread == 0 && (id != "CAT:-1" || !show_special)) {
Effect.Fade(node[0].rowNode, {duration : 0.3,
cats.each(function(cat) {
tree.hideReadCat(cat, hide, show_special);
cats.each(function(cat) {
tree.hideReadCat(cat, hide, show_special);
- var unread = feed.unread[0];
- var has_error = feed.error[0] != '';
- var node = tree._itemNodesMap[id];
+ const unread = feed.unread[0];
+ const has_error = feed.error[0] != '';
+ const node = tree._itemNodesMap[id];
- var node = tree._itemNodesMap['CAT:' + id][0];
- var item = tree.model.store._itemsByIdentity['CAT:' + id];
+ const node = tree._itemNodesMap['CAT:' + id][0];
+ const item = tree.model.store._itemsByIdentity['CAT:' + id];
- for (var i = 0; i < items.length; i++) {
- var id = String(items[i].id);
- var box = this._itemNodesMap[id];
+ for (let i = 0; i < items.length; i++) {
+ const id = String(items[i].id);
+ const box = this._itemNodesMap[id];
- var feed_id = String(items[i].bare_id);
- var is_cat = !id.match('FEED:');
- var unread = this.model.getFeedUnread(feed_id, is_cat);
+ const feed_id = String(items[i].bare_id);
+ const is_cat = !id.match('FEED:');
+ const unread = this.model.getFeedUnread(feed_id, is_cat);
- for (var j = i+1; j < items.length; j++) {
- var id = String(items[j].id);
- var box = this._itemNodesMap[id];
+ for (let j = i+1; j < items.length; j++) {
+ const id = String(items[j].id);
+ const box = this._itemNodesMap[id];
- items = this.model.store._arrayOfAllItems;
- var item = items[0] == treeItem ? items[items.length-1] : items[0];
+ const items = this.model.store._arrayOfAllItems;
+ let item = items[0] == treeItem ? items[items.length-1] : items[0];
- for (var j = i-1; j > 0; j--) {
- var id = String(items[j].id);
- var box = this._itemNodesMap[id];
+ for (let j = i-1; j > 0; j--) {
+ const id = String(items[j].id);
+ const box = this._itemNodesMap[id];