hover tooltip for internal links

This commit is contained in:
azivner
2017-10-11 20:37:27 -04:00
parent 562a071350
commit c4ed01128b
7 changed files with 66 additions and 12 deletions

View File

@@ -191,7 +191,7 @@ function setNoteBackgroundIfEncrypted(note) {
setTreeBasedOnEncryption(note);
}
function loadNote(noteId) {
function loadNoteToEditor(noteId) {
$.get(baseApiUrl + 'notes/' + noteId).then(note => {
globalCurrentNote = note;
@@ -225,8 +225,6 @@ function loadNote(noteId) {
document.location.hash = noteId;
$(window).resize(); // to trigger resizing of editor
addRecentNote(noteId, note.detail.note_id);
noteChangeDisabled = false;
@@ -234,4 +232,16 @@ function loadNote(noteId) {
setNoteBackgroundIfEncrypted(note);
});
});
}
function loadNote(noteId, callback) {
$.get(baseApiUrl + 'notes/' + noteId).then(note => {
if (note.detail.encryption > 0 && !isEncryptionAvailable()) {
return;
}
decryptNoteIfNecessary(note);
callback(note);
});
}