mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-26 01:27:00 +00:00
General settings now with save
This commit is contained in:
parent
2e8311bdd0
commit
ff7292bbc1
1 changed files with 6 additions and 16 deletions
|
@ -1,23 +1,13 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
'Mixins/AsChangeTrackingModel'
|
||||
], function (Backbone, AsChangeTrackingModel) {
|
||||
var model = Backbone.Model.extend({
|
||||
'Settings/SettingsModelBase'
|
||||
], function (SettingsModelBase) {
|
||||
return SettingsModelBase.extend({
|
||||
|
||||
url: window.ApiRoot + '/settings/host',
|
||||
url : window.ApiRoot + '/settings/host',
|
||||
successMessage: 'General settings saved',
|
||||
errorMessage : 'Failed to save general settings'
|
||||
|
||||
initialize: function () {
|
||||
this.on('change', function () {
|
||||
this.isSaved = false;
|
||||
}, this);
|
||||
|
||||
this.on('sync', function () {
|
||||
this.isSaved = true;
|
||||
}, this);
|
||||
}
|
||||
});
|
||||
|
||||
return AsChangeTrackingModel.call(model);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue