more generic handling of links to note

This commit is contained in:
azivner
2017-11-04 17:03:15 -04:00
parent c723bfc3ac
commit 819ae7c4c0
8 changed files with 118 additions and 103 deletions

View File

@@ -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
};