Enabled saving datatable sort/per page state

This commit is contained in:
Hillel Coren 2016-10-09 17:18:03 +03:00
parent 06100a3598
commit f1698c2917

View File

@ -48,6 +48,8 @@
function load_{{ $class }}() { function load_{{ $class }}() {
window.dataTable = jQuery('.{{ $class }}').dataTable({ window.dataTable = jQuery('.{{ $class }}').dataTable({
"stateSave": true,
"stateDuration": 0,
"fnRowCallback": function(row, data) { "fnRowCallback": function(row, data) {
if (data[0].indexOf('ENTITY_DELETED') > 0) { if (data[0].indexOf('ENTITY_DELETED') > 0) {
$(row).addClass('entityDeleted'); $(row).addClass('entityDeleted');
@ -84,4 +86,4 @@
} }
}); });
} }
</script> </script>