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:
@@ -2,8 +2,7 @@
|
||||
define(['app',
|
||||
'marionette',
|
||||
'Settings/Naming/NamingModel',
|
||||
'Settings/SyncNotification',
|
||||
'Mixins/AsModelBoundView'], function (App, Marionette, NamingModel, SyncNotification, AsModelBoundView) {
|
||||
'Mixins/AsModelBoundView'], function (App, Marionette, NamingModel, AsModelBoundView) {
|
||||
|
||||
var view = Marionette.ItemView.extend({
|
||||
template: 'Settings/Naming/NamingTemplate',
|
||||
@@ -11,17 +10,8 @@ define(['app',
|
||||
initialize: function () {
|
||||
this.model = new NamingModel();
|
||||
this.model.fetch();
|
||||
|
||||
this.listenTo(App.vent, App.Commands.SaveSettings, this.saveSettings);
|
||||
|
||||
},
|
||||
|
||||
saveSettings: function () {
|
||||
this.model.saveIfChanged(undefined, SyncNotification.callback({
|
||||
successMessage: 'Naming Settings saved',
|
||||
errorMessage : "Failed to save Naming Settings"
|
||||
}));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
|
Reference in New Issue
Block a user