1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 00:15:55 +00:00

use template strings in a bunch of places instead of id concatenation

This commit is contained in:
Andrew Dolgov
2021-02-19 15:09:53 +03:00
parent 131f34648d
commit d9fe14a012
4 changed files with 19 additions and 21 deletions

View File

@@ -63,8 +63,6 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
editLabel: function(id) {
xhr.json("backend.php", {op: "pref-labels", method: "edit", id: id}, (reply) => {
console.log(reply);
const fg_color = reply['fg_color'];
const bg_color = reply['bg_color'] ? reply['bg_color'] : '#fff7d5';
@@ -87,7 +85,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/f
color = bg;
}
const e = App.byId("icon-label-" + id);
const e = App.byId(`icon-label-${id}`);
if (e) {
if (bg) e.style.color = bg;