You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
616 B
32 lines
616 B
'use strict';
|
|
|
|
define(
|
|
function () {
|
|
|
|
return function () {
|
|
|
|
var originalInit = this.prototype.initialize;
|
|
|
|
this.prototype.initialize = function () {
|
|
|
|
this.isSaved = true;
|
|
|
|
this.on('change', function () {
|
|
this.isSaved = false;
|
|
}, this);
|
|
|
|
this.on('sync', function () {
|
|
this.isSaved = true;
|
|
}, this);
|
|
|
|
|
|
if (originalInit) {
|
|
originalInit.call(this);
|
|
}
|
|
};
|
|
|
|
return this;
|
|
};
|
|
}
|
|
);
|