jump to note now has full list of notes

This commit is contained in:
azivner
2017-11-17 22:37:11 -05:00
parent 7b2c79b754
commit eb20e1f31f
3 changed files with 12 additions and 26 deletions

View File

@@ -22,6 +22,8 @@ const noteTree = (function() {
}
function prepareNoteTree() {
glob.allNoteIds = Object.keys(notesMap);
return prepareNoteTreeInner(parentToNotes['root']);
}
@@ -31,8 +33,6 @@ const noteTree = (function() {
for (const noteId of noteIds) {
const note = notesMap[noteId];
glob.allNoteIds.push(note.note_id);
note.title = note.note_title;
if (note.is_protected) {
@@ -277,6 +277,10 @@ const noteTree = (function() {
tree.clearFilter();
}
function getByNoteId(noteId) {
return notesMap[noteId];
}
$("button#reset-search-button").click(resetSearch);
$("input[name=search]").keyup(e => {
@@ -310,5 +314,6 @@ const noteTree = (function() {
collapseTree,
scrollToCurrentNote,
toggleSearch,
getByNoteId
};
})();