diff --git a/webui/src/main/js/accordion.js b/webui/src/main/js/accordion.js new file mode 100644 index 00000000..f2189fe8 --- /dev/null +++ b/webui/src/main/js/accordion.js @@ -0,0 +1,29 @@ +var openAccordion = 0; + +function initAccordion() { + var acc = document.getElementsByClassName("accordion"); + var i; + + for (i = 0; i < acc.length; i++) { + acc[i].addEventListener("click", function() { + this.classList.toggle("active"); + var panel = this.nextElementSibling; + if (panel.style.maxHeight) { + panel.style.maxHeight = null; + } else { + panel.style.maxHeight = panel.scrollHeight + "px"; + } + }); + } + + if (openAccordion > 0) { + acc[openAccordion - 1].classList.add("active"); + var panel = acc[openAccordion - 1].nextElementSibling; + panel.style.maxHeight = panel.scrollHeight + "px"; + } +} + + +document.addEventListener("DOMContentLoaded", function() { + initAccordion(); +}, true); diff --git a/webui/src/main/webapp/AboutMe.jsp b/webui/src/main/webapp/AboutMe.jsp index 83d21f7d..05ca172b 100644 --- a/webui/src/main/webapp/AboutMe.jsp +++ b/webui/src/main/webapp/AboutMe.jsp @@ -25,6 +25,7 @@ function copyFullId() { copyToClipboard("full-id") alert("Full ID copied to clipboard") } +openAccordion = 3; diff --git a/webui/src/main/webapp/AdvancedSharing.jsp b/webui/src/main/webapp/AdvancedSharing.jsp index f4a23407..62edaec3 100644 --- a/webui/src/main/webapp/AdvancedSharing.jsp +++ b/webui/src/main/webapp/AdvancedSharing.jsp @@ -16,7 +16,9 @@ String helptext = Util._t("Use this page to configure advanced settings for each - + <%@ include file="header.jsi"%> diff --git a/webui/src/main/webapp/ConfigurationPage.jsp b/webui/src/main/webapp/ConfigurationPage.jsp index 6bee9c79..1bca0306 100644 --- a/webui/src/main/webapp/ConfigurationPage.jsp +++ b/webui/src/main/webapp/ConfigurationPage.jsp @@ -27,6 +27,9 @@ Exception error = (Exception) application.getAttribute("MWConfigError"); <%@include file="css.jsi"%> + <%@include file="header.jsi"%> diff --git a/webui/src/main/webapp/MuStatus.jsp b/webui/src/main/webapp/MuStatus.jsp index 5a892957..67ed7931 100644 --- a/webui/src/main/webapp/MuStatus.jsp +++ b/webui/src/main/webapp/MuStatus.jsp @@ -18,7 +18,9 @@ String buildNumber = (String)application.getAttribute("buildNumber"); <%@ include file="css.jsi"%> - + <%@ include file="header.jsi"%> diff --git a/webui/src/main/webapp/TrustLists.jsp b/webui/src/main/webapp/TrustLists.jsp index 92eb398b..26afdad5 100644 --- a/webui/src/main/webapp/TrustLists.jsp +++ b/webui/src/main/webapp/TrustLists.jsp @@ -14,7 +14,9 @@ String helptext = Util._t("This page shows the trust lists of the users you have - + <%@ include file="header.jsi"%> diff --git a/webui/src/main/webapp/TrustUsers.jsp b/webui/src/main/webapp/TrustUsers.jsp index f90a00a0..0ca41756 100644 --- a/webui/src/main/webapp/TrustUsers.jsp +++ b/webui/src/main/webapp/TrustUsers.jsp @@ -15,7 +15,9 @@ String helptext = Util._t("This page shows the users you have marked as Trusted - + <%@ include file="header.jsi"%> diff --git a/webui/src/main/webapp/css.jsi b/webui/src/main/webapp/css.jsi index 5462c5d5..0154f71c 100644 --- a/webui/src/main/webapp/css.jsi +++ b/webui/src/main/webapp/css.jsi @@ -4,6 +4,7 @@ + diff --git a/webui/src/main/webapp/sidebar.jsi b/webui/src/main/webapp/sidebar.jsi index f4129b41..6ecc37f6 100644 --- a/webui/src/main/webapp/sidebar.jsi +++ b/webui/src/main/webapp/sidebar.jsi @@ -105,20 +105,3 @@ <%=Util._t("About")%> --> - - \ No newline at end of file