Merge pull request #1182 from jorge-leon/graceful-datatable-errors

Pop up a nice error message when an AJAX request fails. Closes #1179
This commit is contained in:
Christopher Broderick 2024-05-15 09:08:07 +01:00 committed by GitHub
commit c77bb30035
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -341,6 +341,9 @@
$(document).ready(function () {
// Ticket DataTable Initialization
$.fn.dataTable.ext.errMode = function(settings, helpPage, message) {
alert("{% trans 'Error fetching tickets occured, please contact the system administrators of this server providing the message below:\n ' %}" + message)
};
$('#ticketTable').DataTable({
language: {
"emptyTable": "{% trans 'No Tickets Match Your Selection' %}"