ajust search input

This commit is contained in:
marcos 2019-12-11 18:42:46 +01:00
parent 1430e6ee11
commit 8ca473b2a7
2 changed files with 28 additions and 2 deletions

View File

@ -112,7 +112,7 @@ if ($config['menu_type'] == 'classic') {
}
}
$search_bar .= '<input type="text" id="keywords" name="keywords"';
$search_bar .= '<input type="text" id="keywords" name="keywords"';
if (!isset($config['search_keywords'])) {
$search_bar .= "value='".__('Enter keywords to search')."'";
} else if (strlen($config['search_keywords']) == 0) {
@ -637,6 +637,8 @@ if ($config['menu_type'] == 'classic') {
function showinterpreter(){
if( $('#keywords').val() === ''){
$('#keywords').addClass('search_input');
$('#keywords').removeClass('results-found');
$('#result_order').hide();
}else {
$.ajax({
@ -656,7 +658,10 @@ if ($config['menu_type'] == 'classic') {
console.error("Fatal error in AJAX call to interpreter order", data)
}
});
$('#keywords').removeClass('search_input');
$('#keywords').addClass('results-found');
$('#result_order').show();
}
}
/**

View File

@ -10,7 +10,7 @@ div.show_result_interpreter {
box-shadow: 0px 0px 15px -4px #dadada;
position: absolute;
z-index: 1;
width: 300px;
width: 302px;
}
.more_results {
@ -18,3 +18,24 @@ div.show_result_interpreter {
margin-right: 20px;
display: grid;
}
.results-found {
background-image: url("../../images/input_zoom_gray.png");
background-position: center right 10px;
background-repeat: no-repeat;
background-size: 17px;
background-color: #f2f6f7;
padding: 0px;
margin: 0;
width: 300px;
height: 30px;
margin-left: 2px;
padding-left: 15px;
padding-right: 40px;
color: #777;
font-family: "Open Sans", sans-serif;
font-size: 8.5pt;
border-top-left-radius: 50px;
border-top-right-radius: 50px;
border-color: transparent;
}