diff --git a/resources/assets/js/scriptResultPage.js b/resources/assets/js/scriptResultPage.js index c5d67e2c4d4b73b273c1062314cbe7c627acd709..6d44170c749d80dad8bfb912b52cf57f82d69ec8 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 b6420dde7409412b72ac9e9a43b5b3a0aa1f0452..5e8fa43c65e1fffa3893dc6ed423c356c8b164e7 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,18 @@ header:nth-child(1) { width: 100%; max-width: 760px; height: 61px; +} + +.search-input { + position: relative; +} + +#search-delete-btn { + position: absolute; + right: 0; + bottom: 0px; + border: none; + background-color: transparent; + font-size: 25px; + font-weight: normal; } \ No newline at end of file diff --git a/resources/views/parts/searchbar.blade.php b/resources/views/parts/searchbar.blade.php index f4c369881eb03c1cdce9e91003ad5f88d84f2d4a..182513714a8754ebcaae4d47bf6db946608c30e2 100644 --- a/resources/views/parts/searchbar.blade.php +++ b/resources/views/parts/searchbar.blade.php @@ -6,6 +6,9 @@ <div class="search-input-submit"> <div class="search-input"> <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') }}"> + <button class="hidden" id="search-delete-btn" type="button"> + × + </button> </div> <div class="search-submit" id="submit-inputgroup"> <button type="submit">