diff --git a/src/index.html b/src/index.html index d77378d3f..32f62c736 100644 --- a/src/index.html +++ b/src/index.html @@ -155,10 +155,9 @@
-
+
-
diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 072589e85..c1a3556d4 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -47,7 +47,7 @@ const AppRoutes = () => ( } /> diff --git a/src/scripts/libraryMenu.js b/src/scripts/libraryMenu.js index 91dfb8b0d..81f819f80 100644 --- a/src/scripts/libraryMenu.js +++ b/src/scripts/libraryMenu.js @@ -355,14 +355,14 @@ import '../assets/css/flexstyles.scss'; } } - function refreshDashboardInfoInDrawer(apiClient) { + function refreshDashboardInfoInDrawer(page, apiClient) { currentDrawerType = 'admin'; loadNavDrawer(); if (navDrawerScrollContainer.querySelector('.adminDrawerLogo')) { - updateDashboardMenuSelectedItem(); + updateDashboardMenuSelectedItem(page); } else { - createDashboardMenu(apiClient); + createDashboardMenu(page, apiClient); } } @@ -370,9 +370,9 @@ import '../assets/css/flexstyles.scss'; return window.location.href.toString().toLowerCase().indexOf(url.toLowerCase()) !== -1; } - function updateDashboardMenuSelectedItem() { + function updateDashboardMenuSelectedItem(page) { const links = navDrawerScrollContainer.querySelectorAll('.navMenuOption'); - const currentViewId = viewManager.currentView().id; + const currentViewId = page.id; for (let i = 0, length = links.length; i < length; i++) { let link = links[i]; @@ -590,7 +590,7 @@ import '../assets/css/flexstyles.scss'; }); } - function createDashboardMenu(apiClient) { + function createDashboardMenu(page, apiClient) { return getToolsMenuHtml(apiClient).then(function (toolsMenuHtml) { let html = ''; html += ''; html += toolsMenuHtml; navDrawerScrollContainer.innerHTML = html; - updateDashboardMenuSelectedItem(); + updateDashboardMenuSelectedItem(page); }); } @@ -1017,7 +1017,7 @@ import '../assets/css/flexstyles.scss'; mainDrawerButton.classList.remove('hide'); } - refreshDashboardInfoInDrawer(apiClient); + refreshDashboardInfoInDrawer(page, apiClient); } else { if (mainDrawerButton) { if (enableLibraryNavDrawer || (isHomePage && enableLibraryNavDrawerHome)) {