1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 01:27:00 +00:00
Lidarr/UI/Settings/Naming/NamingView.js
2013-06-13 21:35:57 -07:00

24 lines
783 B
JavaScript

'use strict';
define(['app',
'Settings/Naming/NamingModel',
'Settings/SyncNotification'], function () {
NzbDrone.Settings.Naming.NamingView = Backbone.Marionette.ItemView.extend({
template : 'Settings/Naming/NamingTemplate',
initialize: function () {
this.model = new NzbDrone.Settings.Naming.NamingModel();
this.model.fetch();
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
},
saveSettings: function () {
this.model.saveIfChanged(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
successMessage: 'Naming Settings saved',
errorMessage: "Failed to save Naming Settings"
}));
}
});
})
;