mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
tag list in "status bar", closes #28
This commit is contained in:
@@ -9,6 +9,8 @@ const noteEditor = (function() {
|
||||
const unprotectButton = $("#unprotect-button");
|
||||
const noteDetailWrapperEl = $("#note-detail-wrapper");
|
||||
const noteIdDisplayEl = $("#note-id-display");
|
||||
const attributeListEl = $("#attribute-list");
|
||||
const attributeListInnerEl = $("#attribute-list-inner");
|
||||
|
||||
let editor = null;
|
||||
let codeEditor = null;
|
||||
@@ -187,6 +189,27 @@ const noteEditor = (function() {
|
||||
|
||||
// after loading new note make sure editor is scrolled to the top
|
||||
noteDetailWrapperEl.scrollTop(0);
|
||||
|
||||
loadAttributeList();
|
||||
}
|
||||
|
||||
async function loadAttributeList() {
|
||||
const noteId = getCurrentNoteId();
|
||||
|
||||
const attributes = await server.get('notes/' + noteId + '/attributes');
|
||||
|
||||
attributeListInnerEl.html('');
|
||||
|
||||
if (attributes.length > 0) {
|
||||
for (const attr of attributes) {
|
||||
attributeListInnerEl.append(formatAttribute(attr) + " ");
|
||||
}
|
||||
|
||||
attributeListEl.show();
|
||||
}
|
||||
else {
|
||||
attributeListEl.hide();
|
||||
}
|
||||
}
|
||||
|
||||
async function loadNote(noteId) {
|
||||
@@ -290,6 +313,7 @@ const noteEditor = (function() {
|
||||
newNoteCreated,
|
||||
getEditor,
|
||||
focus,
|
||||
executeCurrentNote
|
||||
executeCurrentNote,
|
||||
loadAttributeList
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user