From 1882b089abb5ee0c3a0e70a19d365dd15e960f66 Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 17 Aug 2019 09:00:53 +0200 Subject: [PATCH] delete confirmation lists notes for deletion in a UL list, #438 --- src/public/javascripts/dialogs/confirm.js | 6 +++++- src/public/javascripts/services/branches.js | 4 ++-- src/views/dialogs/confirm.ejs | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/public/javascripts/dialogs/confirm.js b/src/public/javascripts/dialogs/confirm.js index efbc686df..006c9bdc8 100644 --- a/src/public/javascripts/dialogs/confirm.js +++ b/src/public/javascripts/dialogs/confirm.js @@ -16,7 +16,11 @@ function confirm(message) { glob.activeDialog = $dialog; - $confirmContent.text(message); + if (typeof message === 'string') { + message = $("
").text(message); + } + + $confirmContent.empty().append(message); $dialog.modal(); diff --git a/src/public/javascripts/services/branches.js b/src/public/javascripts/services/branches.js index b9539d488..0314724a0 100644 --- a/src/public/javascripts/services/branches.js +++ b/src/public/javascripts/services/branches.js @@ -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 = $("