mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
more generic handling of links to note
This commit is contained in:
@@ -3,6 +3,8 @@ const eventLog = (function() {
|
||||
const listEl = $("#event-log-list");
|
||||
|
||||
async function showDialog() {
|
||||
glob.activeDialog = dialogEl;
|
||||
|
||||
dialogEl.dialog({
|
||||
modal: true,
|
||||
width: 800,
|
||||
@@ -21,10 +23,7 @@ const eventLog = (function() {
|
||||
const dateTime = formatDateTime(getDateFromTS(event.date_added));
|
||||
|
||||
if (event.note_id) {
|
||||
const noteLink = $("<a>", {
|
||||
href: 'app#' + event.note_id,
|
||||
text: getFullName(event.note_id)
|
||||
}).prop('outerHTML');
|
||||
const noteLink = createNoteLink(event.note_id).prop('outerHTML');
|
||||
|
||||
event.comment = event.comment.replace('<note>', noteLink);
|
||||
}
|
||||
@@ -35,12 +34,6 @@ const eventLog = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('click', '#event-log-dialog a', e => {
|
||||
goToInternalNote(e, () => {
|
||||
dialogEl.dialog('close');
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
showDialog
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user