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