1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-06 06:41:40 +02:00
Sonarr/UI/Settings/SyncNotification.js

28 lines
881 B
JavaScript
Raw Normal View History

2013-06-01 03:22:47 +03:00
"use strict";
2013-06-19 04:02:23 +03:00
define(['shared/messenger'], function (Messenger) {
return {
callback: function (options) {
return {
success: function () {
if (options.successMessage) {
Messenger.show({message: options.successMessage});
}
2013-06-01 03:22:47 +03:00
2013-06-19 04:02:23 +03:00
if (options.successCallback) {
options.successCallback.call(options.context);
}
},
error : function () {
if (options.errorMessage) {
Messenger.show({message: options.errorMessage, type: 'error'});
2013-06-01 03:22:47 +03:00
}
2013-06-19 04:02:23 +03:00
if (options.errorCallback) {
options.errorCallback.call(options.context);
}
}
};
}
};
});