mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-17 20:11:23 +02:00
Etemplate: Cancel buttons do not trigger the change/close prompt
This commit is contained in:
@@ -288,7 +288,7 @@ var etemplate2 = /** @class */ (function () {
|
||||
}
|
||||
};
|
||||
etemplate2.prototype._close_changed_prompt = function (e) {
|
||||
if (!this.isDirty()) {
|
||||
if (this._skip_close_prompt || !this.isDirty()) {
|
||||
return;
|
||||
}
|
||||
// Cancel the event
|
||||
@@ -296,6 +296,10 @@ var etemplate2 = /** @class */ (function () {
|
||||
// Chrome requires returnValue to be set
|
||||
e.returnValue = '';
|
||||
};
|
||||
etemplate2.prototype.skip_close_prompt = function (skip) {
|
||||
if (skip === void 0) { skip = true; }
|
||||
this._skip_close_prompt = skip;
|
||||
};
|
||||
/**
|
||||
* Unbind our unload handler
|
||||
*/
|
||||
|
Reference in New Issue
Block a user