mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
search input tooltip WIP
This commit is contained in:
parent
66e2a12f3d
commit
a1ac609b34
@ -8,7 +8,7 @@ function setupGlobalTooltip() {
|
|||||||
$(document).on("mouseleave", "a", mouseLeaveHandler);
|
$(document).on("mouseleave", "a", mouseLeaveHandler);
|
||||||
|
|
||||||
// close any tooltip after click, this fixes the problem that sometimes tooltips remained on the screen
|
// close any tooltip after click, this fixes the problem that sometimes tooltips remained on the screen
|
||||||
$(document).on("click", () => $('.tooltip').remove());
|
//$(document).on("click", () => $('.tooltip').remove());
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupElementTooltip($el) {
|
function setupElementTooltip($el) {
|
||||||
|
@ -16,6 +16,17 @@ const $closeSearchButton = $("#close-search-button");
|
|||||||
function showSearch() {
|
function showSearch() {
|
||||||
$searchBox.slideDown();
|
$searchBox.slideDown();
|
||||||
$searchInput.focus();
|
$searchInput.focus();
|
||||||
|
|
||||||
|
$searchBox.tooltip({
|
||||||
|
trigger: 'focus',
|
||||||
|
html: true,
|
||||||
|
title: 'Hello! <a href="http://google.com" class="external">google</a>',
|
||||||
|
placement: 'right',
|
||||||
|
delay: {
|
||||||
|
show: 500, // necessary because sliding out may cause wrong position
|
||||||
|
hide: 500
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideSearch() {
|
function hideSearch() {
|
||||||
|
@ -685,9 +685,9 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* this should help with tooltip flickering */
|
/* this should help with tooltip flickering */
|
||||||
.tooltip {
|
/*.tooltip {*/
|
||||||
pointer-events: none;
|
/* pointer-events: none;*/
|
||||||
}
|
/*}*/
|
||||||
|
|
||||||
.tooltip-inner {
|
.tooltip-inner {
|
||||||
background-color: var(--accented-background-color) !important;
|
background-color: var(--accented-background-color) !important;
|
||||||
|
@ -107,7 +107,8 @@
|
|||||||
<div id="search-box">
|
<div id="search-box">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input name="search-text" id="search-text" class="form-control" placeholder="Search text, labels" autocomplete="off">
|
<input name="search-text" id="search-text" class="form-control"
|
||||||
|
placeholder="Search text, labels" autocomplete="off">
|
||||||
|
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button id="do-search-button" class="btn btn-sm icon-button jam jam-search" title="Search (enter)"></button>
|
<button id="do-search-button" class="btn btn-sm icon-button jam jam-search" title="Search (enter)"></button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user