clipboard is now owned by note tree

This commit is contained in:
azivner
2017-11-04 19:49:26 -04:00
parent 19c5404d02
commit dfaa59b0a9
2 changed files with 19 additions and 9 deletions

View File

@@ -4,14 +4,22 @@ const noteTree = (function() {
const noteDetailEl = $('#note-detail');
const treeEl = $("#tree");
let treeLoadTime = null;
let clipboardNoteId = null;
glob.allNoteIds = [];
glob.clipboardNoteId = null;
function getTreeLoadTime() {
return treeLoadTime;
}
function getClipboardNoteId() {
return clipboardNoteId;
}
function setClipboardNoteId(cbNoteId) {
clipboardNoteId = cbNoteId;
}
function prepareNoteTree(notes) {
for (const note of notes) {
glob.allNoteIds.push(note.note_id);
@@ -284,9 +292,11 @@ const noteTree = (function() {
return {
getTreeLoadTime,
getClipboardNoteId,
setClipboardNoteId,
loadTree,
collapseTree,
scrollToCurrentNote,
toggleSearch
toggleSearch,
};
})();