From d99d04a2ae21af1a67e7e7acfc9b1a5fe4273cac Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 6 Dec 2018 12:52:44 +0300 Subject: notify: use iconfont, update colors and increase height a bit --- js/common.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'js/common.js') diff --git a/js/common.js b/js/common.js index 150288bc2..6fde1e3ce 100755 --- a/js/common.js +++ b/js/common.js @@ -170,8 +170,7 @@ const Notify = { } let msgfmt = "%s".replace("%s", __(msg)); - let icon = false; - + let icon = ""; notify.className = "notify"; @@ -180,22 +179,28 @@ const Notify = { switch (kind) { case this.KIND_INFO: notify.addClassName("notify_info") - icon = App.getInitParam("icon_information"); + icon = "notifications"; break; case this.KIND_ERROR: notify.addClassName("notify_error"); - icon = App.getInitParam("icon_alert"); + icon = "error"; break; case this.KIND_PROGRESS: notify.addClassName("notify_progress"); icon = App.getInitParam("icon_indicator_white") break; + default: + icon = "notifications"; } - if (icon) msgfmt = "".replace("%s", icon) + msgfmt; + if (icon) + if (icon.indexOf("data:image") != -1) + msgfmt = "".replace("%s", icon) + msgfmt; + else + msgfmt = "%s".replace("%s", icon) + msgfmt; - msgfmt += (" ") + msgfmt += ("close") .replace("%s", App.getInitParam("icon_cross")); notify.innerHTML = msgfmt; -- cgit v1.2.3-54-g00ecf