X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=js%2FPrefLabelTree.js;h=7321b80d816f10a8d2504aa75acd7c2b48064d1b;hb=07fd4f8d9d4f301f5ad88ff9e80f042fc3eb0c36;hp=9c43346b3354bc0c732c1c5423d3cf05fc39ea67;hpb=e2e2479984b3aaadb4c0947e5ec15276e5c9a337;p=tt-rss.git diff --git a/js/PrefLabelTree.js b/js/PrefLabelTree.js index 9c43346b..7321b80d 100644 --- a/js/PrefLabelTree.js +++ b/js/PrefLabelTree.js @@ -1,23 +1,24 @@ -require(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/form/DropDownButton"], function (declare, domConstruct) { +/* global lib,dijit */ +define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/form/DropDownButton"], function (declare, domConstruct) { return declare("fox.PrefLabelTree", lib.CheckBoxTree, { setNameById: function (id, name) { - var item = this.model.store._itemsByIdentity['LABEL:' + id]; + const item = this.model.store._itemsByIdentity['LABEL:' + id]; if (item) this.model.store.setValue(item, 'name', name); }, _createTreeNode: function(args) { - var tnode = this.inherited(arguments); + const tnode = this.inherited(arguments); - var fg_color = this.model.store.getValue(args.item, 'fg_color'); - var bg_color = this.model.store.getValue(args.item, 'bg_color'); - var type = this.model.store.getValue(args.item, 'type'); - var bare_id = this.model.store.getValue(args.item, 'bare_id'); + const fg_color = this.model.store.getValue(args.item, 'fg_color'); + const bg_color = this.model.store.getValue(args.item, 'bg_color'); + const type = this.model.store.getValue(args.item, 'type'); + const bare_id = this.model.store.getValue(args.item, 'bare_id'); if (type == 'label') { - var span = dojo.doc.createElement('span'); + const span = dojo.doc.createElement('span'); span.innerHTML = 'α'; span.className = 'labelColorIndicator'; span.id = 'LICID-' + bare_id;