import TabAwareWidget from "./tab_aware_widget.js"; import treeService from "../services/tree.js"; import linkService from "../services/link.js"; const TPL = ` `; export default class NotePathsWidget extends TabAwareWidget { doRender() { this.$widget = $(TPL); this.overflowing(); this.$notePathList = this.$widget.find(".note-path-list"); this.$widget.on('show.bs.dropdown', () => this.renderDropdown()); } async renderDropdown() { this.$notePathList.empty(); this.$notePathList.append( $("
") .addClass("dropdown-header") .text('This note is placed into the following paths:') ); if (this.noteId === 'root') { await this.addPath('root'); return; } for (const notePathRecord of this.note.getSortedNotePaths(this.hoistedNoteId)) { await this.addPath(notePathRecord); } const cloneLink = $("
") .addClass("dropdown-header") .append( $('