summaryrefslogtreecommitdiff
path: root/js/PrefLabelTree.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-06 08:35:02 +0300
committerAndrew Dolgov <[email protected]>2018-12-06 08:35:02 +0300
commitfbaa5ea857ddc3fef430834861014968ca671c14 (patch)
tree5a3714ec2ba1a089ef1ddf253dd7bc7038a2888e /js/PrefLabelTree.js
parentfd10614f5df59968234ed25f46a5c109eca953f6 (diff)
label editor: fix changing tree color of edited item
Diffstat (limited to 'js/PrefLabelTree.js')
-rw-r--r--js/PrefLabelTree.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/PrefLabelTree.js b/js/PrefLabelTree.js
index 220fd9fe8..8de08d30b 100644
--- a/js/PrefLabelTree.js
+++ b/js/PrefLabelTree.js
@@ -20,9 +20,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
if (type == 'label') {
const label = dojo.doc.createElement('i');
//const fg_color = args.item.fg_color[0];
- const bg_color = args.item.bg_color[0];
+ const bg_color = String(args.item.bg_color);
label.className = "material-icons icon-label";
+ label.id = 'icon-label-' + String(args.item.bare_id);
label.innerHTML = "label";
label.setStyle({
color: bg_color,
@@ -82,11 +83,10 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
color = bg;
}
- const e = $("LICID-" + id);
+ const e = $("icon-label-" + id);
if (e) {
- if (fg) e.style.color = fg;
- if (bg) e.style.backgroundColor = bg;
+ if (fg) e.style.color = bg;
}
const query = {