From 83fca24a2f73bfaabe49cb4b933a00f98c5a8205 Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Thu, 7 Mar 2024 07:43:45 +0000 Subject: [PATCH] Updated switcher --- .docs/overrides/main.html | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.docs/overrides/main.html b/.docs/overrides/main.html index bc23fb67ea..9f9a6daf6f 100644 --- a/.docs/overrides/main.html +++ b/.docs/overrides/main.html @@ -3,24 +3,9 @@ {% block announce %} <label for="version">Version</label> <select style="margin-left:8px;" id="version" name="version" onchange="switchVersion(this.options[this.selectedIndex].value)"> + <option value="latest">latest</option> + <option value="1.4.1">1.4.1</option> <option value="1.4.0">1.4.0</option> <option value="1.3.0">1.3.0</option> - <option value="latest">latest</option> </select> -<script> - function getVersion() { - const segments = location.pathname.split('/') - console.debug('segments', segments) - if (segments.length >= 4) { - return segments[3] - } else { - return '__APPVERSION__' - } - } - function switchVersion(value) { - if (!value) { return } - this.location.href = location.protocol + '//' + location.host + '/infrastructures/dbrepo/' + value + '/' - } - document.getElementById("version").value = getVersion() -</script> {% endblock %} -- GitLab