jQuery(document).ready(function($){
	var pos_arr = $('#position-hook').data('position');
	for(var student_id in pos_arr) {
		$('#position'+student_id).html(pos_arr[student_id]);
	}

	$('#bootstrap-data-table-export-pos, #bootstrap-data-table-pos').DataTable().destroy();
	$('#bootstrap-data-table-pos').DataTable({
        lengthMenu: [[-1, 50, 75, 100], ["All", 50, 75, 100]],
        iDisplayLength: -1
    }).columns(-1).order('asc').draw();
	$('#bootstrap-data-table-export-pos').DataTable({
        dom: 'lBfrtip',
        lengthMenu: [[50, 75, 100, -1], [50, 75, 100, "All"]],
        iDisplayLength: -1,
        buttons: [
		    {
		        extend: 'csv',
		        text: 'CSV',
		        className: 'btn btn-default',
		        exportOptions: {
		            columns: ':not(.notexport)'
		        }
		    },
		    {
		        extend: 'excel',
		        text: 'Excel',
		        className: 'btn btn-default',
		        exportOptions: {
		            columns: ':not(.notexport)'
		        }
		    },
		    {
		        extend: 'pdf',
		        text: 'PDF',
		        className: 'btn btn-default',
		        exportOptions: {
		            columns: ':not(.notexport)'
		        }
		    }
        ]
    }).columns(-1).order('asc').draw();
})