Skip to content
Snippets Groups Projects
Commit 5afbddee authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Sprachlabel hinzugefügt

parent 41a9b703
No related branches found
No related tags found
1 merge request!1267Resolve "Sprachfilter nicht sichtbar"
...@@ -62,7 +62,7 @@ function setActionListeners() { ...@@ -62,7 +62,7 @@ function setActionListeners() {
/** /**
* Loads stored settings from local storage * Loads stored settings from local storage
*/ */
function setSettings () { function setSettings() {
if ($('fieldset#foki.mobile').length) { if ($('fieldset#foki.mobile').length) {
$('fieldset.mobile input#bilder').val('angepasst'); $('fieldset.mobile input#bilder').val('angepasst');
$('fieldset.mobile input#bilder').prop('checked', true); $('fieldset.mobile input#bilder').prop('checked', true);
...@@ -156,7 +156,7 @@ var isChrome = !!window.chrome && !!window.chrome.webstore; ...@@ -156,7 +156,7 @@ var isChrome = !!window.chrome && !!window.chrome.webstore;
var isBlink = (isChrome || isOpera) && !!window.CSS; var isBlink = (isChrome || isOpera) && !!window.CSS;
// Prüft, ob der URL-Parameter "usage" auf "once" gesetzt ist. // Prüft, ob der URL-Parameter "usage" auf "once" gesetzt ist.
function loadSavedResults () { function loadSavedResults() {
var results = new Results(); var results = new Results();
if (results.length > 0) { if (results.length > 0) {
var html = $('\ var html = $('\
......
$(function () { $(function () {
loadLocalStorage(); loadLocalStorage();
setActionListenersSearchbar(); setActionListenersSearchbar();
updateLangLabelCode();
}); });
function setActionListenersSearchbar() { function setActionListenersSearchbar() {
...@@ -21,14 +22,15 @@ function loadKey() { ...@@ -21,14 +22,15 @@ function loadKey() {
} }
function saveLang() { function saveLang() {
var key = $('#input-lang').val(); var lang = $('#input-lang').val();
localStorage.setItem('lang', key); localStorage.setItem('lang', lang);
updateLangLabelCode(lang);
} }
function loadLang() { function loadLang() {
var key = localStorage.getItem('lang'); var lang = localStorage.getItem('lang');
if (key != null) { if (lang != null) {
$('#input-lang').val(key); $('#input-lang').val(lang);
} }
} }
...@@ -68,4 +70,11 @@ function setSettings() { ...@@ -68,4 +70,11 @@ function setSettings() {
if (requestMethod !== null && (requestMethod === 'GET' || requestMethod === 'POST')) { if (requestMethod !== null && (requestMethod === 'GET' || requestMethod === 'POST')) {
$('#searchForm').attr('method', requestMethod); $('#searchForm').attr('method', requestMethod);
} }
}
function updateLangLabelCode(langcode = null) {
if (!langcode) {
var langcode = localStorage.getItem('lang');
}
$('#lang-label-code').html(langcode);
} }
\ No newline at end of file
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
} }
#search-lang, #search-lang,
#search-key { #search-key {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
z-index: 1; z-index: 1;
#input-lang, #input-lang,
...@@ -42,11 +44,16 @@ ...@@ -42,11 +44,16 @@
margin: 0; margin: 0;
padding: 0px; padding: 0px;
border: none; border: none;
-webkit-box-shadow: none;
box-shadow: none; box-shadow: none;
height: 40px; height: 40px;
width: 0px; width: 0px;
outline-color: green; outline-color: green;
-webkit-transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, -webkit-box-shadow 0s;
transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, -webkit-box-shadow 0s;
transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, box-shadow 0s; transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, box-shadow 0s;
transition: width 0.5s, padding 0.5s, outline-color 0s, border-color 0s, box-shadow 0s, -webkit-box-shadow 0s;
-webkit-transition-delay: 0.3s;
transition-delay: 0.3s; transition-delay: 0.3s;
&:focus { &:focus {
width: 200px; width: 200px;
...@@ -69,11 +76,22 @@ ...@@ -69,11 +76,22 @@
height: 40px; height: 40px;
width: 40px; width: 40px;
margin: 0; margin: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center; justify-content: center;
-webkit-transition: width 0s, visibility 0s;
transition: width 0s, visibility 0s; transition: width 0s, visibility 0s;
-webkit-transition-delay: 0.3s;
transition-delay: 0.3s; transition-delay: 0.3s;
#lang-label-code {
margin-left: 5px;
}
} }
} }
.search-input { .search-input {
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
</select> </select>
<label id="lang-label" for="input-lang" data-tooltip="{{ trans ('index.lang.tooltip') }}"> <label id="lang-label" for="input-lang" data-tooltip="{{ trans ('index.lang.tooltip') }}">
<i class="fa fa-globe" aria-hidden="true"></i> <i class="fa fa-globe" aria-hidden="true"></i>
<span id="lang-label-code"></span>
</label> </label>
</div> </div>
<div id="search-key"> <div id="search-key">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment