|
|
@ -1,23 +1,13 @@
|
|
|
|
'use strict';
|
|
|
|
'use strict';
|
|
|
|
define(
|
|
|
|
define(
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'backbone',
|
|
|
|
'Settings/SettingsModelBase'
|
|
|
|
'Mixins/AsChangeTrackingModel'
|
|
|
|
], function (SettingsModelBase) {
|
|
|
|
], function (Backbone, AsChangeTrackingModel) {
|
|
|
|
return SettingsModelBase.extend({
|
|
|
|
var model = Backbone.Model.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);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|