mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-01 17:42:11 +09:00
Add title in delete/trash confirmation dialog #2653
This commit is contained in:
parent
078c07d9f5
commit
6d85d0de6d
1 changed files with 2 additions and 1 deletions
|
|
@ -12,13 +12,14 @@ $(function() {
|
||||||
});
|
});
|
||||||
var forms = $('.dashboard>div>section form.action');
|
var forms = $('.dashboard>div>section form.action');
|
||||||
forms.on('click', 'button', function(e) {
|
forms.on('click', 'button', function(e) {
|
||||||
|
var title = $(this).closest('form').siblings('a').first().text();
|
||||||
var message;
|
var message;
|
||||||
if ($(this).val() === 'trash' || $(this).val() === 'true') {
|
if ($(this).val() === 'trash' || $(this).val() === 'true') {
|
||||||
message = xe.lang.confirm_trash;
|
message = xe.lang.confirm_trash;
|
||||||
} else {
|
} else {
|
||||||
message = xe.lang.confirm_delete;
|
message = xe.lang.confirm_delete;
|
||||||
}
|
}
|
||||||
if (!confirm(message)) {
|
if (!confirm(title + "\n" + message)) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue