2013-06-24 23:41:59 +00:00
|
|
|
|
'use strict';
|
|
|
|
|
define(
|
|
|
|
|
[
|
|
|
|
|
'backbone',
|
|
|
|
|
'Mixins/AsChangeTrackingModel'
|
|
|
|
|
], function (Backbone, AsChangeTrackingModel) {
|
|
|
|
|
var model = Backbone.Model.extend({
|
2013-06-19 01:02:23 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
url: window.ApiRoot + '/settings/host',
|
2013-05-23 05:12:01 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
initialize: function () {
|
|
|
|
|
this.on('change', function () {
|
|
|
|
|
this.isSaved = false;
|
|
|
|
|
}, this);
|
2013-05-23 05:12:01 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
this.on('sync', function () {
|
|
|
|
|
this.isSaved = true;
|
|
|
|
|
}, this);
|
|
|
|
|
}
|
|
|
|
|
});
|
2013-06-19 01:02:23 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
return AsChangeTrackingModel.call(model);
|
|
|
|
|
});
|