let globalHistoryItems = null; function showCurrentNoteHistory() { showNoteHistoryDialog(globalCurrentNote.detail.note_id); } function showNoteHistoryDialog(noteId, noteHistoryId) { $("#noteHistoryDialog").dialog({ modal: true, width: 800, height: 700 }); $("#noteHistoryList").empty(); $("#noteHistoryContent").empty(); $.ajax({ url: baseApiUrl + 'notes-history/' + noteId, type: 'GET', success: result => { globalHistoryItems = result; for (const row of result) { const dateModified = getDateFromTS(row.date_modified); $("#noteHistoryList").append($('