Merge #15579 - Fix checkbox selection
Pull-request: #15579 Fixes: #15578 Fixes: #15327 Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
70d5ba995c
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user