Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
button for collapsing tree, button for new top level note
azivnera7180e0e1915
diff --git a/src/templates/app.html b/src/templates/app.htmlindex 518a9cc24c..dd6d43ccba 100644--- a/src/templates/app.html+++ b/src/templates/app.html@@ -13,14 +13,21 @@<div id="content" style="margin-left: auto; margin-right: auto; width: 1100px"><div class="hide-toggle" style="width: 300px; height: 100%; float: left;">- <!--<button type="button" class="btn" onclick="createNewTopLevelNote()">Create new note</button>-->-<p><label>Search:</label><input name="search" autocomplete="off"><button id="btnResetSearch">×</button><span id="matches"></span></p>++ <a onclick="createNewTopLevelNote()" title="Create new top level note">+ <img src="stat/icons/file-plus.png" alt="Create new top level note"/>+ </a>++ <a onclick="collapseTree()" title="Collapse tree">+ <img src="stat/icons/list.png" alt="Collapse tree"/>+ </a>+<div id="tree"></div></div>diff --git a/static/js/init.js b/static/js/init.jsindex bc41a32173..7f2312f4ad 100644--- a/static/js/init.js+++ b/static/js/init.js@@ -94,8 +94,6 @@ $(document).on('click', 'div.popover-content a', function(e) {}});-let linkInfo;-$(document).bind('keydown', 'alt+l', function() {var range = $('#noteDetail').summernote('createRange');console.log("range:", range);diff --git a/static/js/tree.js b/static/js/tree.jsindex 35b1e84642..3da823f3bd 100644--- a/static/js/tree.js+++ b/static/js/tree.js@@ -202,4 +202,12 @@ $("button#btnResetSearch").click(function () {let tree = $("#tree").fancytree("getTree");tree.clearFilter();-});\ No newline at end of file+});++function collapseTree() {+ $("#tree").fancytree("getRootNode").visit(function(node){+ node.setExpanded(false);+ });+}++$(document).bind('keydown', 'alt+c', collapseTree);\ No newline at end of file