diff options
Diffstat (limited to 'modules-available/passthrough/templates')
-rw-r--r-- | modules-available/passthrough/templates/hardware-list.html | 14 |
1 files changed, 13 insertions, 1 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 |