moved all global variables into glob object

This commit is contained in:
azivner
2017-11-04 00:05:08 -04:00
parent 3892666961
commit 44cfff09d9
13 changed files with 79 additions and 79 deletions

View File

@@ -4,9 +4,9 @@ async function checkStatus() {
type: 'POST',
contentType: "application/json",
data: JSON.stringify({
treeLoadTime: globalTreeLoadTime,
currentNoteId: globalCurrentNote ? globalCurrentNote.detail.note_id : null,
currentNoteDateModified: globalCurrentNoteLoadTime
treeLoadTime: glob.treeLoadTime,
currentNoteId: glob.currentNote ? glob.currentNote.detail.note_id : null,
currentNoteDateModified: glob.currentNoteLoadTime
}),
statusCode: {
401: () => {
@@ -27,7 +27,7 @@ async function checkStatus() {
console.log("Reloading tree because of background changes");
// this will also reload the note content
await globalTree.fancytree('getTree').reload(treeResp.notes);
await glob.tree.fancytree('getTree').reload(treeResp.notes);
decryptTreeItems();
}