提交 f5d98421 编写于 作者: M Matt Sicker 提交者: Jenkins CERT CI

[SECURITY-1889]

上级 fe9091fc
......@@ -3048,6 +3048,8 @@ var notificationBar = {
this.div.onclick = function() {
self.hide();
};
} else {
this.div.innerHTML = "";
}
},
// cancel pending auto-hide timeout
......@@ -3066,7 +3068,19 @@ var notificationBar = {
show : function (text,options) {
options = options || {};
this.init();
this.div.innerHTML = "<div style=color:"+(options.iconColor || this.defaultIconColor)+";display:inline-block;><svg viewBox='0 0 24 24' focusable='false' class='svg-icon'><use href='"+rootURL+"/images/material-icons/"+(options.icon || this.defaultIcon)+"'></use></svg></div><span> "+text+"</span>";
var icon = this.div.appendChild(document.createElement("div"));
icon.style.display = "inline-block";
if (options.iconColor || this.defaultIconColor) {
icon.style.color = options.iconColor || this.defaultIconColor;
}
var svg = icon.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
svg.setAttribute("viewBox", "0 0 24 24");
svg.setAttribute("focusable", "false");
svg.setAttribute("class", "svg-icon");
var use = svg.appendChild(document.createElementNS("http://www.w3.org/2000/svg","use"));
use.setAttribute("href", rootURL + "/images/material-icons/" + (options.icon || this.defaultIcon));
var message = this.div.appendChild(document.createElement("span"));
message.appendChild(document.createTextNode(text));
this.div.className=options.alertClass || this.defaultAlertClass;
this.div.classList.add("notif-alert-show");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册