From cff5342a02915e93317be6116e7253f0a53b5fa9 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 28 Jun 2017 18:47:57 +0300 Subject: [PATCH] Improvements to keyboard shorcuts --- resources/views/list.blade.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index 1be6041757ca..562ef6ef19fa 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -221,7 +221,10 @@ @for ($i = 1; $i <= 10; $i++) Mousetrap.bind('g {{ $i }}', function(e) { - location.href = $('#DataTables_Table_0').find('tr:nth-child({{ $i }})').find('a').attr('href'); + var link = $('.data-table').find('tr:nth-child({{ $i }})').find('a').attr('href'); + if (link) { + location.href = link; + } }); @endfor });