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

Auch die Sprache wird jetzt gespeichert

parent 8a99edb2
No related branches found
No related tags found
1 merge request!1365Resolve "Filter Options for MetaGer"
......@@ -4,7 +4,8 @@ $(function () {
});
function setActionListenersSearchbar() {
$('#input-key').keydown(saveKey);
$('#input-key').change(saveKey);
$('#input-lang').change(saveLang);
}
function saveKey() {
......@@ -14,7 +15,21 @@ function saveKey() {
function loadKey() {
var key = localStorage.getItem('key');
$('#input-key').val(key);
if (key != null) {
$('#input-key').val(key);
}
}
function saveLang() {
var key = $('#input-lang').val();
localStorage.setItem('lang', key);
}
function loadLang() {
var key = localStorage.getItem('lang');
if (key != null) {
$('#input-lang').val(key);
}
}
/**
......@@ -24,6 +39,7 @@ function loadLocalStorage() {
if (localStorage) {
setSettings();
loadKey();
loadLang();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment