Listformular DataTables

Listausgaben im Framework ALAF werden mit dem jQuery-Plugin DataTables realisiert:

 


Im HTML-File der Listausgabe:

<script>
	$(document).ready(function() {
		$('#dataTables-userlist').DataTable({
			responsive : true,
			columnDefs: [
				    { "orderable": false, "targets": [6] },
				    { "responsivePriority": 1, "targets": [0,1,2,3,6]},
				    { "responsivePriority": 2, "targets": [5]}
				  ],
		    order: [[ 1, 'asc'], [2, 'asc']],
            language: {
            	"url": "js/plugins/dataTables/language/<?php echo af_engine::get_lang()?>.json"
			}
		});
	});

	$('a.alaf_func_delete')
	.click(
			function() {
				if (confirm('<?php echo afHtmlEntityDecode(af_tran("_DELREC_AREYOUSURE1")) ?>')
						&& confirm('<?php echo afHtmlEntityDecode(af_tran("_DELREC_AREYOUSURE2")) ?>')) {
					return true;
				}
				return false;
			});
	
</script>