search input tooltip WIP

This commit is contained in:
zadam 2019-03-30 17:41:53 +01:00
parent 66e2a12f3d
commit a1ac609b34
4 changed files with 17 additions and 5 deletions

View File

@ -8,7 +8,7 @@ function setupGlobalTooltip() {
$(document).on("mouseleave", "a", mouseLeaveHandler);
// 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) {

View File

@ -16,6 +16,17 @@ const $closeSearchButton = $("#close-search-button");
function showSearch() {
$searchBox.slideDown();
$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() {

View File

@ -685,9 +685,9 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th
}
/* this should help with tooltip flickering */
.tooltip {
pointer-events: none;
}
/*.tooltip {*/
/* pointer-events: none;*/
/*}*/
.tooltip-inner {
background-color: var(--accented-background-color) !important;

View File

@ -107,7 +107,8 @@
<div id="search-box">
<div class="form-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">
<button id="do-search-button" class="btn btn-sm icon-button jam jam-search" title="Search (enter)"></button>