mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
settings is fully moved to required.
This commit is contained in:
parent
73f3459264
commit
6f8c73771d
54 changed files with 533 additions and 439 deletions
|
@ -1,7 +1,8 @@
|
|||
"use strict";
|
||||
define(['app'], function () {
|
||||
NzbDrone.Settings.General.GeneralSettingsModel = Backbone.Model.extend({
|
||||
url: NzbDrone.Constants.ApiRoot + '/settings/host',
|
||||
define(['app', 'backbone', 'Mixins/AsChangeTrackingModel'], function (App, Backbone, AsChangeTrackingModel) {
|
||||
var model = Backbone.Model.extend({
|
||||
|
||||
url: App.Constants.ApiRoot + '/settings/host',
|
||||
|
||||
initialize: function () {
|
||||
this.on('change', function () {
|
||||
|
@ -13,4 +14,6 @@ define(['app'], function () {
|
|||
}, this);
|
||||
}
|
||||
});
|
||||
|
||||
return AsChangeTrackingModel.call(model);
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
define(['app', 'Settings/SettingsModel', 'Shared/Messenger'], function () {
|
||||
define(['app', 'Mixins/AsModelBoundView'], function (App, AsModelBoundView) {
|
||||
|
||||
NzbDrone.Settings.General.GeneralView = Backbone.Marionette.ItemView.extend({
|
||||
var view = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Settings/General/GeneralTemplate',
|
||||
|
||||
initialize: function () {
|
||||
|
@ -12,11 +12,13 @@ define(['app', 'Settings/SettingsModel', 'Shared/Messenger'], function () {
|
|||
if (!this.model.isSaved) {
|
||||
this.model.save(undefined, NzbDrone.Settings.SyncNotificaiton.callback({
|
||||
successMessage: 'General Settings saved',
|
||||
errorMessage: "Failed to save General Settings"
|
||||
errorMessage : "Failed to save General Settings"
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return AsModelBoundView.call(view);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue