diff --git a/src/public/app/dialogs/bulk_assign_attributes.js b/src/public/app/dialogs/bulk_assign_attributes.js new file mode 100644 index 000000000..4691618f0 --- /dev/null +++ b/src/public/app/dialogs/bulk_assign_attributes.js @@ -0,0 +1,7 @@ +import utils from "../services/utils.js"; + +const $dialog = $("#bulk-assign-attributes-dialog"); + +export async function showDialog(nodes) { + utils.openDialog($dialog); +} diff --git a/src/public/app/services/tree_context_menu.js b/src/public/app/services/tree_context_menu.js index 6fecbad3b..c5516762b 100644 --- a/src/public/app/services/tree_context_menu.js +++ b/src/public/app/services/tree_context_menu.js @@ -104,7 +104,9 @@ class TreeContextMenu { { title: "Export", command: "exportNote", uiIcon: "empty", enabled: notSearch && noSelectedNotes }, { title: "Import into note", command: "importIntoNote", uiIcon: "empty", - enabled: notSearch && noSelectedNotes } + enabled: notSearch && noSelectedNotes }, + { title: "Bulk assign attributes", command: "bulkAssignAttributes", uiIcon: "empty", + enabled: true } ].filter(row => row !== null); } diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index 38d64bbed..d8caaac4c 100644 --- a/src/public/app/widgets/note_tree.js +++ b/src/public/app/widgets/note_tree.js @@ -1422,6 +1422,11 @@ export default class NoteTreeWidget extends NoteContextAwareWidget { importDialog.showDialog(node.data.noteId); } + async bulkAssignAttributesCommand({node}) { + const bulkAssignAttributesDialog = await import('../dialogs/bulk_assign_attributes.js'); + bulkAssignAttributesDialog.showDialog(this.getSelectedOrActiveNodes(node)); + } + forceNoteSyncCommand({node}) { syncService.forceNoteSync(node.data.noteId); } diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs index 06c50e090..ee198e3ef 100644 --- a/src/views/desktop.ejs +++ b/src/views/desktop.ejs @@ -40,6 +40,7 @@ <%- include('dialogs/sort_child_notes.ejs') %> <%- include('dialogs/delete_notes.ejs') %> <%- include('dialogs/password_not_set.ejs') %> +<%- include('dialogs/bulk_assign_attributes.ejs') %>