Created
February 17, 2014 23:24
-
-
Save stevelippert/9061347 to your computer and use it in GitHub Desktop.
Advanced DataTables Initialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var workloadTable = $(".dataTables").dataTable({ | |
| "sDom" : '<"top"plf<"workload_filter"><"clear">>rt<"bottom"ipl<"clear">>', | |
| "aaSorting" : [[ 5, "desc" ]], | |
| "aoColumns" : [ | |
| { "sWidth": "250px" }, | |
| { "sWidth": "144px", "sType":"title-string" }, | |
| { "sWidth": "300px" }, | |
| { "sWidth": "125px" }, | |
| { "sWidth": "150px" }, | |
| { "sWidth": "150px" }, | |
| ], | |
| "oLanguage" : { | |
| "sEmptyTable" : "There are no workload events", | |
| "sLengthMenu" : "Show: _MENU_", | |
| "sSearch" : "Filter:", | |
| "sZeroRecords": "There are no workload events" | |
| }, | |
| "bAutoWidth" : false, | |
| "bStateSave" : true, | |
| "fnStateSave" : function (oSettings, oData){ | |
| localStorage.setItem( 'DataTables_'+window.location.pathname, JSON.stringify(oData) ); | |
| }, | |
| "fnStateLoad" : function (oSettings){ | |
| return JSON.parse( localStorage.getItem('DataTables_'+window.location.pathname) ); | |
| }, | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment