Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
c3a3609b
Commit
c3a3609b
authored
Dec 19, 2019
by
bbaer
Browse files
cleaning up old attempts
parent
00e4e5cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
javascript/src/QfqForm.js
View file @
c3a3609b
...
...
@@ -170,32 +170,6 @@ var QfqNS = QfqNS || {};
this
.
lockAcquired
=
true
;
};
n
.
QfqForm
.
prototype
.
handleUnload
=
function
(
e
)
{
var
that
=
this
;
var
alert
=
new
n
.
Alert
({
message
:
"
Do you want to save before leaving?
"
,
type
:
"
info
"
,
buttons
:
[
{
label
:
"
Yes
"
,
eventName
:
"
yes
"
},
{
label
:
"
No
"
,
eventName
:
"
no
"
},
{
label
:
"
Cancel
"
,
eventName
:
"
cancel
"
}
]
});
alert
.
on
(
'
alert.yes
'
,
function
()
{
that
.
handleSaveClick
();
that
.
releaseLock
();
});
alert
.
on
(
'
alert.no
'
,
function
()
{
that
.
releaseLock
();
});
alert
.
on
(
'
alert.cancel
'
,
function
()
{
return
false
;
});
e
.
preventDefault
();
return
null
;
};
/**
* @public
*/
...
...
javascript/src/QfqPage.js
View file @
c3a3609b
...
...
@@ -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
();
that
.
qfqForm
.
releaseLock
(
true
);
};
})(
this
));
}
catch
(
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment