1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-07-01 00:45:18 +02:00
Files
Sonarr/UI/Settings/General/GeneralView.js

25 lines
789 B
JavaScript
Raw Normal View History

'use strict';
2013-06-18 18:02:23 -07:00
define(['app', 'Mixins/AsModelBoundView'], function (App, AsModelBoundView) {
2013-06-18 18:02:23 -07:00
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) {
2013-05-31 17:22:47 -07:00
this.model.save(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
successMessage: 'General Settings saved',
2013-06-18 18:02:23 -07:00
errorMessage : "Failed to save General Settings"
2013-05-31 17:22:47 -07:00
}));
}
}
}
);
2013-06-18 18:02:23 -07:00
return AsModelBoundView.call(view);
});