summaryrefslogtreecommitdiffstats
path: root/modules-available
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available')
-rw-r--r--modules-available/minilinux/page.inc.php1
-rw-r--r--modules-available/minilinux/templates/branches.html12
-rw-r--r--modules-available/minilinux/templates/versionlist.html3
-rw-r--r--modules-available/statistics/templates/machine-main.html2
4 files changed, 15 insertions, 3 deletions
diff --git a/modules-available/minilinux/page.inc.php b/modules-available/minilinux/page.inc.php
index 8004f1ab..ce222b08 100644
--- a/modules-available/minilinux/page.inc.php
+++ b/modules-available/minilinux/page.inc.php
@@ -127,6 +127,7 @@ class Page_MiniLinux extends Page
if (isset($usage[$version['versionid']])) {
$version['usage'] = $usage[$version['versionid']];
}
+ $version['versionid_dash'] = str_replace('/', '-', $version['versionid']);
}
return Render::parse('versionlist', ['versions' => array_values($versions)]);
}
diff --git a/modules-available/minilinux/templates/branches.html b/modules-available/minilinux/templates/branches.html
index 372321e2..7a93a523 100644
--- a/modules-available/minilinux/templates/branches.html
+++ b/modules-available/minilinux/templates/branches.html
@@ -23,12 +23,22 @@
<script>
document.addEventListener('DOMContentLoaded', function () {
+ var hash = window.location.hash.replaceAll('/', '-');
+ // Highlight
+ var $tr = $(hash);
+ if ($tr.length > 0) {
+ $tr.addClass('bg-info');
+ setTimeout(function () {
+ $tr[0].scrollIntoView();
+ }, 10);
+ }
// Remember collapsed state
var c = localStorage.getItem('ml-collapse');
if (c) {
c = JSON.parse(c);
for (var e in c) {
- if (c.hasOwnProperty(e)) {
+ if (c.hasOwnProperty(e) && !hash.startsWith('#' + e.substring(4))) {
+ console.log(hash, e);
$('#' + e).collapse('hide');
}
}
diff --git a/modules-available/minilinux/templates/versionlist.html b/modules-available/minilinux/templates/versionlist.html
index e66960b2..7e42bc6b 100644
--- a/modules-available/minilinux/templates/versionlist.html
+++ b/modules-available/minilinux/templates/versionlist.html
@@ -9,8 +9,9 @@
<th class="slx-smallcol" style="width:150px">{{lang_download}}</th>
</tr>
{{#versions}}
-<tr>
+<tr id="{{versionid_dash}}">
<td class="text-nowrap">
+ <a name="{{versionid}}"></a>
<a href="#" class="version-link" data-version="{{versionid}}" {{#downloading}}data-autoclick="true"{{/downloading}}>
{{versionid}}
<b class="caret"></b>
diff --git a/modules-available/statistics/templates/machine-main.html b/modules-available/statistics/templates/machine-main.html
index 1139d5b9..4eacce21 100644
--- a/modules-available/statistics/templates/machine-main.html
+++ b/modules-available/statistics/templates/machine-main.html
@@ -51,7 +51,7 @@
{{lastboot_s}}
{{#minilinux}}
<div>
- {{lang_baseSystem}}: {{minilinux}}
+ {{lang_baseSystem}}: <a href="?do=minilinux#{{minilinux}}">{{minilinux}}</a>
{{#boottime_s}}
(<span title="{{lang_boottimeTooltip}}">{{boottime_s}}</span>)
{{/boottime_s}}