Skip to content
Snippets Groups Projects
Commit 5bde42fc authored by bbaer's avatar bbaer
Browse files

added title

parent 69d0ee36
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,8 @@ var QfqNS = QfqNS || {};
// new style
this.message = options.message || "MESSAGE";
this.messageType = options.type || "info";
this.messageTitle = options.title || false;
this.errorCode = options.code || false;
this.buttons = options.buttons || [];
this.modal = options.modal || false;
this.timeout = options.timeout || n.Alert.constants.NO_TIMEOUT;
......@@ -230,6 +232,12 @@ var QfqNS = QfqNS || {};
//this.$modalDiv.css('height', Math.max(document.documentElement.clientHeight, window.innerHeight || 0));
}
if (this.messageTitle) {
this.$titleWrap = $("<p>")
.addClass("title")
.append(this.messageTitle);
}
this.$messageWrap = $("<p>")
.addClass("body")
.append(this.message);
......@@ -240,6 +248,10 @@ var QfqNS = QfqNS || {};
.attr("role", "alert")
.append(this.$messageWrap);
if (this.$titleWrap) {
this.$alertDiv.prepend(this.$titleWrap);
}
if (this.modal) {
this.$alertDiv.addClass("alert-interactive");
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment