Fix mark all checkbox functionality in QSL Print page
Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
这个提交包含在:
父节点
03bc01bea8
当前提交
8d1232ca0c
共有 1 个文件被更改,包括 14 次插入 和 2 次删除
|
|
@ -77,8 +77,20 @@ $(".station_id").change(function(){
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {'station_id': station_id},
|
data: {'station_id': station_id},
|
||||||
success: function(html) {
|
success: function(html) {
|
||||||
|
// Destroy existing DataTable if it exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#qslprint_table')) {
|
||||||
|
$('#qslprint_table').DataTable().destroy();
|
||||||
|
}
|
||||||
$('.resulttable').empty();
|
$('.resulttable').empty();
|
||||||
$('.resulttable').append(html);
|
$('.resulttable').append(html);
|
||||||
|
// Reinitialize DataTable
|
||||||
|
$('#qslprint_table').DataTable({
|
||||||
|
"stateSave": true,
|
||||||
|
paging: false,
|
||||||
|
"language": {
|
||||||
|
url: getDataTablesLanguageUrl(),
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -135,7 +147,7 @@ function mark_qsl_sent(id, method) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#checkBoxAll').change(function (event) {
|
$(document).on('change', '#checkBoxAll', function (event) {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
$('.qslprint tbody tr').each(function (i) {
|
$('.qslprint tbody tr').each(function (i) {
|
||||||
$(this).closest('tr').addClass('activeRow');
|
$(this).closest('tr').addClass('activeRow');
|
||||||
|
|
@ -149,7 +161,7 @@ $('#checkBoxAll').change(function (event) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.qslprint').on('click', 'input[type="checkbox"]', function() {
|
$(document).on('click', '.qslprint input[type="checkbox"]', function() {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
$(this).closest('tr').addClass('activeRow');
|
$(this).closest('tr').addClass('activeRow');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用