Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
7af3043a
Commit
7af3043a
authored
May 11, 2016
by
Rafael Ostertag
Browse files
Implemented changes from
https://project/issues/1874
parent
669c25d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/UI.md
View file @
7af3043a
...
...
@@ -34,7 +34,7 @@ Close Button
------------
*
User presses the Close button
1.
Form not modified by user: Client redirects to previous page.
1.
Form modified by user: Ask User 'You have unsaved changes. Do you want to
close
?'
1.
Form modified by user: Ask User 'You have unsaved changes. Do you want to
save first
?'
*
Yes: Client redirects to previous page.
*
No: Client stays on current page.
*
Save & Close:
...
...
javascript/src/QfqForm.js
View file @
7af3043a
...
...
@@ -287,16 +287,18 @@ var QfqNS = QfqNS || {};
n
.
QfqForm
.
prototype
.
handleCloseClick
=
function
()
{
this
.
lastButtonPress
=
"
close
"
;
if
(
this
.
form
.
getFormChanged
())
{
var
alert
=
new
n
.
Alert
(
"
You have unsaved changes. Do you want to close?
"
,
"
warning
"
,
[{
label
:
"
Yes
"
,
eventName
:
"
ok
"
},
{
label
:
"
No
"
,
eventName
:
"
no
"
,
focus
:
true
},
{
label
:
"
Save & Close
"
,
eventName
:
"
save
"
var
alert
=
new
n
.
Alert
(
"
You have unsaved changes. Do you want to save first?
"
,
"
warning
"
,
[
{
label
:
"
Yes
"
,
eventName
:
"
yes
"
},
{
label
:
"
No
"
,
eventName
:
"
no
"
,
focus
:
true
},
{
label
:
"
Cancel
"
,
eventName
:
"
cancel
"
}]);
var
that
=
this
;
alert
.
on
(
'
alert.
save
'
,
function
()
{
alert
.
on
(
'
alert.
yes
'
,
function
()
{
that
.
submit
();
});
alert
.
on
(
'
alert.o
k
'
,
function
()
{
alert
.
on
(
'
alert.
n
o
'
,
function
()
{
window
.
history
.
back
();
});
alert
.
show
();
...
...
@@ -336,20 +338,20 @@ var QfqNS = QfqNS || {};
this
.
lastButtonPress
=
"
new
"
;
if
(
this
.
form
.
getFormChanged
())
{
var
alert
=
new
n
.
Alert
(
"
You have unsaved changes. Do you want to
close
?
"
,
"
warning
"
,
var
alert
=
new
n
.
Alert
(
"
You have unsaved changes. Do you want to
save first
?
"
,
"
warning
"
,
[
{
label
:
"
Yes
"
,
eventName
:
"
ok
"
},
{
label
:
"
No
"
,
eventName
:
"
cancel
"
,
focus
:
true
},
{
label
:
"
Save & Close
"
,
eventName
:
"
save
"
}
{
label
:
"
Yes
"
,
eventName
:
"
yes
"
,
focus
:
true
},
{
label
:
"
No
"
,
eventName
:
"
no
"
},
{
label
:
"
Cancel
"
,
eventName
:
"
cancel
"
}
]);
var
that
=
this
;
alert
.
on
(
'
alert.save
'
,
function
()
{
that
.
submit
();
});
alert
.
on
(
'
alert.ok
'
,
function
()
{
alert
.
on
(
'
alert.no
'
,
function
()
{
var
anchorTarget
=
that
.
getNewButtonTarget
();
window
.
location
=
anchorTarget
;
});
alert
.
on
(
'
alert.yes
'
,
function
()
{
that
.
submit
();
});
alert
.
show
();
}
else
{
var
anchorTarget
=
this
.
getNewButtonTarget
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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