mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-06 04:50:03 -06:00
tree utils as a module
This commit is contained in:
@@ -21,7 +21,7 @@ const addLink = (function() {
|
||||
linkTitleEl.val('');
|
||||
|
||||
function setDefaultLinkTitle(noteId) {
|
||||
const noteTitle = getNoteTitle(noteId);
|
||||
const noteTitle = treeUtils.getNoteTitle(noteId);
|
||||
|
||||
linkTitleEl.val(noteTitle);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ const jumpToNote = (function() {
|
||||
const noteId = link.getNodeIdFromLabel(val);
|
||||
|
||||
if (noteId) {
|
||||
getNodeByKey(noteId).setActive();
|
||||
treeUtils.activateNode(noteId);
|
||||
|
||||
dialogEl.dialog('close');
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ const recentNotes = (function() {
|
||||
const recNotes = list.filter(note => note !== noteEditor.getCurrentNoteId());
|
||||
|
||||
$.each(recNotes, (key, valueNoteId) => {
|
||||
const noteTitle = getFullName(valueNoteId);
|
||||
const noteTitle = treeUtils.getFullName(valueNoteId);
|
||||
|
||||
if (!noteTitle) {
|
||||
return;
|
||||
@@ -66,7 +66,7 @@ const recentNotes = (function() {
|
||||
function setActiveNoteBasedOnRecentNotes() {
|
||||
const noteId = getSelectedNoteIdFromRecentNotes();
|
||||
|
||||
getNodeByKey(noteId).setActive();
|
||||
treeUtils.activateNode(noteId);
|
||||
|
||||
dialogEl.dialog('close');
|
||||
}
|
||||
@@ -74,7 +74,7 @@ const recentNotes = (function() {
|
||||
function addLinkBasedOnRecentNotes() {
|
||||
const noteId = getSelectedNoteIdFromRecentNotes();
|
||||
|
||||
const linkTitle = getNoteTitle(noteId);
|
||||
const linkTitle = treeUtils.getNoteTitle(noteId);
|
||||
|
||||
dialogEl.dialog("close");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user