diff --git a/src/public/app/dialogs/clone_to.js b/src/public/app/dialogs/clone_to.js deleted file mode 100644 index a992b1def..000000000 --- a/src/public/app/dialogs/clone_to.js +++ /dev/null @@ -1,73 +0,0 @@ -import noteAutocompleteService from "../services/note_autocomplete.js"; -import utils from "../services/utils.js"; -import treeService from "../services/tree.js"; -import toastService from "../services/toast.js"; -import froca from "../services/froca.js"; -import branchService from "../services/branches.js"; -import appContext from "../services/app_context.js"; - -const $dialog = $("#clone-to-dialog"); -const $form = $("#clone-to-form"); -const $noteAutoComplete = $("#clone-to-note-autocomplete"); -const $clonePrefix = $("#clone-prefix"); -const $noteList = $("#clone-to-note-list"); - -let clonedNoteIds; - -export async function showDialog(noteIds) { - if (!noteIds || noteIds.length === 0) { - noteIds = [ appContext.tabManager.getActiveContextNoteId() ]; - } - - clonedNoteIds = []; - - for (const noteId of noteIds) { - if (!clonedNoteIds.includes(noteId)) { - clonedNoteIds.push(noteId); - } - } - - utils.openDialog($dialog); - - $noteAutoComplete.val('').trigger('focus'); - - $noteList.empty(); - - for (const noteId of clonedNoteIds) { - const note = await froca.getNote(noteId); - - $noteList.append($("