mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07:00
Better message handling on save
This commit is contained in:
parent
03c085030e
commit
ef58acb4b5
7 changed files with 63 additions and 64 deletions
31
UI/Settings/SyncNotification.js
Normal file
31
UI/Settings/SyncNotification.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
"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);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue