tree now shows list of different cloned notes

This commit is contained in:
azivner
2017-11-21 20:04:06 -05:00
parent 84a9e9067d
commit d7644de666
6 changed files with 82 additions and 15 deletions

View File

@@ -22,19 +22,23 @@ const link = (function() {
return null;
}
function createNoteLink(noteId) {
function createNoteLink(noteId, noteTitle) {
if (!noteTitle) {
noteTitle = noteTree.getNoteTitle(noteId);
}
const noteLink = $("<a>", {
href: 'javascript:',
text: noteTree.getNoteTitle(noteId)
text: noteTitle
}).attr('action', 'note')
.attr('note-id', noteId);
.attr('note-path', noteId);
return noteLink;
}
function goToInternalNote(e) {
const linkEl = $(e.target);
let noteId = linkEl.attr("note-id");
let noteId = linkEl.attr("note-path");
if (!noteId) {
noteId = getNotePathFromLink(linkEl.attr('href'));