mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
settings is fully moved to required.
This commit is contained in:
31
UI/Mixins/AsChangeTrackingModel.js
Normal file
31
UI/Mixins/AsChangeTrackingModel.js
Normal file
@@ -0,0 +1,31 @@
|
||||
'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;
|
||||
};
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user