mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
fixed saving settings. now done more generically.
This commit is contained in:
@@ -1,24 +1,8 @@
|
||||
'use strict';
|
||||
define(['app', 'Mixins/AsModelBoundView'], function (App, AsModelBoundView) {
|
||||
|
||||
var view = Backbone.Marionette.ItemView.extend({
|
||||
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, NzbDrone.Settings.SyncNotificaiton.callback({
|
||||
successMessage: 'General Settings saved',
|
||||
errorMessage : "Failed to save General Settings"
|
||||
}));
|
||||
}
|
||||
}
|
||||
define(['marionette'], function (Marionette) {
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Settings/General/GeneralTemplate'
|
||||
}
|
||||
);
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user