1
1
Fork 0
mirror of https://github.com/zadam/trilium.git synced 2025-01-23 07:29:18 +08:00

delete confirmation lists notes for deletion in a UL list,

This commit is contained in:
zadam 2019-08-17 09:00:53 +02:00
parent ad7a6c4d79
commit 1882b089ab
3 changed files with 8 additions and 4 deletions
src
public/javascripts
dialogs
services
views/dialogs

View file

@ -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();

View file

@ -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;

View file

@ -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>