Ext.define('App.mixin.DirtyTracking', {
extend: 'Ext.Mixin',
mixinConfig: {
id: 'dirtytracking'
},
// Добавляются методы и обработчики
onFieldChange: function(field, newValue, oldValue) {
if (newValue !== oldValue) {
this.markAsDirty();
}
},
markAsDirty: function() {
this.dirty = true;
this.fireEvent('dirtychange', this, true);
}
});
Ext.define('App.mixin.DirtyTracking', {
extend: 'Ext.Mixin',
mixinConfig: {
id: 'dirtytracking'
},
// Добавляются методы и обработчики
onFieldChange: function(field, newValue, oldValue) {
if (newValue !== oldValue) {
this.markAsDirty();
}
},
markAsDirty: function() {
this.dirty = true;
this.fireEvent('dirtychange', this, true);
}
});