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
80e833be
Commit
80e833be
authored
May 10, 2016
by
Rafael Ostertag
Browse files
Adjusted code to cope with new Alert.js.
parent
2bd24d2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
javascript/src/FileDelete.js
View file @
80e833be
...
...
@@ -27,7 +27,9 @@ var QfqNS = QfqNS || {};
n
.
FileDelete
.
prototype
.
buttonClicked
=
function
(
event
)
{
event
.
preventDefault
();
var
alert
=
new
n
.
Alert
(
"
Do you want to delete the file?
"
,
"
warning
"
,
"
okcancel
"
);
var
alert
=
new
n
.
Alert
(
"
Do you want to delete the file?
"
,
"
warning
"
,
[{
label
:
"
OK
"
,
eventName
:
"
ok
"
},
{
label
:
"
Cancel
"
,
eventName
:
"
cancel
"
}]);
alert
.
on
(
'
alert.ok
'
,
function
()
{
this
.
performFileDelete
(
event
);
}.
bind
(
this
));
...
...
javascript/src/QfqForm.js
View file @
80e833be
...
...
@@ -93,7 +93,6 @@ var QfqNS = QfqNS || {};
};
/**
*
* @private
...
...
@@ -291,7 +290,11 @@ 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
"
,
"
yesnosave
"
);
var
alert
=
new
n
.
Alert
(
"
You have unsaved changes. Do you want to close?
"
,
"
warning
"
,
[{
label
:
"
Yes
"
,
eventName
:
"
ok
"
},
{
label
:
"
No
"
,
eventName
:
"
no
"
},
{
label
:
"
Save & Close
"
,
eventName
:
"
save
"
}]);
var
that
=
this
;
alert
.
on
(
'
alert.save
'
,
function
()
{
that
.
submit
();
...
...
@@ -333,7 +336,12 @@ 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
"
,
"
yesnosave
"
);
var
alert
=
new
n
.
Alert
(
"
You have unsaved changes. Do you want to close?
"
,
"
warning
"
,
[
{
label
:
"
Yes
"
,
eventName
:
"
ok
"
},
{
label
:
"
No
"
,
eventName
:
"
cancel
"
},
{
label
:
"
Save & Close
"
,
eventName
:
"
save
"
}
]);
var
that
=
this
;
alert
.
on
(
'
alert.save
'
,
function
()
{
that
.
submit
();
...
...
@@ -356,7 +364,11 @@ var QfqNS = QfqNS || {};
n
.
QfqForm
.
prototype
.
handleDeleteClick
=
function
()
{
this
.
lastButtonPress
=
"
delete
"
;
n
.
Log
.
debug
(
"
delete click
"
);
var
alert
=
new
n
.
Alert
(
"
Do you really want to delete the record?
"
,
"
warning
"
,
"
yesno
"
);
var
alert
=
new
n
.
Alert
(
"
Do you really want to delete the record?
"
,
"
warning
"
,
[
{
label
:
"
Yes
"
,
eventName
:
"
ok
"
},
{
label
:
"
No
"
,
eventName
:
"
cancel
"
}
]);
var
that
=
this
;
alert
.
on
(
'
alert.ok
'
,
function
()
{
$
.
post
(
that
.
deleteUrl
)
...
...
javascript/src/QfqRecordList.js
View file @
80e833be
...
...
@@ -40,7 +40,11 @@ var QfqNS = QfqNS || {};
}
var
alert
=
new
n
.
Alert
(
"
Do you really want to delete the record?
"
,
"
warning
"
,
"
yesno
"
);
var
alert
=
new
n
.
Alert
(
"
Do you really want to delete the record?
"
,
"
warning
"
,
[
{
label
:
"
Yes
"
,
eventName
:
"
ok
"
},
{
label
:
"
No
"
,
eventName
:
"
cancel
"
}
]);
var
that
=
this
;
alert
.
on
(
'
alert.ok
'
,
function
()
{
$
.
post
(
that
.
deleteUrl
+
"
?s=
"
+
sip
)
...
...
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