diff options
author | Saulo Soares de Toledo <saulotoledo@gmail.com> | 2019-11-21 01:27:22 +0300 |
---|---|---|
committer | Saulo Soares de Toledo <saulotoledo@gmail.com> | 2019-11-21 01:29:16 +0300 |
commit | 988ae066a8ca8fea45682b92e0e5f9f600df8c11 (patch) | |
tree | e723b2d4bb4f7132bf5c73a0739cc7b601419861 /js | |
parent | 642ef8abb5bc1d714c69027be5c026490c88288b (diff) |
Fix table select range with Shift key
Signed-off-by: Saulo Soares de Toledo <saulotoledo@gmail.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/functions.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/functions.js b/js/functions.js index 50c276afb4..88263b60ff 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1046,7 +1046,7 @@ AJAX.registerOnload('functions.js', function () { last_click_checked = checked; // remember the last clicked row - last_clicked_row = last_click_checked ? $table.find('tr:not(.noclick)').index($tr) : -1; + last_clicked_row = last_click_checked ? $table.find('tbody tr:not(.noclick)').index($tr) : -1; last_shift_clicked_row = -1; } else { // handle the shift click @@ -1072,7 +1072,7 @@ AJAX.registerOnload('functions.js', function () { } // handle new shift click - var curr_row = $table.find('tr:not(.noclick)').index($tr); + var curr_row = $table.find('tbody tr:not(.noclick)').index($tr); if (curr_row >= last_clicked_row) { start = last_clicked_row; end = curr_row; @@ -1081,7 +1081,7 @@ AJAX.registerOnload('functions.js', function () { end = last_clicked_row; } $tr.parent().find('tr:not(.noclick)') - .slice(start, end) + .slice(start, end + 1) .addClass('marked') .find(':checkbox') .prop('checked', true) |