mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-25 17:27:18 +00:00
31 lines
616 B
JavaScript
31 lines
616 B
JavaScript
'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;
|
|
};
|
|
}
|
|
);
|