Skip to content
Snippets Groups Projects
Commit d6e2bdd4 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Add tooltip on search box

Tooltip only added when server side processing is used.

JIRA INFRA-1893 #action In Progress
parent 101f7ff5
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,20 @@ function update_stack_member() {
);
}
// Function to initialize tooltip on DataTables search box
// Only used when using server side processing
function configure_search_tooltip() {
$(".dataTables_filter").tooltip({
title:
"Enter keyword(s) or use wildcard character '*' for partial match. See the help for more information.",
});
// Hide the tooltip when clicking in the search box
$("input[type='search'").focus(function () {
$(".dataTables_filter").tooltip("hide");
});
}
$(document).ready(function () {
// When an invalid input was submitted, the server
// adds the "is-invalid" class to form fields to display
......
......@@ -114,5 +114,7 @@ $(document).ready(function () {
.buttons()
.container()
.appendTo("#groups_table_wrapper .col-md-3:eq(0)");
configure_search_tooltip();
}
});
......@@ -196,5 +196,7 @@ $(document).ready(function () {
.buttons()
.container()
.appendTo("#hosts_table_wrapper .col-md-3:eq(0)");
configure_search_tooltip();
}
});
......@@ -144,4 +144,6 @@ $(document).ready(function () {
.container()
.appendTo("#items_table_wrapper .col-md-3:eq(0)");
}
configure_search_tooltip();
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment