mirror of
https://github.com/Radarr/Radarr
synced 2024-12-29 11:25:26 +00:00
31 lines
949 B
JavaScript
31 lines
949 B
JavaScript
'use strict';
|
|
define(['app', 'Settings/Naming/NamingModel'], function () {
|
|
|
|
NzbDrone.Settings.Naming.NamingView = Backbone.Marionette.ItemView.extend({
|
|
template : 'Settings/Naming/NamingTemplate',
|
|
|
|
ui: {
|
|
tooltip: '[class^="help-inline"] i'
|
|
},
|
|
|
|
initialize: function () {
|
|
this.model = new NzbDrone.Settings.Naming.NamingModel();
|
|
this.model.fetch();
|
|
|
|
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
|
|
},
|
|
|
|
onRender: function () {
|
|
//TODO: Move this to a mixin
|
|
this.ui.tooltip.tooltip({ placement: 'right' });
|
|
},
|
|
|
|
saveSettings: function () {
|
|
this.model.save(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
|
|
successMessage: 'Naming Settings saved',
|
|
errorMessage: "Failed to save Naming Settings"
|
|
}));
|
|
}
|
|
});
|
|
})
|
|
;
|