document ready umgangen

This commit is contained in:
holger.trampe 2019-12-16 13:47:45 +01:00
parent 049cf1f183
commit 46283ee2e2
4 changed files with 2 additions and 17 deletions

View File

@ -330,9 +330,7 @@ function clearSF(){
$("#search_string").val("");
}
$(document).ready(function(){
$("#searchcontent").hide();
})
function startSearch(searchstring){
@ -357,16 +355,4 @@ $(document).ready(function(){
$("#maincontent").show();
}
}
/*
//Check valid input and go to standard by click
function checkValueSearchStringGlobal(){
for(i = 0; i < document.getElementById("searchres").options.length; i++){
var value = $("#search_string").val();
var choosen = document.getElementById("searchres").options[i].value;
if(value.search(choosen) != -1){
window.location = "/standards/standard/"+document.getElementById("searchres").options[i]['id']+"/single";
}
}
}
*/
</script>

View File

@ -39,4 +39,4 @@
{% else %}
<p>Keine Ergebnisse in Personen</p>
{% endif %}
</div>
</div>

View File

@ -399,7 +399,6 @@ def cleanhtml(raw_html):
def GlobalSearch(request):
if request.method == 'GET':
searchfor = request.GET['searchstring']
results = {}
ag = request.user.profile.agency.pk
res_standard = Standards.objects.filter(agency__pk=ag, public=True).filter(name__icontains=searchfor) | Standards.objects.filter(agency__pk=ag, public=True).filter(content__contains=searchfor) | Standards.objects.filter(agency__pk=ag, public=True).filter(area__name__icontains=searchfor) | Standards.objects.filter(agency__pk=ag, public=True).filter(task__name__icontains=searchfor) | Standards.objects.filter(agency__pk=ag, public=True).filter(created_standard_by__last_name__icontains=searchfor)|Standards.objects.filter(agency__pk=ag, public=True).filter(created_standard_by__first_name__icontains=searchfor)
res_areas = Areas.objects.filter(agency__pk=ag).filter(name__icontains=searchfor)