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
5833484f
Commit
5833484f
authored
Aug 18, 2017
by
bbaer
Browse files
Changing buttons for the dirty Events depending on status
parent
372bbe9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/QfqForm.js
View file @
5833484f
...
...
@@ -172,23 +172,31 @@ var QfqNS = QfqNS || {};
n
.
QfqForm
.
prototype
.
dirtyRenewalDenied
=
function
(
obj
)
{
var
that
=
this
;
var
messageButtons
=
[{
label
:
"
Reload
"
,
eventName
:
'
reload
'
}];
if
(
obj
.
data
.
status
==
"
conflict_allow_force
"
)
{
messageButtons
.
push
({
label
:
"
Ignore
"
,
eventName
:
'
ignore
'
});
}
var
alert
=
new
n
.
Alert
(
{
type
:
"
error
"
,
message
:
obj
.
data
.
message
,
modal
:
true
,
buttons
:
[
{
label
:
"
Reload
"
,
eventName
:
'
reload
'
}
]
buttons
:
messageButtons
}
);
alert
.
on
(
'
alert.reload
'
,
function
()
{
that
.
eventEmitter
.
emitEvent
(
'
qfqform.close-intentional
'
,
n
.
EventEmitter
.
makePayload
(
that
,
null
));
window
.
location
.
reload
(
true
);
});
alert
.
on
(
'
alert.ignore
'
,
function
()
{
console
.
log
(
"
Ignored Recordlock
"
);
});
alert
.
show
();
};
...
...
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