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"> <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"> <div class="input-group-append">
<button class="btn btn-primary" type="button" onclick="javascript:clearSF()"> <button class="btn btn-primary" type="button" onclick="javascript:clearSF()" id="agencysearch_button" disabled="">
<i class="fas fa-times fa-sm"></i> <span id="agencysearch_icon">
<i class="fas fa-search"></i>
<!--<i class="fas fa-times fa-sm"></i>-->
</span>
</button> </button>
</div> </div>
</div> </div>
@ -621,10 +624,16 @@ function clearSF(){
$("#searchcontent").hide(); $("#searchcontent").hide();
$("#maincontent").show(); $("#maincontent").show();
$("#search_string").val(""); $("#search_string").val("");
$("#agencysearch_icon").html('<i class="fas fa-search fa-sm"></i>');
$("#agencysearch_button").prop("disabled", true);
} }
function startSearch(searchstring){ function startSearch(searchstring){
if(searchstring.length > 2){ if(searchstring.length > 2){
$("#agencysearch_button").prop("disabled", false);
$("#agencysearch_icon").html('<i class="fas fa-times fa-sm"></i>');
$.ajax( $.ajax(
{ {
type: "GET", type: "GET",
@ -640,6 +649,8 @@ function clearSF(){
} }
}); });
} else { } else {
$("#agencysearch_icon").html('<i class="fas fa-search fa-sm"></i>');
$("#agencysearch_button").prop("disabled", true);
$("#searchcontent").empty(); $("#searchcontent").empty();
$("#searchcontent").hide(); $("#searchcontent").hide();
$("#maincontent").show(); $("#maincontent").show();