[Contesting] Check if QSOTable is initialised

This fixes the javascript error reported in #981 not sure if it solves all the issues though
pull/982/head
Peter Goodhall 2021-04-05 17:40:34 +01:00
rodzic 2396aec9d6
commit ae4a7e596b
1 zmienionych plików z 11 dodań i 10 usunięć

Wyświetl plik

@ -1854,16 +1854,17 @@ function deleteQsl(id) {
'<td>'+ receivedexchange + '</td>' +
'</tr>');
});
$('.qsotable').DataTable({
"pageLength": 25,
responsive: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [[ 0, "desc" ]]
});
if (!$.fn.DataTable.isDataTable('.qsotable')) {
$('.qsotable').DataTable({
"pageLength": 25,
responsive: false,
"scrollY": "400px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [[ 0, "desc" ]]
});
}
}
});
}