mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 18:05:55 +01:00 
			
		
		
		
	delete confirmation lists notes for deletion in a UL list, #438
This commit is contained in:
		| @@ -16,7 +16,11 @@ function confirm(message) { | |||||||
|  |  | ||||||
|     glob.activeDialog = $dialog; |     glob.activeDialog = $dialog; | ||||||
|  |  | ||||||
|     $confirmContent.text(message); |     if (typeof message === 'string') { | ||||||
|  |         message = $("<div>").text(message); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     $confirmContent.empty().append(message); | ||||||
|  |  | ||||||
|     $dialog.modal(); |     $dialog.modal(); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -87,8 +87,8 @@ async function deleteNodes(nodes) { | |||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     const nodeTitles = nodes.map((node) => node.title); |     const nodeTitles = $("<ul>").append(...nodes.map(node => $("<li>").text(node.title))); | ||||||
|     const confirmText = 'This will delete the following notes and their sub-notes: ' + nodeTitles.join(', '); |     const confirmText = $("<div>").text('This will delete the following notes and their sub-notes: ').append(nodeTitles); | ||||||
|  |  | ||||||
|     if (!await confirmDialog.confirm(confirmText)) { |     if (!await confirmDialog.confirm(confirmText)) { | ||||||
|         return false; |         return false; | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| <div id="confirm-dialog" class="modal mx-auto" tabindex="-1" role="dialog"> | <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-content"> | ||||||
|             <div class="modal-header"> |             <div class="modal-header"> | ||||||
|                 <h5 class="modal-title mr-auto">Confirmation</h5> |                 <h5 class="modal-title mr-auto">Confirmation</h5> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user