mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
feat(views/table): set up relations not as a link
This commit is contained in:
parent
7f5a1ee45a
commit
e5b10ab16a
@ -14,6 +14,7 @@ let dismissTimer: ReturnType<typeof setTimeout>;
|
|||||||
|
|
||||||
function setupGlobalTooltip() {
|
function setupGlobalTooltip() {
|
||||||
$(document).on("mouseenter", "a", mouseEnterHandler);
|
$(document).on("mouseenter", "a", mouseEnterHandler);
|
||||||
|
$(document).on("mouseenter", "[data-href]", mouseEnterHandler);
|
||||||
|
|
||||||
// close any note tooltip after click, this fixes the problem that sometimes tooltips remained on the screen
|
// close any note tooltip after click, this fixes the problem that sometimes tooltips remained on the screen
|
||||||
$(document).on("click", (e) => {
|
$(document).on("click", (e) => {
|
||||||
|
@ -58,11 +58,13 @@ export function RelationFormatter(cell: CellComponent, formatterParams, onRender
|
|||||||
}
|
}
|
||||||
|
|
||||||
onRendered(async () => {
|
onRendered(async () => {
|
||||||
const $link = $("<a>");
|
const $noteRef = $("<span>");
|
||||||
$link.addClass("reference-link");
|
const href = `#root/${noteId}`;
|
||||||
$link.attr("href", `#root/${noteId}`);
|
$noteRef.addClass("reference-link");
|
||||||
await loadReferenceLinkTitle($link);
|
$noteRef.attr("data-href", href);
|
||||||
cell.getElement().appendChild($link[0]);
|
|
||||||
|
await loadReferenceLinkTitle($noteRef, href);
|
||||||
|
cell.getElement().appendChild($noteRef[0]);
|
||||||
});
|
});
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user