You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
32 lines
1.0 KiB
12 years ago
|
"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);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
});
|
||
|
|