MCPcopy Create free account
hub / github.com/blockstrap/framework / _fnSaveState

Function _fnSaveState

blockstrap/js/dependencies/tables.js:4697–4719  ·  view source on GitHub ↗

* Save the state of a table * @param {object} oSettings dataTables settings object * @memberof DataTable#oApi

( oSettings )

Source from the content-addressed store, hash-verified

4695 * @memberof DataTable#oApi
4696 */
4697 function _fnSaveState ( oSettings )
4698 {
4699 if ( !oSettings.oFeatures.bStateSave || oSettings.bDestroying )
4700 {
4701 return;
4702 }
4703
4704 /* Store the interesting variables */
4705 var i, iLen;
4706 var oState = {
4707 "iCreate": +new Date(),
4708 "iStart": oSettings._iDisplayStart,
4709 "iLength": oSettings._iDisplayLength,
4710 "aaSorting": $.extend( true, [], oSettings.aaSorting ),
4711 "oSearch": $.extend( true, {}, oSettings.oPreviousSearch ),
4712 "aoSearchCols": $.extend( true, [], oSettings.aoPreSearchCols ),
4713 "abVisCols": _pluck( oSettings.aoColumns, 'bVisible' )
4714 };
4715
4716 _fnCallbackFire( oSettings, "aoStateSaveParams", 'stateSaveParams', [oSettings, oState] );
4717
4718 oSettings.fnStateSaveCallback.call( oSettings.oInstance, oSettings, oState );
4719 }
4720
4721
4722 /**

Callers 1

__setColumnVisFunction · 0.85

Calls 2

_pluckFunction · 0.85
_fnCallbackFireFunction · 0.85

Tested by

no test coverage detected