Sha256: 6efdc4f8535477f2bff7ae03746c2dcc4b1f9bb042aeb29d25a9878f4864937f
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
$.fn.dataTableExt.oApi.fnReloadAjax = function ( oSettings, sNewSource, fnCallback, bStandingRedraw ) { if ( typeof sNewSource != 'undefined' && sNewSource != null ) { oSettings.sAjaxSource = sNewSource; } this.oApi._fnProcessingDisplay( oSettings, true ); var that = this; var iStart = oSettings._iDisplayStart; oSettings.fnServerData( oSettings.sAjaxSource, [], function(json) { /* Clear the old information from the table */ that.oApi._fnClearTable( oSettings ); /* Got the data - add it to the table */ for ( var i=0 ; i<json.aaData.length ; i++ ) { that.oApi._fnAddData( oSettings, json.aaData[i] ); } oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); that.fnDraw(); if ( typeof bStandingRedraw != 'undefined' && bStandingRedraw === true ) { oSettings._iDisplayStart = iStart; that.fnDraw( false ); } that.oApi._fnProcessingDisplay( oSettings, false ); /* Callback user function - for event handlers etc */ if ( typeof fnCallback == 'function' && fnCallback != null ) { fnCallback( oSettings ); } }, oSettings ); } /* Example call to load a new file oTable.fnReloadAjax( 'media/examples_support/json_source2.txt' ); */ /* Example call to reload from original file oTable.fnReloadAjax(); */
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jquery-datatables-rails-1.9.1.1 | vendor/assets/javascripts/jquery.dataTables.fnReloadAjax.js |
jquery-datatables-rails-1.9.0 | vendor/assets/javascripts/jquery.dataTables.fnReloadAjax.js |