UI for search actions (WIP)

This commit is contained in:
zadam
2021-01-19 22:10:24 +01:00
parent cb2361e9c4
commit 1f923403de
12 changed files with 514 additions and 173 deletions

View File

@@ -3,6 +3,7 @@ import appContext from "./app_context.js";
import utils from './utils.js';
import noteCreateService from './note_create.js';
import treeService from './tree.js';
import treeCache from "./tree_cache.js";
// this key needs to have this value so it's hit by the tooltip
const SELECTED_NOTE_PATH_KEY = "data-note-path";
@@ -249,6 +250,14 @@ function init() {
.find(".go-to-selected-note-button")
.toggleClass("disabled", true);
}
$.fn.setNote = async function (noteId) {
const note = noteId ? await treeCache.getNote(noteId, true) : null;
$(this)
.val(note ? note.title : "")
.setSelectedNotePath(noteId);
}
}
export default {