Moved DataTables initialization up under if block to prevent attempt to initialize when table is not drawn.

This commit is contained in:
bmatt 2020-02-25 04:42:55 +00:00
parent 7f8f1f23c4
commit 2d8215dd28

View file

@ -32,12 +32,12 @@
{% endfor %}
</tbody>
</table>
{% else %}
<div class="alert alert-danger">{{ _("The Dashboard is currently deactivated.") }}</div>
{% endif %}
<script language="JavaScript">
$(document).ready(function() {
$('#bill_table').DataTable();
})
</script>
{% else %}
<div class="alert alert-danger">{{ _("The Dashboard is currently deactivated.") }}</div>
{% endif %}
{% endblock %}