You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radarr/UI/Settings/Naming/NamingView.js

29 lines
847 B

12 years ago
'use strict';
define(['app',
'marionette',
'Settings/Naming/NamingModel',
'Settings/SyncNotification',
'Mixins/AsModelBoundView'], function (App, Marionette, NamingModel, SyncNotification, AsModelBoundView) {
12 years ago
var view = Marionette.ItemView.extend({
template: 'Settings/Naming/NamingTemplate',
12 years ago
initialize: function () {
this.model = new NamingModel();
12 years ago
this.model.fetch();
this.listenTo(App.vent, App.Commands.SaveSettings, this.saveSettings);
},
12 years ago
saveSettings: function () {
this.model.saveIfChanged(undefined, SyncNotification.callback({
successMessage: 'Naming Settings saved',
errorMessage : "Failed to save Naming Settings"
}));
12 years ago
}
});
return AsModelBoundView.call(view);
});