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.
Lidarr/UI/Settings/Naming/NamingView.js

32 lines
949 B

12 years ago
'use strict';
12 years ago
define(['app', 'Settings/Naming/NamingModel'], function () {
12 years ago
NzbDrone.Settings.Naming.NamingView = Backbone.Marionette.ItemView.extend({
template : 'Settings/Naming/NamingTemplate',
12 years ago
ui: {
tooltip: '[class^="help-inline"] i'
12 years ago
},
initialize: function () {
12 years ago
this.model = new NzbDrone.Settings.Naming.NamingModel();
this.model.fetch();
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
},
12 years ago
onRender: function () {
//TODO: Move this to a mixin
this.ui.tooltip.tooltip({ placement: 'right' });
12 years ago
},
saveSettings: function () {
this.model.save(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
successMessage: 'Naming Settings saved',
errorMessage: "Failed to save Naming Settings"
}));
12 years ago
}
});
12 years ago
})
;