diff --git a/users/__pycache__/views.cpython-38.pyc b/users/__pycache__/views.cpython-38.pyc index 23973ea..cea6676 100644 Binary files a/users/__pycache__/views.cpython-38.pyc and b/users/__pycache__/views.cpython-38.pyc differ diff --git a/users/templates/users/base.html b/users/templates/users/base.html index a7874e5..268b022 100644 --- a/users/templates/users/base.html +++ b/users/templates/users/base.html @@ -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"; - } - } - } - */ diff --git a/users/templates/users/searchres.html b/users/templates/users/searchres.html index e03c17f..563aebc 100644 --- a/users/templates/users/searchres.html +++ b/users/templates/users/searchres.html @@ -39,4 +39,4 @@ {% else %}

Keine Ergebnisse in Personen

{% endif %} - + \ No newline at end of file diff --git a/users/views.py b/users/views.py index 895cd60..d2001ff 100644 --- a/users/views.py +++ b/users/views.py @@ -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)