mirror of
https://github.com/zadam/trilium.git
synced 2025-01-23 15:41:50 +08:00
delete confirmation lists notes for deletion in a UL list, #438
This commit is contained in:
parent
ad7a6c4d79
commit
1882b089ab
3 changed files with 8 additions and 4 deletions
|
@ -16,7 +16,11 @@ function confirm(message) {
|
|||
|
||||
glob.activeDialog = $dialog;
|
||||
|
||||
$confirmContent.text(message);
|
||||
if (typeof message === 'string') {
|
||||
message = $("<div>").text(message);
|
||||
}
|
||||
|
||||
$confirmContent.empty().append(message);
|
||||
|
||||
$dialog.modal();
|
||||
|
||||
|
|
|
@ -87,8 +87,8 @@ async function deleteNodes(nodes) {
|
|||
return false;
|
||||
}
|
||||
|
||||
const nodeTitles = nodes.map((node) => node.title);
|
||||
const confirmText = 'This will delete the following notes and their sub-notes: ' + nodeTitles.join(', ');
|
||||
const nodeTitles = $("<ul>").append(...nodes.map(node => $("<li>").text(node.title)));
|
||||
const confirmText = $("<div>").text('This will delete the following notes and their sub-notes: ').append(nodeTitles);
|
||||
|
||||
if (!await confirmDialog.confirm(confirmText)) {
|
||||
return false;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id="confirm-dialog" class="modal mx-auto" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title mr-auto">Confirmation</h5>
|
||||
|
|
Loading…
Reference in a new issue