Close confirm improvements & fixes

- nextmatch is now always not dirty
- Logging the dirty widgets to console
- Fix searchbox did not fully doLoadingFinished()
This commit is contained in:
nathangray 2020-06-29 11:55:35 -06:00
parent a50ede7967
commit 10846271f1
6 changed files with 6 additions and 4 deletions

View File

@ -1728,7 +1728,7 @@ var et2_nextmatch = /** @class */ (function (_super) {
return value; return value;
}; };
et2_nextmatch.prototype.resetDirty = function () { }; et2_nextmatch.prototype.resetDirty = function () { };
et2_nextmatch.prototype.isDirty = function () { return typeof this.value !== 'undefined'; }; et2_nextmatch.prototype.isDirty = function () { return false; };
et2_nextmatch.prototype.isValid = function () { return true; }; et2_nextmatch.prototype.isValid = function () { return true; };
et2_nextmatch.prototype.set_value = function (_value) { et2_nextmatch.prototype.set_value = function (_value) {
this.value = _value; this.value = _value;

View File

@ -2332,7 +2332,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
} }
resetDirty( ) resetDirty( )
{} {}
isDirty() { return typeof this.value !== 'undefined';} isDirty() { return false; }
isValid( ) { return true;} isValid( ) { return true;}
set_value(_value) set_value(_value)
{ {

View File

@ -510,7 +510,7 @@ var et2_searchbox = /** @class */ (function (_super) {
this._show_hide(!this.options.overlay); this._show_hide(!this.options.overlay);
this._searchToggleState(); this._searchToggleState();
} }
return false; return true;
}; };
/** /**
* Overrride attachToDOM in order to unbind change handler * Overrride attachToDOM in order to unbind change handler

View File

@ -604,7 +604,7 @@ class et2_searchbox extends et2_textbox
this._show_hide(!this.options.overlay); this._show_hide(!this.options.overlay);
this._searchToggleState(); this._searchToggleState();
} }
return false; return true;
} }
/** /**

View File

@ -572,6 +572,7 @@ var etemplate2 = /** @class */ (function () {
var dirty = false; var dirty = false;
this._widgetContainer.iterateOver(function (_widget) { this._widgetContainer.iterateOver(function (_widget) {
if (_widget.isDirty && _widget.isDirty()) { if (_widget.isDirty && _widget.isDirty()) {
console.info(_widget.id + " is dirty", _widget);
dirty = true; dirty = true;
} }
}, this); }, this);

View File

@ -734,6 +734,7 @@ export class etemplate2
{ {
if (_widget.isDirty && _widget.isDirty()) if (_widget.isDirty && _widget.isDirty())
{ {
console.info(_widget.id + " is dirty", _widget);
dirty = true; dirty = true;
} }
}, this); }, this);