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 () { ...@@ -4,7 +4,8 @@ $(function () {
}); });
function setActionListenersSearchbar() { function setActionListenersSearchbar() {
$('#input-key').keydown(saveKey); $('#input-key').change(saveKey);
$('#input-lang').change(saveLang);
} }
function saveKey() { function saveKey() {
...@@ -14,7 +15,21 @@ function saveKey() { ...@@ -14,7 +15,21 @@ function saveKey() {
function loadKey() { function loadKey() {
var key = localStorage.getItem('key'); 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() { ...@@ -24,6 +39,7 @@ function loadLocalStorage() {
if (localStorage) { if (localStorage) {
setSettings(); setSettings();
loadKey(); loadKey();
loadLang();
} }
} }
......
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