optimize usage of note path and attributes in the note tooltip, #1558

This commit is contained in:
zadam
2021-01-21 21:48:06 +01:00
parent c33d496cf3
commit 8375a1b5ab
3 changed files with 60 additions and 12 deletions

View File

@@ -88,7 +88,7 @@ async function renderTooltip(note) {
return;
}
let content = $("<h5>").text(await treeService.getNotePathTitle(someNotePath)).prop('outerHTML');
let content = '<h5 class="note-tooltip-title">' + (await treeService.getNoteTitleWithPathAsSuffix(someNotePath)).prop('outerHTML') + '</h5>';
const {$renderedAttributes} = await attributeRenderer.renderNormalAttributes(note);
@@ -98,7 +98,7 @@ async function renderTooltip(note) {
});
content = content
+ $renderedAttributes[0].outerHTML
+ '<div class="note-tooltip-attributes">' + $renderedAttributes[0].outerHTML + '</div>'
+ $renderedContent[0].outerHTML;
return content;