Able to create new Newznab indexers

This commit is contained in:
Mark McDowall 2013-05-28 17:44:29 -07:00
parent 5660b5086c
commit e4410d8cb7
8 changed files with 117 additions and 13 deletions

View file

@ -5,23 +5,22 @@ define(['app', 'Settings/SettingsModel', 'Shared/Messenger'], function () {
template: 'Settings/General/GeneralTemplate',
initialize: function () {
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
},
saveSettings: function () {
if (!this.model.isSaved) {
this.model.save(undefined, this.syncNotification("Naming Settings Saved", "Couldn't Save Naming Settings"));
this.model.save(undefined, this.syncNotification("General Settings Saved", "Couldn't Save General Settings"));
}
},
syncNotification: function (success, error) {
return {
success: function () {
NzbDrone.Shared.Messenger.show({message: 'General Settings Saved'});
NzbDrone.Shared.Messenger.show({message: success});
},
error : function () {
NzbDrone.Shared.Messenger.show({message: "Couldn't Save General Settings", type: 'error'});
NzbDrone.Shared.Messenger.show({message: error, type: 'error'});
}
};
}