...
 
Commits (1)
var tablist = [];
var mainIndex = -1;
var index = -1;
$(document).ready(function () {
$("[data-tabtargets]").each(function (index, el) {
$(el).focusin(function () {
console.log("bind");
$(el).on('keydown.enter', function (e) {
if (e.which == 13) {
e.preventDefault();
tablist = $($(el).attr("data-tabtargets"));
index = -1;
console.log("test");
// Simulate Tab Keypress
var tmp = jQuery.Event("keydown");
tmp.which = 9;
$(el).trigger(tmp);
}
})
});
$(el).focusout(function () {
$(el).blur();
console.log("unbind");
$(el).unbind("keydown.enter");
});
});
/* Capture tab keypress and add actions */
$("html").on('keydown', function (e) {
if (e.which == 9 && tablist.length > (index + 1)) {
e.preventDefault();
$(tablist[index]).blur();
index++;
$(tablist[index]).focus();
$(tablist[index]).blur();
} else if (e.which == 9) {
e.preventDefault();
var el = $("#tab-navigator > a")[mainIndex];
var itemCount = $("#tab-navigator > a").length;
if (typeof el != "undefined") {
$(el).blur();
$(el).css("display", "none");
}
mainIndex++;
if (mainIndex >= itemCount) {
mainIndex = 0;
}
el = $("#tab-navigator > a")[mainIndex];
$(el).css("display", "block");
$(el).focus();
}
});
});
$(document).ready(function () {
getDocumentReadyForUse(focus, custom);
getDocumentReadyForUse(focus);
botProtection();
var search = getMetaTag('q') || '';
......@@ -29,18 +29,8 @@ function getMetaTag(name) {
function getDocumentReadyForUse(fokus, custom) {
if (typeof custom == 'undefined') custom = false;
activateJSOnlyContent();
function getDocumentReadyForUse(fokus, ) {
popovers();
if (fokus === 'bilder') imageLoader();
if (custom) initialLoadContent(fokus);
// pagination()
tabs();
fokiChanger();
//pluginInfo();
$('iframe:not(.resized)').iFrameResize();
$('iframe').addClass('resized');
addListeners();
}
......
......@@ -22,7 +22,21 @@
// Color of the Spruch author
@spruch-author-color: @color-strong-grey;
/* Styles */
#tab-navigator > a {
display: none;
position: fixed;
bottom: 0;
z-index: 999;
right: 0;
padding: 16px;
background-color: white;
border: 1px solid #ccc;
border-right: 0;
border-bottom: 0;
&:focus {
display: block;
}
}
#header-logo {
z-index: 0;
padding-right: 8px;
......
@if(isset($ad) && !$apiAuthorized)
<div class="result ad">
<div class="result ad" tabindex="0">
</span>
<div class="result-header">
<div class="result-headline">
......
<div class="result" data-count="{{ $result->number }}">
<div class="result" data-count="{{ $result->number }}" tabindex="0">
<div class="result-header">
<div class="result-headline">
<h2 class="result-title" title="{{ $result->titel }}">
......
......@@ -21,6 +21,10 @@
@include('parts.utility')
</head>
<body id="resultpage-body">
<div id="tab-navigator">
<a href="#" class="tab-navigator" data-tabtargets=".result">Zu den Suchergebnissen</a>
<a href="#" class="tab-navigator" data-tabtargets="input[name=eingabe], #research-bar button[type=submit], #key-label">Neue Suche durchführen</a>
</div>
@if(Request::getHttpHost() === "metager3.de")
<div class="alert alert-info metager3-unstable-warning-resultpage">
{!! @trans('resultPage.metager3') !!}
......
@foreach($metager->getSumaFile()->foki as $name => $fokus)
<div id="{{$name}}" @if($metager->getFokus() === $name)class="active"@endif>
<a href="@if($metager->getFokus() === $name)#@else{!!$metager->generateSearchLink($name)!!}@endif" target="_self" tabindex="0">@lang($fokus->{"display-name"})</a>
<a href="@if($metager->getFokus() === $name)#@else{!!$metager->generateSearchLink($name)!!}@endif" target="_self">@lang($fokus->{"display-name"})</a>
</div>
@endforeach
@if (LaravelLocalization::getCurrentLocale() == "de")
......
......@@ -4,13 +4,13 @@
<div class="searchbar {{$class ?? ''}}">
<div class="search-input-submit">
<div id="search-key">
<input id="input-key" type="text" name="key" placeholder="{{ trans ('index.key.placeholder') }}" tabindex="1">
<input id="input-key" type="text" name="key" placeholder="{{ trans ('index.key.placeholder') }}">
<label id="key-label" for="input-key" data-tooltip="{{ trans ('index.key.tooltip') }}">
<i class="fa fa-key" aria-hidden="true"></i>
</label>
</div>
<div class="search-input">
<input type="text" name="eingabe" value="@if(isset($eingabe)){{$eingabe}}@endif" required="" @if(\Request::is('/')) autofocus @endif autocomplete="{{$autocomplete ?? 'off'}}" class="form-control" placeholder="{{ trans('index.placeholder') }}" tabindex="2">
<input type="text" name="eingabe" value="@if(isset($eingabe)){{$eingabe}}@endif" required="" @if(\Request::is('/')) autofocus @endif autocomplete="{{$autocomplete ?? 'off'}}" class="form-control" placeholder="{{ trans('index.placeholder') }}">
<button class="hidden" id="search-delete-btn" type="button">
&#xd7;
</button>
......
......@@ -46,7 +46,6 @@ mix
"resources/js/lib/jquery.js",
"resources/js/lib/jquery-ui.min.js",
"resources/js/lib/bootstrap.js",
"resources/js/lib/iframeResizer.min.js",
"resources/js/lib/md5.js"
],
"public/js/lib.js"
......@@ -62,7 +61,8 @@ mix
[
"resources/js/scriptResultPage.js",
"resources/js/result-saver.js",
"resources/js/translations.js"
"resources/js/translations.js",
"resources/js/resultpage-barriere.js"
],
"public/js/scriptResultPage.js"
)
......