diff options
Diffstat (limited to 'modules-available/dnbd3/templates/page-proxy-clients.html')
-rw-r--r-- | modules-available/dnbd3/templates/page-proxy-clients.html | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/modules-available/dnbd3/templates/page-proxy-clients.html b/modules-available/dnbd3/templates/page-proxy-clients.html index 660b52eb..6e2cece7 100644 --- a/modules-available/dnbd3/templates/page-proxy-clients.html +++ b/modules-available/dnbd3/templates/page-proxy-clients.html @@ -32,7 +32,7 @@ <div class="col-md-6"> <h2>{{lang_clientList}}</h2> - <table class="table table-condensed"> + <table id="client-table" class="table table-condensed"> <tr> <th>{{lang_client}}</th> <th></th> @@ -44,10 +44,10 @@ {{#isServer}} <span class="glyphicon glyphicon-hdd" title="{{lang_isProxy}}"></span> {{/isServer}} - {{address}} + <a href="?do=statistics&show=list&filter[clientip]=1&op[clientip]=%3D&arg[clientip]={{ip}}">{{address}}</a> </td> <td class="slx-smallcol"> - <a href="#tab-images" onclick="$('#img-table tr').removeClass('warning');$('#img-{{imageId}}').addClass('warning')[0].scrollIntoView()"> + <a href="#tab-images" class="show-image" data-image-id="{{imageId}}"> <span class="glyphicon glyphicon-folder-open"></span> </a> </td> @@ -59,4 +59,15 @@ </table> </div> </div> -</div>
\ No newline at end of file +</div> + +<script> + document.addEventListener('DOMContentLoaded', function() { + $('.show-image').click(function () { + $('#client-table tr').removeClass('warning'); + $('#img-table tr').removeClass('warning'); + var x = $('#img-table a[data-image-id=' + $(this).data('image-id') + ']').closest('tr').addClass('warning')[0]; + setTimeout(function() { if (x.scrollIntoViewIfNeeded) x.scrollIntoViewIfNeeded(true); else x.scrollIntoView({block: "center"}) }, 10); + }); + }); +</script>
\ No newline at end of file |