diff --git a/src/public/javascripts/services/tree_context_menu.js b/src/public/javascripts/services/tree_context_menu.js index dc9facebd..85e77c19e 100644 --- a/src/public/javascripts/services/tree_context_menu.js +++ b/src/public/javascripts/services/tree_context_menu.js @@ -62,6 +62,11 @@ class TreeContextMenu { !isHoisted || !isNotRoot ? null : { title: 'Unhoist note ', cmd: "unhoist", uiIcon: "arrow-up" }, { title: 'Edit branch prefix ', cmd: "editBranchPrefix", uiIcon: "empty", enabled: isNotRoot && parentNotSearch && noSelectedNotes}, + { title: "Advanced", uiIcon: "empty", enabled: true, items: [ + { title: 'Collapse subtree ', cmd: "collapseSubtree", uiIcon: "align-justify", enabled: noSelectedNotes }, + { title: "Force note sync", cmd: "forceNoteSync", uiIcon: "recycle", enabled: noSelectedNotes }, + { title: 'Sort alphabetically ', cmd: "sortAlphabetically", uiIcon: "empty", enabled: noSelectedNotes && notSearch } + ] }, { title: "----" }, { title: "Protect subtree", cmd: "protectSubtree", uiIcon: "check-shield", enabled: noSelectedNotes }, { title: "Unprotect subtree", cmd: "unprotectSubtree", uiIcon: "shield", enabled: noSelectedNotes }, @@ -84,12 +89,7 @@ class TreeContextMenu { { title: "Export", cmd: "export", uiIcon: "empty", enabled: notSearch && noSelectedNotes }, { title: "Import into note", cmd: "importIntoNote", uiIcon: "empty", - enabled: notSearch && noSelectedNotes }, - { title: "Advanced", uiIcon: "empty", enabled: true, items: [ - { title: 'Collapse subtree ', cmd: "collapseSubtree", uiIcon: "align-justify", enabled: noSelectedNotes }, - { title: "Force note sync", cmd: "forceNoteSync", uiIcon: "recycle", enabled: noSelectedNotes }, - { title: 'Sort alphabetically ', cmd: "sortAlphabetically", uiIcon: "empty", enabled: noSelectedNotes && notSearch } - ] }, + enabled: notSearch && noSelectedNotes } ].filter(row => row !== null); }