From f63baf43e3429c4f99866396b083923ab0f94d66 Mon Sep 17 00:00:00 2001
From: Karl Hasselbring <Karl Hasselbring>
Date: Fri, 4 May 2018 11:51:19 +0200
Subject: [PATCH] =?UTF-8?q?L=C3=B6schen-Knopf=20hinzugef=C3=BCgt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 resources/assets/js/scriptResultPage.js      | 30 ++++++++++----------
 resources/assets/less/metager/searchbar.less | 14 ++++++++-
 resources/views/parts/searchbar.blade.php    |  7 +++++
 3 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/resources/assets/js/scriptResultPage.js b/resources/assets/js/scriptResultPage.js
index c5d67e2c4..6d44170c7 100644
--- a/resources/assets/js/scriptResultPage.js
+++ b/resources/assets/js/scriptResultPage.js
@@ -16,7 +16,7 @@ $(document).ready(function () {
 
   var search = getMetaTag('q') || '';
   var locale = getMetaTag('l') || 'de';
-  //loadQuicktips(search, locale, sprueche); // load the quicktips
+// loadQuicktips(search, locale, sprueche) // load the quicktips
 });
 
 /*
@@ -65,6 +65,7 @@ function tabs () {
       getDocumentReadyForUse(fokus);
     }
   });
+  $('#search-delete-btn').removeClass('hidden');
 }
 
 function getDocumentReadyForUse (fokus, custom) {
@@ -85,11 +86,11 @@ function getDocumentReadyForUse (fokus, custom) {
 }
 
 function addListeners () {
-  $('#reset').attr('type', 'button').click(resetSearchbar);
+  $('#search-delete-btn').click(resetSearchbar);
 }
 
 function resetSearchbar () {
-  $('#eingabeTop').val('');
+  $('.search-input input').val('').focus();
 }
 
 function pluginInfo () {
@@ -133,23 +134,23 @@ function clickLog () {
 }
 
 function botProtection () {
-  $(".result").find("a").click(function(){
-    var link = $(this).attr("href");
+  $('.result').find('a').click(function () {
+    var link = $(this).attr('href');
     var newtab = false;
-    if($(this).attr("target") == "_blank"){
+    if ($(this).attr('target') == '_blank') {
       newtab = true;
     }
     $.ajax({
-      url: '/img/cat.jpg', 
-      type: "post",
-      data: { mm: $("meta[name=mm]").attr("content")},
+      url: '/img/cat.jpg',
+      type: 'post',
+      data: { mm: $('meta[name=mm]').attr('content')},
       timeout: 2000
     })
-    .always(function(){
-      if(!newtab)
-        document.location.href = link;
-    });
-    if(!newtab)
+      .always(function () {
+        if (!newtab)
+          document.location.href = link;
+      });
+    if (!newtab)
       return false;
     else
       return true;
@@ -287,7 +288,6 @@ function fokiChanger () {
   });
 })(jQuery);
 
-
 /**
  * Loads the content for a given fokus
  */
diff --git a/resources/assets/less/metager/searchbar.less b/resources/assets/less/metager/searchbar.less
index b6420dde7..87646f1c7 100644
--- a/resources/assets/less/metager/searchbar.less
+++ b/resources/assets/less/metager/searchbar.less
@@ -250,7 +250,6 @@ header:nth-child(1) {
     }
 }
 
-
 /* Scrollbar Style */
 
 @scrollfade-color: white;
@@ -288,4 +287,17 @@ header:nth-child(1) {
     width: 100%;
     max-width: 760px;
     height: 61px;
+}
+
+.search-input {
+    position: relative;
+}
+
+#search-delete-btn {
+    position: absolute;
+    right: 0;
+    bottom: 5px;
+    border: none;
+    background-color: transparent;
+    font-size: 14px;
 }
\ No newline at end of file
diff --git a/resources/views/parts/searchbar.blade.php b/resources/views/parts/searchbar.blade.php
index f4c369881..29fb6eae9 100644
--- a/resources/views/parts/searchbar.blade.php
+++ b/resources/views/parts/searchbar.blade.php
@@ -5,7 +5,14 @@
 		<div class="searchbar {{$class or ''}}">
 			<div class="search-input-submit">
 				<div class="search-input">
+<<<<<<< Updated upstream
 					<input type="text" name="eingabe" value="@if(isset($eingabe)){{$eingabe}}@endif" required="" @if($class=='startpage-searchbar') autofocus="" @endif autocomplete="{{$autocomplete or 'off'}}" class="form-control" placeholder="{{ trans('index.placeholder') }}">
+=======
+					<input type="text" name="eingabe" value="@if(isset($eingabe)){{$eingabe}}@endif" required="" @if($class=='startpage-searchbar') autofocus="" @endif autocomplete="{{$autocomplete or 'off'}}" class="form-control" placeholder="{{ trans('index.placeholder') }}" tabindex="1" autofocus>
+					<button class="hidden" id="search-delete-btn" type="button">
+						<i class="fa fa-eraser" aria-hidden="true"></i>
+					</button>
+>>>>>>> Stashed changes
 				</div>
 				<div class="search-submit" id="submit-inputgroup">
 					<button type="submit">
-- 
GitLab