1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/Settings/SyncNotification.js

32 lines
1.0 KiB
JavaScript
Raw Normal View History

2013-06-01 03:22:47 +03:00
"use strict";
define([
'app'
],
function () {
NzbDrone.Settings.SyncNotificaiton = {
callback: function (options) {
return {
success: function () {
if (options.successMessage) {
NzbDrone.Shared.Messenger.show({message: options.successMessage});
}
if (options.successCallback) {
options.successCallback.call(options.context);
}
},
error : function () {
if (options.errorMessage) {
NzbDrone.Shared.Messenger.show({message: options.errorMessage, type: 'error'});
}
if (options.errorCallback) {
options.errorCallback.call(options.context);
}
}
};
}
};
});