mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
25 lines
789 B
JavaScript
25 lines
789 B
JavaScript
'use strict';
|
|
define(['app', 'Mixins/AsModelBoundView'], function (App, AsModelBoundView) {
|
|
|
|
var view = Backbone.Marionette.ItemView.extend({
|
|
template: 'Settings/General/GeneralTemplate',
|
|
|
|
initialize: function () {
|
|
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
|
|
},
|
|
|
|
saveSettings: function () {
|
|
if (!this.model.isSaved) {
|
|
this.model.save(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
|
|
successMessage: 'General Settings saved',
|
|
errorMessage : "Failed to save General Settings"
|
|
}));
|
|
}
|
|
}
|
|
}
|
|
);
|
|
|
|
return AsModelBoundView.call(view);
|
|
});
|
|
|