mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
fixed saving settings. now done more generically.
This commit is contained in:
parent
d126c6efc1
commit
806e58ed1f
13 changed files with 104 additions and 161 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue