diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5e36a8b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "workbench.colorCustomizations": { + "tab.unfocusedActiveBorder": "#fff0" + } +} \ No newline at end of file diff --git a/bootstrap-notify.js b/bootstrap-notify.js index d97e4c0..0a7c045 100644 --- a/bootstrap-notify.js +++ b/bootstrap-notify.js @@ -154,7 +154,9 @@ this.$ele.removeClass('alert-' + self.settings.type); this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass('progress-bar-' + self.settings.type); self.settings.type = commands[cmd]; - this.$ele.addClass('alert-' + commands[cmd]).find('[data-notify="progressbar"] > .progress-bar').addClass('progress-bar-' + commands[cmd]); + var regex = /\w[^-]*$/; + var notify_type = self.settings.type.match(regex); + this.$ele.addClass('alert-' + commands[command]).find('[data-notify="progressbar"] > .progress-bar').addClass('progress-bar-' + notify_type); break; case "icon": var $icon = this.$ele.find('[data-notify="icon"]');