1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 00:12:30 +01:00
Sonarr/UI/Shared/Messenger.js

28 lines
769 B
JavaScript
Raw Normal View History

2013-05-12 01:39:32 +02:00
"use strict";
define(['app'], function () {
NzbDrone.Shared.Messenger = {
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
});
}};
});