mirror of
https://github.com/zadam/trilium.git
synced 2024-12-27 09:43:18 +08:00
using globalTree consistently
This commit is contained in:
parent
b6007a25e8
commit
7bc322f9a1
2 changed files with 4 additions and 4 deletions
|
@ -94,7 +94,7 @@ $(document).ready(function() {
|
|||
var globalNote;
|
||||
|
||||
function createNewTopLevelNote() {
|
||||
let rootNode = $("#tree").fancytree("getRootNode");
|
||||
let rootNode = globalTree.fancytree("getRootNode");
|
||||
|
||||
createNote(rootNode, "root", "into");
|
||||
}
|
||||
|
|
|
@ -372,7 +372,7 @@ $("input[name=search]").keyup(function (e) {
|
|||
console.log("search: ", resp);
|
||||
|
||||
// Pass a string to perform case insensitive matching
|
||||
const tree = $("#tree").fancytree("getTree");
|
||||
const tree = globalTree.fancytree("getTree");
|
||||
tree.filterBranches(function(node) {
|
||||
return resp.includes(node.data.note_id);
|
||||
});
|
||||
|
@ -383,12 +383,12 @@ $("input[name=search]").keyup(function (e) {
|
|||
$("button#btnResetSearch").click(function () {
|
||||
$("input[name=search]").val("");
|
||||
|
||||
const tree = $("#tree").fancytree("getTree");
|
||||
const tree = globalTree.fancytree("getTree");
|
||||
tree.clearFilter();
|
||||
});
|
||||
|
||||
function collapseTree() {
|
||||
$("#tree").fancytree("getRootNode").visit(function(node){
|
||||
globalTree.fancytree("getRootNode").visit(function(node){
|
||||
node.setExpanded(false);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue