|
|
|
@ -74,6 +74,8 @@ function createNewTopLevelNote() {
|
|
|
|
createNote(rootNode, "root", "into");
|
|
|
|
createNote(rootNode, "root", "into");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let newNoteCreated = false;
|
|
|
|
|
|
|
|
|
|
|
|
function createNote(node, parentKey, target) {
|
|
|
|
function createNote(node, parentKey, target) {
|
|
|
|
let newNoteName = "new note";
|
|
|
|
let newNoteName = "new note";
|
|
|
|
|
|
|
|
|
|
|
|
@ -93,6 +95,8 @@ function createNote(node, parentKey, target) {
|
|
|
|
"note_id": result.note_id
|
|
|
|
"note_id": result.note_id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newNoteCreated = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (target == 'after') {
|
|
|
|
if (target == 'after') {
|
|
|
|
node.appendSibling(newNode).setActive(true);
|
|
|
|
node.appendSibling(newNode).setActive(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -114,6 +118,12 @@ function loadNote(noteId) {
|
|
|
|
|
|
|
|
|
|
|
|
$("#noteTitle").val(note.detail.note_title);
|
|
|
|
$("#noteTitle").val(note.detail.note_title);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (newNoteCreated) {
|
|
|
|
|
|
|
|
newNoteCreated = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#noteTitle").focus().select();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let noteText = notecase2html(note);
|
|
|
|
let noteText = notecase2html(note);
|
|
|
|
|
|
|
|
|
|
|
|
noteChangeDisabled = true;
|
|
|
|
noteChangeDisabled = true;
|
|
|
|
|