hotfix for #470: datatables error on empty ticket list

handle the no tickets match query case with js rather than python for DataTables compatibility
This commit is contained in:
Jonathan Barratt 2017-01-03 00:42:12 +07:00
parent 1c069f7f08
commit 8a2e6c087e
No known key found for this signature in database
GPG Key ID: C007F833B47313DA

View File

@ -9,6 +9,9 @@
$(document).ready(function() {
$('#ticketTable').DataTable({
"oLanguage": {
"sEmptyTable": "{% trans 'No Tickets Match Your Selection' %}"
},
responsive: true
});
@ -234,8 +237,6 @@ $(document).ready(function() {
<td data-order='{{ ticket.created|date:"U" }}'><span title='{{ ticket.created|date:"r" }}'>{{ ticket.created|naturaltime }}</span></td>
<td>{{ ticket.get_assigned_to }}</td>
</tr>
{% empty %}
<tr><td colspan='7'>{% trans "No Tickets Match Your Selection" %}</td></tr>
{% endfor %}
</tbody>
</table>