Better message handling on save

This commit is contained in:
Mark McDowall 2013-05-31 17:22:47 -07:00
parent 03c085030e
commit ef58acb4b5
7 changed files with 63 additions and 64 deletions

View file

@ -21,20 +21,10 @@ define(['app', 'Settings/Naming/NamingModel'], function () {
},
saveSettings: function () {
this.model.save(undefined, this.syncNotification("Naming Settings Saved", "Couldn't Save Naming Settings"));
},
syncNotification: function (success, error) {
return {
success: function () {
window.alert(success);
},
error: function () {
window.alert(error);
}
};
this.model.save(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
successMessage: 'Naming Settings saved',
errorMessage: "Failed to save Naming Settings"
}));
}
});
})