mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
use bootstrap modal to confirm note deletion which fixes #582
This commit is contained in:
@@ -6,6 +6,7 @@ import treeCache from "./tree_cache.js";
|
||||
import treeUtils from "./tree_utils.js";
|
||||
import hoistedNoteService from "./hoisted_note.js";
|
||||
import noteDetailService from "./note_detail.js";
|
||||
import confirmDialog from "../dialogs/confirm.js";
|
||||
|
||||
async function moveBeforeNode(nodesToMove, beforeNode) {
|
||||
nodesToMove = await filterRootNote(nodesToMove);
|
||||
@@ -82,7 +83,7 @@ async function moveToNode(nodesToMove, toNode) {
|
||||
async function deleteNodes(nodes) {
|
||||
nodes = await filterRootNote(nodes);
|
||||
|
||||
if (nodes.length === 0 || !confirm('Are you sure you want to delete select note(s) and all the sub-notes?')) {
|
||||
if (nodes.length === 0 || !await confirmDialog.confirm('Are you sure you want to delete select note(s) and all the sub-notes?')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user