diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 90509098..b13d9c9e 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -225,7 +225,7 @@ "mData": oDefaults.mData ? oDefaults.oDefaults : iCol } ); oSettings.aoColumns.push( oCol ); - + /* Add a column specific filter */ if ( oSettings.aoPreSearchCols[ iCol ] === undefined || oSettings.aoPreSearchCols[ iCol ] === null ) { @@ -234,24 +234,24 @@ else { var oPre = oSettings.aoPreSearchCols[ iCol ]; - + /* Don't require that the user must specify bRegex, bSmart or bCaseInsensitive */ if ( oPre.bRegex === undefined ) { oPre.bRegex = true; } - + if ( oPre.bSmart === undefined ) { oPre.bSmart = true; } - + if ( oPre.bCaseInsensitive === undefined ) { oPre.bCaseInsensitive = true; } } - + /* Use the column options function to initialise classes etc */ _fnColumnOptions( oSettings, iCol, null ); } @@ -268,13 +268,13 @@ { var oCol = oSettings.aoColumns[ iCol ]; var oClasses = oSettings.oClasses; - + /* User specified column options */ if ( oOptions !== undefined && oOptions !== null ) { // Map camel case parameters to their Hungarian counterparts _fnCamelToHungarian( DataTable.defaults.column, oOptions ); - + /* Backwards compatibility for mDataProp */ if ( oOptions.mDataProp !== undefined && !oOptions.mData ) { @@ -450,7 +450,7 @@ { var aTypes = DataTable.ext.aTypes; var iLen = aTypes.length; - + for ( var i=0 ; i= oSettings.fnRecordsDisplay() ? 0 : @@ -1480,7 +1483,10 @@ oSettings.iInitDisplayStart = -1; } - + + var iDisplayStart = oSettings._iDisplayStart; + var iDisplayEnd = oSettings.fnDisplayEnd(); + /* Server-side processing draw intercept */ if ( oSettings.bDeferLoading ) { @@ -1495,12 +1501,12 @@ { return; } - + if ( aiDisplay.length !== 0 ) { var iStart = bServerSide ? 0 : iDisplayStart; var iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd; - + for ( var j=iStart ; j')[0]; oSettings.nTable.parentNode.insertBefore( nHolding, oSettings.nTable ); - + /* * All DataTables are wrapped in a div */ @@ -1638,7 +1644,7 @@ /* Track where we want to insert the option */ var nInsertNode = oSettings.nTableWrapper; - + /* Loop over the user set positioning and place the elements as needed */ var aDom = oSettings.sDom.split(''); var nTmp, iPushFeature, cOption, nNewNode, cNext, sAttr, j; @@ -1646,12 +1652,12 @@ { iPushFeature = 0; cOption = aDom[i]; - + if ( cOption == '<' ) { /* New container div */ nNewNode = $('
')[0]; - + /* Check to see if we should append an id and/or a class name to the container */ cNext = aDom[i+1]; if ( cNext == "'" || cNext == '"' ) @@ -1663,7 +1669,7 @@ sAttr += aDom[i+j]; j++; } - + /* Replace jQuery UI constants */ if ( sAttr == "H" ) { @@ -1673,7 +1679,7 @@ { sAttr = oSettings.oClasses.sJUIFooter; } - + /* The attribute can be in the format of "#id.class", "#id" or "class" This logic * breaks the string into parts and applies them as needed */ @@ -1691,10 +1697,10 @@ { nNewNode.className = sAttr; } - + i += j; /* Move along the position array */ } - + nInsertNode.appendChild( nNewNode ); nInsertNode = nNewNode; } @@ -1757,7 +1763,7 @@ } } } - + /* Add to the 2D features array */ if ( iPushFeature == 1 && nTmp !== null ) { @@ -1769,7 +1775,7 @@ nInsertNode.appendChild( nTmp ); } } - + /* Built our DOM structure - replace the holding div with what we want */ nHolding.parentNode.replaceChild( oSettings.nTableWrapper, nHolding ); } @@ -1799,19 +1805,19 @@ }; aLayout.splice( 0, aLayout.length ); - + /* We know how many rows there are in the layout - so prep it */ for ( i=0, iLen=nTrs.length ; i').addClass( settings.oClasses.sPaging + type )[0]; plugin.fnInit( settings, node, redraw ); - + /* Add a draw callback for the pagination on first instance, to update the paging display */ if ( ! settings.aanFeatures.p ) { @@ -2905,7 +2911,7 @@ } else { - _fnLog( settings, 0, "Unknown paging action: "+action ); + _fnLog( settings, 0, "Unknown paging action: "+action, 5 ); } var changed = settings._iDisplayStart !== start; @@ -2963,7 +2969,7 @@ { return oSettings.nTable; } - + /* * The HTML structure that we want to generate in this function is: * div - nScroller @@ -2993,7 +2999,7 @@ nTfoot = oSettings.nTable.getElementsByTagName('tfoot').length === 0 ? null : oSettings.nTable.getElementsByTagName('tfoot')[0], oClasses = oSettings.oClasses; - + nScrollHead.appendChild( nScrollHeadInner ); nScrollFoot.appendChild( nScrollFootInner ); nScrollBody.appendChild( oSettings.nTable ); @@ -3007,14 +3013,14 @@ nScrollFootInner.appendChild( nScrollFootTable ); nScrollFootTable.appendChild( nTfoot ); } - + nScroller.className = oClasses.sScrollWrapper; nScrollHead.className = oClasses.sScrollHead; nScrollHeadInner.className = oClasses.sScrollHeadInner; nScrollBody.className = oClasses.sScrollBody; nScrollFoot.className = oClasses.sScrollFoot; nScrollFootInner.className = oClasses.sScrollFootInner; - + if ( oSettings.oScroll.bAutoCss ) { nScrollHead.style.overflow = "hidden"; @@ -3022,13 +3028,13 @@ nScrollFoot.style.overflow = "hidden"; nScrollBody.style.overflow = "auto"; } - + nScrollHead.style.border = "0"; nScrollHead.style.width = "100%"; nScrollFoot.style.border = "0"; nScrollHeadInner.style.width = oSettings.oScroll.sXInner !== "" ? oSettings.oScroll.sXInner : "100%"; /* will be overwritten */ - + /* Modify attributes to respect the clones */ nScrollHeadTable.removeAttribute('id'); nScrollHeadTable.style.marginLeft = "0"; @@ -3038,7 +3044,7 @@ nScrollFootTable.removeAttribute('id'); nScrollFootTable.style.marginLeft = "0"; } - + /* Move caption elements from the body to the header, footer or leave where it is * depending on the configuration. Note that the DTD says there can be only one caption */ var nCaption = $(oSettings.nTable).children('caption'); @@ -3054,7 +3060,7 @@ nScrollFootTable.appendChild( nCaption ); } } - + /* * Sizing */ @@ -3063,35 +3069,35 @@ { nScrollHead.style.width = _fnStringToCss( oSettings.oScroll.sX ); nScrollBody.style.width = _fnStringToCss( oSettings.oScroll.sX ); - + if ( nTfoot !== null ) { - nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX ); + nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX ); } - + /* When the body is scrolled, then we also want to scroll the headers */ $(nScrollBody).scroll( function (e) { nScrollHead.scrollLeft = this.scrollLeft; - + if ( nTfoot !== null ) { nScrollFoot.scrollLeft = this.scrollLeft; } } ); } - + /* When yscrolling, add the height */ if ( oSettings.oScroll.sY !== "" ) { nScrollBody.style.height = _fnStringToCss( oSettings.oScroll.sY ); } - + /* Redraw - align columns across the tables */ oSettings.aoDrawCallback.push( { "fn": _fnScrollDraw, "sName": "scrolling" } ); - + /* Infinite scrolling event handlers */ if ( oSettings.oScroll.bInfinite ) { @@ -3113,10 +3119,10 @@ } } ); } - + oSettings.nScrollHead = nScrollHead; oSettings.nScrollFoot = nScrollFoot; - + return nScroller; } @@ -3152,11 +3158,11 @@ oStyle.borderBottomWidth = "0"; oStyle.height = 0; }; - + /* * 1. Re-create the table inside the scrolling div */ - + /* Remove the old minimised thead and tfoot elements in the inner table */ $(o.nTable).children('thead, tfoot').remove(); @@ -3166,7 +3172,7 @@ anHeadToSize = o.nTHead.getElementsByTagName('tr'); anHeadSizers = nTheadSize.getElementsByTagName('tr'); $('th, td', nTheadSize).removeAttr('tabindex'); - + if ( o.nTFoot !== null ) { nTfootSize = $(o.nTFoot).clone()[0]; @@ -3174,11 +3180,11 @@ anFootToSize = o.nTFoot.getElementsByTagName('tr'); anFootSizers = nTfootSize.getElementsByTagName('tr'); } - + /* * 2. Take live measurements from the DOM - do not alter the DOM itself! */ - + /* Remove old sizing and apply the calculated column widths * Get the unique column headers in the newly created (cloned) header. We want to apply the * calculated sizes to this header @@ -3188,14 +3194,14 @@ nScrollBody.style.width = '100%'; nScrollHeadInner.parentNode.style.width = '100%'; } - + var nThs = _fnGetUniqueThs( o, nTheadSize ); for ( i=0, iLen=nThs.length ; i