Commit 8a99edb2 authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Key wird jetzt gespeichert

parent 84ff09b0
$(function () {
loadLocalStorage();
setActionListenersSearchbar();
});
function setActionListenersSearchbar() {
$('#input-key').keydown(saveKey);
}
function saveKey() {
var key = $('#input-key').val();
localStorage.setItem('key', key);
}
function loadKey() {
var key = localStorage.getItem('key');
$('#input-key').val(key);
}
/**
* Loads the user theme and stored settings from local storage
*/
function loadLocalStorage () {
function loadLocalStorage() {
if (localStorage) {
setSettings();
loadKey();
}
}
function setSettings () {
function setSettings() {
var acceptedParams = ['autocomplete', 'key', 'lang', 'newtab', 'sprueche'];
for (var key in localStorage) {
var value = localStorage.getItem(key);
......
......@@ -16,13 +16,13 @@
</label>
</div>
<div id="search-key">
<input id="input-key" type="text" name="key" placeholder="{{ trans ('index.key.placeholder') }}">
<input id="input-key" type="text" name="key" placeholder="{{ trans ('index.key.placeholder') }}" tabindex="1">
<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="" autocomplete="{{$autocomplete or 'off'}}" class="form-control" placeholder="{{ trans('index.placeholder') }}" tabindex="1">
<input type="text" name="eingabe" value="@if(isset($eingabe)){{$eingabe}}@endif" required="" autocomplete="{{$autocomplete or 'off'}}" class="form-control" placeholder="{{ trans('index.placeholder') }}" tabindex="2">
<button class="hidden" id="search-delete-btn" type="button">
&#xd7;
</button>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment