import CollapsibleWidget from "./collapsible_widget.js"; const TPL = `
Note ID:
Created:
Modified:
Type: MIME:
`; export default class NoteInfoWidget extends CollapsibleWidget { getWidgetTitle() { return "Note info"; } doRenderBody() { this.$body.html(TPL); this.$noteId = this.$body.find(".note-info-note-id"); this.$dateCreated = this.$body.find(".note-info-date-created"); this.$dateModified = this.$body.find(".note-info-date-modified"); this.$type = this.$body.find(".note-info-type"); this.$mime = this.$body.find(".note-info-mime"); } async refreshWithNote(note) { const noteComplement = await this.tabContext.getNoteComplement(); this.$noteId.text(note.noteId); this.$dateCreated .text(noteComplement.dateCreated) .attr("title", noteComplement.dateCreated); this.$dateModified .text(noteComplement.dateModified) .attr("title", noteComplement.dateCreated); this.$type.text(note.type); this.$mime .text(note.mime) .attr("title", note.mime); } entitiesReloadedListener({loadResults}) { if (loadResults.isNoteReloaded(this.noteId)) { this.refresh(); } } }