Add What's new modal (#372)

This commit is contained in:
Gautier P 2021-02-23 18:27:08 +01:00 committed by GitHub
parent 0ee37f557a
commit 1a695db333
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 133 additions and 4 deletions

View file

@ -12,8 +12,19 @@ BR.Message = L.Class.extend({
_show: function (msg, type) {
var ele = L.DomUtil.get(this.id),
iconClass = type === 'warning' ? 'fa-exclamation-triangle' : 'fa-times-circle',
alertClass = type === 'warning' ? 'alert-warning' : 'alert-danger';
iconClass,
alertClass;
switch (type) {
case 'error':
iconClass = 'fa-times-circle';
alertClass = 'alert-danger';
case 'warning':
iconClass = 'fa-exclamation-triangle';
alertClass = 'alert-warning';
case 'info':
iconClass = 'fa-info-circle';
alertClass = 'alert-info';
}
L.DomEvent.disableClickPropagation(ele);
@ -59,6 +70,10 @@ BR.Message = L.Class.extend({
showWarning: function (msg) {
this._show(msg, 'warning');
},
showInfo: function (msg) {
this._show(msg, 'info');
},
});
// static instance as global control