mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
settings is fully moved to required.
This commit is contained in:
parent
73f3459264
commit
6f8c73771d
54 changed files with 533 additions and 439 deletions
|
@ -1,24 +1,28 @@
|
|||
'use strict';
|
||||
define(['app',
|
||||
'Settings/Naming/NamingModel',
|
||||
'Settings/SyncNotification'], function () {
|
||||
'marionette',
|
||||
'Settings/Naming/NamingModel',
|
||||
'Settings/SyncNotification',
|
||||
'Mixins/AsModelBoundView'], function (App, Marionette, NamingModel, SyncNotification, AsModelBoundView) {
|
||||
|
||||
NzbDrone.Settings.Naming.NamingView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Settings/Naming/NamingTemplate',
|
||||
var view = Marionette.ItemView.extend({
|
||||
template: 'Settings/Naming/NamingTemplate',
|
||||
|
||||
initialize: function () {
|
||||
this.model = new NzbDrone.Settings.Naming.NamingModel();
|
||||
this.model = new NamingModel();
|
||||
this.model.fetch();
|
||||
|
||||
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
|
||||
this.listenTo(App.vent, App.Commands.SaveSettings, this.saveSettings);
|
||||
|
||||
},
|
||||
|
||||
saveSettings: function () {
|
||||
this.model.saveIfChanged(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
|
||||
this.model.saveIfChanged(undefined, SyncNotification.callback({
|
||||
successMessage: 'Naming Settings saved',
|
||||
errorMessage: "Failed to save Naming Settings"
|
||||
errorMessage : "Failed to save Naming Settings"
|
||||
}));
|
||||
}
|
||||
});
|
||||
})
|
||||
;
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue