more fine grained handling of conflicts without having to reload whole page most of the time

This commit is contained in:
azivner
2017-11-01 22:36:26 -04:00
parent 962c078bbc
commit 1cf247f164
7 changed files with 172 additions and 111 deletions

View File

@@ -113,6 +113,7 @@ function saveNoteToServer(note, callback) {
}
let globalCurrentNote;
let globalCurrentNoteLoadTime;
function createNewTopLevelNote() {
let rootNode = globalTree.fancytree("getRootNode");
@@ -193,6 +194,7 @@ function setNoteBackgroundIfEncrypted(note) {
function loadNoteToEditor(noteId) {
$.get(baseApiUrl + 'notes/' + noteId).then(note => {
globalCurrentNote = note;
globalCurrentNoteLoadTime = Math.floor(new Date().getTime() / 1000);
if (newNoteCreated) {
newNoteCreated = false;