1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-27 02:07:41 +00:00
Sonarr/UI/Shared/Messenger.js

28 lines
739 B
JavaScript
Raw Normal View History

2013-05-11 23:39:32 +00:00
"use strict";
2013-06-19 01:02:23 +00:00
define(function () {
return {
2013-05-11 23:39:32 +00:00
show: function (options) {
if (!options.type) {
options.type = 'info';
}
if (!options.hideAfter) {
switch (options.type) {
case 'info':
options.hideAfter = 5;
break;
case 'error':
options.hideAfter = 0;
}
}
return window.Messenger().post({
message : options.message,
type : options.type,
showCloseButton: true,
hideAfter : options.hideAfter
});
}};
});