Skip to content
GitLab
Menu
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
90c92e3c
Commit
90c92e3c
authored
Apr 19, 2016
by
Rafael Ostertag
Browse files
Updated CODING.md.
QfqForm.js: Buttons should behave as described in CODING.md under UI.
parent
e8edf67e
Changes
2
Hide whitespace changes
Inline
Side-by-side
CODING.md
View file @
90c92e3c
...
...
@@ -92,6 +92,7 @@ Save Button
*
Reset all validation states
*
Form is submitted to server
*
Success:
*
Show message provided by server
*
Current formelements and data will be reloaded.
*
Process server reponse 'redirect':
*
'client': No redirect.
...
...
javascript/src/QfqForm.js
View file @
90c92e3c
...
...
@@ -420,26 +420,26 @@ var QfqNS = QfqNS || {};
switch
(
this
.
lastButtonPress
)
{
case
'
save
'
:
if
(
!
data
.
redirect
||
data
.
redirect
===
"
no
"
)
{
if
(
data
.
message
)
{
var
alert
=
new
n
.
Alert
(
data
.
message
);
alert
.
timeout
=
1500
;
alert
.
show
();
}
// do we have to update the HTML Form?
if
(
data
[
'
form-update
'
])
{
this
.
applyElementConfiguration
(
data
[
'
form-update
'
]);
}
return
;
if
(
data
.
message
)
{
var
alert
=
new
n
.
Alert
(
data
.
message
);
alert
.
timeout
=
1500
;
alert
.
show
();
}
// do we have to update the HTML Form?
if
(
data
[
'
form-update
'
])
{
this
.
applyElementConfiguration
(
data
[
'
form-update
'
]);
}
if
(
data
.
redirect
===
"
client
"
)
{
window
.
history
.
back
();
if
(
data
.
redirect
===
"
url
"
||
data
[
'
redirect-url
'
])
{
window
.
location
=
data
[
'
redirect-url
'
];
return
;
}
break
;
case
'
close
'
:
if
(
!
data
.
redirect
||
data
.
redirect
===
"
no
"
||
data
.
redirect
===
"
client
"
)
{
return
;
}
if
(
data
.
redirect
===
"
url
"
||
data
[
'
redirect-url
'
])
{
window
.
location
=
data
[
'
redirect-url
'
];
...
...
@@ -448,7 +448,7 @@ var QfqNS = QfqNS || {};
break
;
case
'
new
'
:
var
target
=
this
.
getNewButtonTarget
();
window
.
location
=
t
his
.
getNewButtonT
arget
()
;
window
.
location
=
target
;
return
;
default
:
...
...
Write
Preview
Supports
Markdown
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