import RightDropdownButtonWidget from "./right_dropdown_button.js"; import linkService from "../../services/link.js"; const DROPDOWN_TPL = `
`; export default class BookmarkFolderWidget extends RightDropdownButtonWidget { constructor(note) { super(note.getIcon(), note.title, DROPDOWN_TPL); this.note = note; } doRender() { super.doRender(); this.$parentNote = this.$dropdownContent.find('.parent-note'); this.$childrenNotes = this.$dropdownContent.find('.children-notes'); // this.$dropdownContent.on("click", "a", () => this.hideDropdown()); } async dropdownShown() { this.$parentNote.empty(); this.$childrenNotes.empty(); this.$parentNote.append( (await linkService.createNoteLink(this.note.noteId, {showTooltip: false})) .addClass("note-link") ); for (const childNote of await this.note.getChildNotes()) { this.$childrenNotes.append( $("