diff options
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/passthrough/templates/hardware-list.html | 14 | ||||
-rw-r--r-- | modules-available/statistics/templates/machine-main.html | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/modules-available/passthrough/templates/hardware-list.html b/modules-available/passthrough/templates/hardware-list.html index 4bff0a39..4468645c 100644 --- a/modules-available/passthrough/templates/hardware-list.html +++ b/modules-available/passthrough/templates/hardware-list.html @@ -11,7 +11,7 @@ </thead> <tbody> {{#list}} - <tr> + <tr class="c-{{vendor}}-{{device}} tr"> {{#class_name}} <td colspan="4"> <span>{{class}}</span> – <strong>{{class_name}}</strong> @@ -101,5 +101,17 @@ $(this).append($('<option>').attr('value', gid).text(gid + ' (' + title + ')')); }); }); + hashChanged(); + }); + window.addEventListener('hashchange', function() { + hashChanged(); }); + function hashChanged() { + var c = window.location.hash; + $('tr.tr').removeClass('bg-success'); + if (c && c.length > 1) { + var d = $('.c-' + c.substr(1)).addClass('bg-success'); + if (d.length > 0) d[0].scrollIntoView(); + } + } </script>
\ No newline at end of file diff --git a/modules-available/statistics/templates/machine-main.html b/modules-available/statistics/templates/machine-main.html index 71df723d..9ec19820 100644 --- a/modules-available/statistics/templates/machine-main.html +++ b/modules-available/statistics/templates/machine-main.html @@ -398,7 +398,7 @@  └ <span{{^vendor_s}} class="query-{{vendor}}"{{/vendor_s}}>{{vendor_s}}</span> <span{{^device_s}} class="query-{{vendor}}-{{device}}"{{/device_s}}>{{device_s}}</span> - <span>[{{vendor}}:{{device}}]</span> + <a href="?do=passthrough&show=hwlist#{{vendor}}-{{device}}">[{{vendor}}:{{device}}]</a> </div> {{/entries}} {{/lspci1}} |