Skip to content
Snippets Groups Projects
Commit 2c7a4bf6 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge remote-tracking branch 'origin/form_dirty'

parents 1d14fae0 f958290e
No related branches found
No related tags found
No related merge requests found
......@@ -121,21 +121,17 @@ var QfqNS = QfqNS || {};
if (ajaxData.status &&
ajaxData.status === "success") {
if (this.successTimerId) {
clearTimeout(this.successTimerId);
}
this.clearSuccessTimeoutTimerIfSet();
setTimeout((function (that, data) {
this.successTimerId = setTimeout((function (that, data) {
return function () {
that.eventEmitter.emitEvent(n.Dirty.EVENTS.SUCCESS_TIMEOUT, data);
};
})(this, eventData), this.lockTimeoutInMilliseconds);
} else {
if (this.deniedTimerId) {
clearTimeout(this.deniedTimerId);
}
this.clearDeniedTimeoutTimerIfSet();
setTimeout((function (that, data) {
this.deniedTimerId = setTimeout((function (that, data) {
return function () {
that.eventEmitter.emitEvent(n.Dirty.EVENTS.DENIED_TIMEOUT, data);
};
......@@ -143,6 +139,20 @@ var QfqNS = QfqNS || {};
}
};
n.Dirty.prototype.clearSuccessTimeoutTimerIfSet = function () {
if (this.successTimerId) {
clearTimeout(this.successTimerId);
this.successTimerId = null;
}
};
n.Dirty.prototype.clearDeniedTimeoutTimerIfSet = function () {
if (this.deniedTimerId) {
clearTimeout(this.deniedTimerId);
this.deniedTimerId = null;
}
};
/**
* @private
......
......@@ -159,6 +159,7 @@ var QfqNS = QfqNS || {};
};
n.QfqForm.prototype.resetLockState = function () {
this.dirty.clearSuccessTimeoutTimerIfSet();
this.dirtyFired = false;
this.formImmutableDueToConcurrentAccess = false;
this.lockRenewalPhase = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment