2013-05-23 07:12:01 +02:00
|
|
|
|
'use strict';
|
|
|
|
|
define(['app', 'Settings/SettingsModel', 'Shared/Messenger'], function () {
|
|
|
|
|
|
|
|
|
|
NzbDrone.Settings.General.GeneralView = 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-06-01 02:22:47 +02:00
|
|
|
|
this.model.save(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
|
|
|
|
|
successMessage: 'General Settings saved',
|
|
|
|
|
errorMessage: "Failed to save General Settings"
|
|
|
|
|
}));
|
2013-05-23 07:12:01 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|