mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-04-23 13:21:06 -05:00
link module
This commit is contained in:
@@ -29,7 +29,7 @@ const addLink = (function() {
|
||||
minLength: 0,
|
||||
change: () => {
|
||||
const val = autoCompleteEl.val();
|
||||
const noteId = getNodeIdFromLabel(val);
|
||||
const noteId = link.getNodeIdFromLabel(val);
|
||||
|
||||
if (noteId) {
|
||||
setDefaultLinkTitle(noteId);
|
||||
@@ -38,7 +38,7 @@ const addLink = (function() {
|
||||
// this is called when user goes through autocomplete list with keyboard
|
||||
// at this point the item isn't selected yet so we use supplied ui.item to see where the cursor is
|
||||
focus: (event, ui) => {
|
||||
const noteId = getNodeIdFromLabel(ui.item.value);
|
||||
const noteId = link.getNodeIdFromLabel(ui.item.value);
|
||||
|
||||
setDefaultLinkTitle(noteId);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ const addLink = (function() {
|
||||
formEl.submit(() => {
|
||||
let val = autoCompleteEl.val();
|
||||
|
||||
const noteId = getNodeIdFromLabel(val);
|
||||
const noteId = link.getNodeIdFromLabel(val);
|
||||
|
||||
if (noteId) {
|
||||
const linkTitle = linkTitleEl.val();
|
||||
|
||||
@@ -23,7 +23,7 @@ const eventLog = (function() {
|
||||
const dateTime = formatDateTime(getDateFromTS(event.date_added));
|
||||
|
||||
if (event.note_id) {
|
||||
const noteLink = createNoteLink(event.note_id).prop('outerHTML');
|
||||
const noteLink = link.createNoteLink(event.note_id).prop('outerHTML');
|
||||
|
||||
event.comment = event.comment.replace('<note>', noteLink);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ const jumpToNote = (function() {
|
||||
|
||||
formEl.submit(() => {
|
||||
const val = autoCompleteEl.val();
|
||||
const noteId = getNodeIdFromLabel(val);
|
||||
const noteId = link.getNodeIdFromLabel(val);
|
||||
|
||||
if (noteId) {
|
||||
getNodeByKey(noteId).setActive();
|
||||
|
||||
@@ -37,7 +37,7 @@ const recentChanges = (function() {
|
||||
|
||||
changesListEl.append($('<li>')
|
||||
.append(formattedTime + ' - ')
|
||||
.append(createNoteLink(change.note_id))
|
||||
.append(link.createNoteLink(change.note_id))
|
||||
.append(' (').append(revLink).append(')'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user