taler-merchant-demos

Python-based Frontends for the Demonstration Web site
Log | Files | Refs | Submodules | README | LICENSE

commit 8d89daee0708cb35f3d831c0dfd61a4a662fa71b
parent 1477a87106c3b596d6ec046628d0608bc754bb02
Author: Sebastian <sebasjm@gmail.com>
Date:   Tue, 18 Oct 2022 19:54:43 -0300

fix #7385

Diffstat:
Mtalermerchantdemos/static/demo.css | 13++++---------
Mtalermerchantdemos/templates/common-base.html.j2 | 11+++++++++--
2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/talermerchantdemos/static/demo.css b/talermerchantdemos/static/demo.css @@ -135,13 +135,7 @@ nav .right { float: right; margin-right: 5vw; } -nav .right div.nav { - display: none; -} -nav .right div.nav:hover { - display: block; -} -nav .right:hover div.nav { - display: block; -} +nav .right.hide div.nav { + display: none; +} +\ No newline at end of file diff --git a/talermerchantdemos/templates/common-base.html.j2 b/talermerchantdemos/templates/common-base.html.j2 @@ -55,9 +55,16 @@ <a href="{{ env('TALER_ENV_URL_MERCHANT_SURVEY', '#') + getlang() + '/' }}" {% if getactive() == 'survey' %} class="active" {% endif %} >{{gettext("Tipping/Survey")}}</a> + <script> + function handleLang(event){ + if (event.type === 'click') { + document.getElementById("lang").classList.toggle("hide"); + } + } + </script> {# Language Selector #} - <div class="right"> + <button id="lang" class="right hide" onkeydown="handleLang(event)" onclick="handleLang(event)"> <span>{{ all_languages[getlang()] | default("en") }}</span> <div style="position: relative; overflow: visible;"> <div class="nav" style="position: absolute; background: #0042b2; max-height: 60vh; overflow-y: scroll"> @@ -73,7 +80,7 @@ {% endif %} {% endfor %} </div> - </div> + </button> </div> </nav>