mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
relation promoted attribute has clickable button, fixes #155
This commit is contained in:
parent
406d74c4d7
commit
0aa08b1c1e
@ -320,6 +320,16 @@ async function loadAttributes() {
|
|||||||
|
|
||||||
// no need to wait for this
|
// no need to wait for this
|
||||||
noteAutocompleteService.initNoteAutocomplete($input);
|
noteAutocompleteService.initNoteAutocomplete($input);
|
||||||
|
|
||||||
|
// ideally we'd use link instead of button which would allow tooltip preview, but
|
||||||
|
// we can't guarantee updating the link in the a element
|
||||||
|
const $openButton = $("<button>").addClass("btn btn-small").text("Open").click(() => {
|
||||||
|
const notePath = linkService.getNotePathFromLabel($input.val());
|
||||||
|
|
||||||
|
treeService.activateNode(notePath);
|
||||||
|
});
|
||||||
|
|
||||||
|
$actionCell.append($openButton);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
messagingService.logError("Unknown attribute type=" + valueAttr.type);
|
messagingService.logError("Unknown attribute type=" + valueAttr.type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user