From c191ae373a98fa1952d0e72bdbc7932046c2f640 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 18 Jun 2020 10:11:24 +0200 Subject: [PATCH] KEYCLOAK-14499 added toggle menu back on welcome screen --- .../theme/keycloak-preview/account/index.ftl | 8 +++----- .../account/resources/welcome-page-scripts.js | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl index ebf5468db2..56867b0a01 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl +++ b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl @@ -186,15 +186,11 @@ -
- -
-
+ + diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/welcome-page-scripts.js b/themes/src/main/resources/theme/keycloak-preview/account/resources/welcome-page-scripts.js index b49bcaa5bc..3559d65ab6 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/welcome-page-scripts.js +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/welcome-page-scripts.js @@ -58,6 +58,21 @@ function loggedInUserName() { return userName; } +var toggleMobileDropdown = function () { + var mobileDropdown = document.getElementById("landingMobileDropdown"); + var mobileKebab = document.getElementById("landingMobileKebab"); + var mobileKebabButton = document.getElementById("landingMobileKebabButton"); + if (mobileDropdown.style.display === 'none') { + mobileDropdown.style.display = 'block'; + mobileKebab.classList.add("pf-m-expanded"); + mobileKebabButton.setAttribute("aria-expanded", "true"); + } else { + mobileDropdown.style.display = 'none'; + mobileKebab.classList.remove("pf-m-expanded"); + mobileKebabButton.setAttribute("aria-expanded", "false"); + } +} + var loadjs = function (url, loadListener) { const script = document.createElement("script"); script.src = resourceUrl + url;