mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
hover tooltip for internal links
This commit is contained in:
@@ -53,4 +53,31 @@ $.ui.autocomplete.filter = (array, terms) => {
|
||||
console.log("Search took " + (new Date().getTime() - startDate.getTime()) + "ms");
|
||||
|
||||
return results;
|
||||
};
|
||||
};
|
||||
|
||||
$(document).tooltip({
|
||||
items: ".note-editable a",
|
||||
content: function(callback) {
|
||||
const noteId = getNoteIdFromLink($(this).attr("href"));
|
||||
|
||||
if (noteId !== null) {
|
||||
loadNote(noteId, note => {
|
||||
callback(note.detail.note_text);
|
||||
});
|
||||
}
|
||||
},
|
||||
close: function(event, ui)
|
||||
{
|
||||
ui.tooltip.hover(function()
|
||||
{
|
||||
$(this).stop(true).fadeTo(400, 1);
|
||||
},
|
||||
function()
|
||||
{
|
||||
$(this).fadeOut('400', function()
|
||||
{
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user