Agenturweite Suche Iconaenderung

This commit is contained in:
holger.trampe 2020-11-09 21:09:19 +01:00
parent 3ae7eb829d
commit ac3d413739
1 changed files with 13 additions and 2 deletions

View File

@ -378,8 +378,11 @@
<input type="text" onkeyup="javascript:startSearch(this.value)" class="form-control bg-light border-0 small" placeholder="Suche..." aria-label="Suche" aria-describedby="basic-addon2" id="searchfield">
-->
<div class="input-group-append">
<button class="btn btn-primary" type="button" onclick="javascript:clearSF()">
<i class="fas fa-times fa-sm"></i>
<button class="btn btn-primary" type="button" onclick="javascript:clearSF()" id="agencysearch_button" disabled="">
<span id="agencysearch_icon">
<i class="fas fa-search"></i>
<!--<i class="fas fa-times fa-sm"></i>-->
</span>
</button>
</div>
</div>
@ -621,10 +624,16 @@ function clearSF(){
$("#searchcontent").hide();
$("#maincontent").show();
$("#search_string").val("");
$("#agencysearch_icon").html('<i class="fas fa-search fa-sm"></i>');
$("#agencysearch_button").prop("disabled", true);
}
function startSearch(searchstring){
if(searchstring.length > 2){
$("#agencysearch_button").prop("disabled", false);
$("#agencysearch_icon").html('<i class="fas fa-times fa-sm"></i>');
$.ajax(
{
type: "GET",
@ -640,6 +649,8 @@ function clearSF(){
}
});
} else {
$("#agencysearch_icon").html('<i class="fas fa-search fa-sm"></i>');
$("#agencysearch_button").prop("disabled", true);
$("#searchcontent").empty();
$("#searchcontent").hide();
$("#maincontent").show();