Commit 643e2191 authored by Carsten  Rose's avatar Carsten Rose

Merge remote-tracking branch 'origin/b9789-earlyRelease' into develop

parents 55163328 948069b4
Pipeline #3098 passed with stages
in 1 minute and 49 seconds
......@@ -158,11 +158,6 @@ var QfqNS = QfqNS || {};
this.form.on('form.validation.failed', this.validationError);
this.form.on('form.validation.success', this.validationSuccess);
// Solves problem of leaving the page without releasing locks.
window.onbeforeunload = function (e) {
that.releaseLock();
};
$(".radio-inline").append($("<span>", { class: "checkmark", aria: "hidden"}));
$(".checkbox-inline").append($("<span>", { class: "checkmark", aria: "hidden"}));
$(".radio").append($("<span>", { class: "checkmark", aria: "hidden"}));
......@@ -581,7 +576,6 @@ var QfqNS = QfqNS || {};
};
n.QfqForm.prototype.callSave = function(uri) {
console.log("target: " + uri);
if(this.isFormChanged()) {
this.handleSaveClick();
this.goToAfterSave = uri;
......@@ -1389,9 +1383,6 @@ var QfqNS = QfqNS || {};
*/
n.QfqForm.prototype.goBack = function () {
var alert;
if(this.lockAcquired) {
this.releaseLock();
}
if (window.history.length < 2) {
alert = new n.Alert(
......
......@@ -81,7 +81,7 @@ var QfqNS = QfqNS || {};
// We have to use 'pagehide'. 'unload' is too late and the ajax request is lost.
window.addEventListener("pagehide", (function (that) {
return function () {
that.qfqForm.releaseLock(false);
that.qfqForm.releaseLock(true);
};
})(this));
} catch (e) {
......@@ -115,18 +115,19 @@ var QfqNS = QfqNS || {};
/**
* @private
*
* Releaselock has to be handled at the pagehide event, not here
*/
n.QfqPage.prototype.beforeUnloadHandler = function (event) {
var message = "\0/";
n.Log.debug("beforeUnloadHandler()");
if (this.qfqForm.isFormChanged() && !this.intentionalClose) {
n.Log.debug("Changes detected - not regular close");
this.qfqForm.releaseLock(true);
event.returnValue = message;
return message;
}
this.qfqForm.releaseLock();
};
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment