note paths widget has context menu too

This commit is contained in:
zadam 2020-04-20 22:38:37 +02:00
parent 8473f72ec8
commit 9f1b3cc892
2 changed files with 2 additions and 0 deletions

View file

@ -162,6 +162,7 @@ $(document).on('contextmenu', 'a.ck-link-actions__preview', newTabContextMenu);
$(document).on('contextmenu', '.note-detail-text a', newTabContextMenu); $(document).on('contextmenu', '.note-detail-text a', newTabContextMenu);
$(document).on('contextmenu', "a[data-action='note']", newTabContextMenu); $(document).on('contextmenu', "a[data-action='note']", newTabContextMenu);
$(document).on('contextmenu', ".note-detail-render a", newTabContextMenu); $(document).on('contextmenu', ".note-detail-render a", newTabContextMenu);
$(document).on('contextmenu', ".note-paths-widget a", newTabContextMenu);
export default { export default {
getNotePathFromUrl, getNotePathFromUrl,

View file

@ -84,6 +84,7 @@ export default class NotePathsWidget extends TabAwareWidget {
this.$currentPath.append( this.$currentPath.append(
$("<a>") $("<a>")
.attr('href', '#' + curPath) .attr('href', '#' + curPath)
.attr('data-note-path', curPath)
.addClass('no-tooltip-preview') .addClass('no-tooltip-preview')
.text(await treeService.getNoteTitle(noteId, parentNoteId)) .text(await treeService.getNoteTitle(noteId, parentNoteId))
); );