diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-02-19 03:44:40 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-02-19 03:44:40 +0300 |
commit | 840cbe4729ac8960c0dc0d23aca0405335f9ecb4 (patch) | |
tree | 3c6c0af54c947c9dac3aa7fafc027e79db8e25b4 /web/kbn_assets/app.js | |
parent | 838b01c548939158f99529a714fe105249d70675 (diff) |
user language support, other important fixes
Diffstat (limited to 'web/kbn_assets/app.js')
-rw-r--r-- | web/kbn_assets/app.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/kbn_assets/app.js b/web/kbn_assets/app.js index 86504cd..0be801d 100644 --- a/web/kbn_assets/app.js +++ b/web/kbn_assets/app.js @@ -102,6 +102,15 @@ function removeClass(el, name) { } function indexInit() { + // language selector + var langSelect = document.getElementById('lang'); + langSelect.addEventListener('change', function() { + var selectedLang = this.value; + document.cookie = "lang=" + selectedLang + ";path=/"; + window.location.reload(); + }); + + // camera blocks var blocks = ['zones', 'list']; for (var i = 0; i < blocks.length; i++) { var button = ge('cam_'+blocks[i]+'_btn'); |