backoffice: evaluate pre-checked rows for mass actions (#44144)
This commit is contained in:
parent
54647a16f2
commit
5076220306
|
@ -33,11 +33,6 @@ function prepare_row_links() {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
if ($('#listing tbody input[type=checkbox]:checked').length == 0) {
|
||||
$('form#multi-actions div.buttons').hide();
|
||||
} else {
|
||||
$('form#multi-actions div.buttons').show();
|
||||
}
|
||||
$('#listing tbody input[type=checkbox]').each(function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$(this).parents('tr').addClass('checked');
|
||||
|
@ -93,6 +88,10 @@ function prepare_row_links() {
|
|||
$('form#multi-actions div.buttons').show();
|
||||
}
|
||||
});
|
||||
// hide at first
|
||||
$('form#multi-actions div.buttons').hide();
|
||||
// but trigger events in case of prechecked rows
|
||||
$('#listing input[type=checkbox]:checked').trigger('change');
|
||||
}
|
||||
|
||||
function prepare_column_headers() {
|
||||
|
|
Loading…
Reference in New Issue