mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-30 23:52:11 +01:00
Dev: Remove trailing white space
- JSHint flagging warnings on trailing whitespace, so tidying up. Boring commit, but these things must be done!
This commit is contained in:
parent
6e012c8ee1
commit
4c4bfb04b8
54
media/js/jquery.dataTables.js
vendored
54
media/js/jquery.dataTables.js
vendored
@ -1526,7 +1526,7 @@
|
|||||||
* up. When not infinite scroll, always do it.
|
* up. When not infinite scroll, always do it.
|
||||||
*/
|
*/
|
||||||
if ( !oSettings.oScroll.bInfinite || !oSettings._bInitComplete ||
|
if ( !oSettings.oScroll.bInfinite || !oSettings._bInitComplete ||
|
||||||
oSettings.bSorted || oSettings.bFiltered )
|
oSettings.bSorted || oSettings.bFiltered )
|
||||||
{
|
{
|
||||||
while( (n = oSettings.nTBody.firstChild) )
|
while( (n = oSettings.nTBody.firstChild) )
|
||||||
{
|
{
|
||||||
@ -2357,7 +2357,7 @@
|
|||||||
/*
|
/*
|
||||||
* We are starting a new search or the new search string is smaller
|
* We are starting a new search or the new search string is smaller
|
||||||
* then the old one (i.e. delete). Search from the master array
|
* then the old one (i.e. delete). Search from the master array
|
||||||
*/
|
*/
|
||||||
if ( oSettings.aiDisplay.length == oSettings.aiDisplayMaster.length ||
|
if ( oSettings.aiDisplay.length == oSettings.aiDisplayMaster.length ||
|
||||||
oPrevSearch.sSearch.length > sInput.length || iForce == 1 ||
|
oPrevSearch.sSearch.length > sInput.length || iForce == 1 ||
|
||||||
sInput.indexOf(oPrevSearch.sSearch) !== 0 )
|
sInput.indexOf(oPrevSearch.sSearch) !== 0 )
|
||||||
@ -2379,24 +2379,24 @@
|
|||||||
oSettings.aiDisplay.push( oSettings.aiDisplayMaster[i] );
|
oSettings.aiDisplay.push( oSettings.aiDisplayMaster[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Using old search array - refine it - do it this way for speed
|
/* Using old search array - refine it - do it this way for speed
|
||||||
* Don't have to search the whole master array again
|
* Don't have to search the whole master array again
|
||||||
*/
|
*/
|
||||||
var iIndexCorrector = 0;
|
var iIndexCorrector = 0;
|
||||||
|
|
||||||
/* Search the current results */
|
/* Search the current results */
|
||||||
for ( i=0 ; i<oSettings.asDataSearch.length ; i++ )
|
for ( i=0 ; i<oSettings.asDataSearch.length ; i++ )
|
||||||
{
|
{
|
||||||
if ( ! rpSearch.test(oSettings.asDataSearch[i]) )
|
if ( ! rpSearch.test(oSettings.asDataSearch[i]) )
|
||||||
{
|
{
|
||||||
oSettings.aiDisplay.splice( i-iIndexCorrector, 1 );
|
oSettings.aiDisplay.splice( i-iIndexCorrector, 1 );
|
||||||
iIndexCorrector++;
|
iIndexCorrector++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2416,8 +2416,8 @@
|
|||||||
|
|
||||||
var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
|
var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
|
||||||
var aiIndex = (iMaster===1) ?
|
var aiIndex = (iMaster===1) ?
|
||||||
oSettings.aiDisplayMaster :
|
oSettings.aiDisplayMaster :
|
||||||
oSettings.aiDisplay;
|
oSettings.aiDisplay;
|
||||||
|
|
||||||
for ( var i=0, iLen=aiIndex.length ; i<iLen ; i++ )
|
for ( var i=0, iLen=aiIndex.length ; i<iLen ; i++ )
|
||||||
{
|
{
|
||||||
@ -3970,7 +3970,7 @@
|
|||||||
i, iLen, j, jLen, k, kLen,
|
i, iLen, j, jLen, k, kLen,
|
||||||
sDataType, nTh,
|
sDataType, nTh,
|
||||||
aSort = [],
|
aSort = [],
|
||||||
aiOrig = [],
|
aiOrig = [],
|
||||||
oExtSort = DataTable.ext.oSort,
|
oExtSort = DataTable.ext.oSort,
|
||||||
aoData = oSettings.aoData,
|
aoData = oSettings.aoData,
|
||||||
aoColumns = oSettings.aoColumns,
|
aoColumns = oSettings.aoColumns,
|
||||||
@ -4072,14 +4072,14 @@
|
|||||||
* and sorting function (from oSort) in a certain direction. It's reasonably complex to
|
* and sorting function (from oSort) in a certain direction. It's reasonably complex to
|
||||||
* follow on it's own, but this is what we want (example two column sorting):
|
* follow on it's own, but this is what we want (example two column sorting):
|
||||||
* fnLocalSorting = function(a,b){
|
* fnLocalSorting = function(a,b){
|
||||||
* var iTest;
|
* var iTest;
|
||||||
* iTest = oSort['string-asc']('data11', 'data12');
|
* iTest = oSort['string-asc']('data11', 'data12');
|
||||||
* if (iTest !== 0)
|
* if (iTest !== 0)
|
||||||
* return iTest;
|
* return iTest;
|
||||||
* iTest = oSort['numeric-desc']('data21', 'data22');
|
* iTest = oSort['numeric-desc']('data21', 'data22');
|
||||||
* if (iTest !== 0)
|
* if (iTest !== 0)
|
||||||
* return iTest;
|
* return iTest;
|
||||||
* return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
|
* return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
|
||||||
* }
|
* }
|
||||||
* Basically we have a test for each sorting column, if the data in that column is equal,
|
* Basically we have a test for each sorting column, if the data in that column is equal,
|
||||||
* test the next column. If all columns match, then we use a numeric sort on the row
|
* test the next column. If all columns match, then we use a numeric sort on the row
|
||||||
@ -4385,7 +4385,7 @@
|
|||||||
var sSpanClass;
|
var sSpanClass;
|
||||||
if ( iFound == -1 )
|
if ( iFound == -1 )
|
||||||
{
|
{
|
||||||
sSpanClass = oSettings.aoColumns[i].sSortingClassJUI;
|
sSpanClass = oSettings.aoColumns[i].sSortingClassJUI;
|
||||||
}
|
}
|
||||||
else if ( aaSort[iFound][1] == "asc" )
|
else if ( aaSort[iFound][1] == "asc" )
|
||||||
{
|
{
|
||||||
@ -7953,7 +7953,7 @@
|
|||||||
* $('#example').dataTable( {
|
* $('#example').dataTable( {
|
||||||
* "ajax": function (data, callback, settings) {
|
* "ajax": function (data, callback, settings) {
|
||||||
* callback(
|
* callback(
|
||||||
* JSON.parse( localStorage.getItem('dataTablesData') )
|
* JSON.parse( localStorage.getItem('dataTablesData') )
|
||||||
* );
|
* );
|
||||||
* }
|
* }
|
||||||
* } );
|
* } );
|
||||||
@ -9437,7 +9437,7 @@
|
|||||||
* with a custom select box if required.
|
* with a custom select box if required.
|
||||||
* @type string
|
* @type string
|
||||||
* @default Show _MENU_ entries
|
* @default Show _MENU_ entries
|
||||||
*
|
*
|
||||||
* @dtopt Language
|
* @dtopt Language
|
||||||
* @name DataTable.defaults.language.lengthMenu
|
* @name DataTable.defaults.language.lengthMenu
|
||||||
*
|
*
|
||||||
|
@ -462,7 +462,7 @@ function _fnDraw( oSettings )
|
|||||||
* up. When not infinite scroll, always do it.
|
* up. When not infinite scroll, always do it.
|
||||||
*/
|
*/
|
||||||
if ( !oSettings.oScroll.bInfinite || !oSettings._bInitComplete ||
|
if ( !oSettings.oScroll.bInfinite || !oSettings._bInitComplete ||
|
||||||
oSettings.bSorted || oSettings.bFiltered )
|
oSettings.bSorted || oSettings.bFiltered )
|
||||||
{
|
{
|
||||||
while( (n = oSettings.nTBody.firstChild) )
|
while( (n = oSettings.nTBody.firstChild) )
|
||||||
{
|
{
|
||||||
|
@ -231,7 +231,7 @@ function _fnFilter( oSettings, sInput, iForce, bRegex, bSmart, bCaseInsensitive
|
|||||||
/*
|
/*
|
||||||
* We are starting a new search or the new search string is smaller
|
* We are starting a new search or the new search string is smaller
|
||||||
* then the old one (i.e. delete). Search from the master array
|
* then the old one (i.e. delete). Search from the master array
|
||||||
*/
|
*/
|
||||||
if ( oSettings.aiDisplay.length == oSettings.aiDisplayMaster.length ||
|
if ( oSettings.aiDisplay.length == oSettings.aiDisplayMaster.length ||
|
||||||
oPrevSearch.sSearch.length > sInput.length || iForce == 1 ||
|
oPrevSearch.sSearch.length > sInput.length || iForce == 1 ||
|
||||||
sInput.indexOf(oPrevSearch.sSearch) !== 0 )
|
sInput.indexOf(oPrevSearch.sSearch) !== 0 )
|
||||||
@ -253,24 +253,24 @@ function _fnFilter( oSettings, sInput, iForce, bRegex, bSmart, bCaseInsensitive
|
|||||||
oSettings.aiDisplay.push( oSettings.aiDisplayMaster[i] );
|
oSettings.aiDisplay.push( oSettings.aiDisplayMaster[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Using old search array - refine it - do it this way for speed
|
/* Using old search array - refine it - do it this way for speed
|
||||||
* Don't have to search the whole master array again
|
* Don't have to search the whole master array again
|
||||||
*/
|
*/
|
||||||
var iIndexCorrector = 0;
|
var iIndexCorrector = 0;
|
||||||
|
|
||||||
/* Search the current results */
|
/* Search the current results */
|
||||||
for ( i=0 ; i<oSettings.asDataSearch.length ; i++ )
|
for ( i=0 ; i<oSettings.asDataSearch.length ; i++ )
|
||||||
{
|
{
|
||||||
if ( ! rpSearch.test(oSettings.asDataSearch[i]) )
|
if ( ! rpSearch.test(oSettings.asDataSearch[i]) )
|
||||||
{
|
{
|
||||||
oSettings.aiDisplay.splice( i-iIndexCorrector, 1 );
|
oSettings.aiDisplay.splice( i-iIndexCorrector, 1 );
|
||||||
iIndexCorrector++;
|
iIndexCorrector++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,8 +290,8 @@ function _fnBuildSearchArray ( oSettings, iMaster )
|
|||||||
|
|
||||||
var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
|
var aiFilterColumns = _fnGetColumns( oSettings, 'bSearchable' );
|
||||||
var aiIndex = (iMaster===1) ?
|
var aiIndex = (iMaster===1) ?
|
||||||
oSettings.aiDisplayMaster :
|
oSettings.aiDisplayMaster :
|
||||||
oSettings.aiDisplay;
|
oSettings.aiDisplay;
|
||||||
|
|
||||||
for ( var i=0, iLen=aiIndex.length ; i<iLen ; i++ )
|
for ( var i=0, iLen=aiIndex.length ; i<iLen ; i++ )
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ function _fnSort ( oSettings, bApplyClasses )
|
|||||||
i, iLen, j, jLen, k, kLen,
|
i, iLen, j, jLen, k, kLen,
|
||||||
sDataType, nTh,
|
sDataType, nTh,
|
||||||
aSort = [],
|
aSort = [],
|
||||||
aiOrig = [],
|
aiOrig = [],
|
||||||
oExtSort = DataTable.ext.oSort,
|
oExtSort = DataTable.ext.oSort,
|
||||||
aoData = oSettings.aoData,
|
aoData = oSettings.aoData,
|
||||||
aoColumns = oSettings.aoColumns,
|
aoColumns = oSettings.aoColumns,
|
||||||
@ -113,14 +113,14 @@ function _fnSort ( oSettings, bApplyClasses )
|
|||||||
* and sorting function (from oSort) in a certain direction. It's reasonably complex to
|
* and sorting function (from oSort) in a certain direction. It's reasonably complex to
|
||||||
* follow on it's own, but this is what we want (example two column sorting):
|
* follow on it's own, but this is what we want (example two column sorting):
|
||||||
* fnLocalSorting = function(a,b){
|
* fnLocalSorting = function(a,b){
|
||||||
* var iTest;
|
* var iTest;
|
||||||
* iTest = oSort['string-asc']('data11', 'data12');
|
* iTest = oSort['string-asc']('data11', 'data12');
|
||||||
* if (iTest !== 0)
|
* if (iTest !== 0)
|
||||||
* return iTest;
|
* return iTest;
|
||||||
* iTest = oSort['numeric-desc']('data21', 'data22');
|
* iTest = oSort['numeric-desc']('data21', 'data22');
|
||||||
* if (iTest !== 0)
|
* if (iTest !== 0)
|
||||||
* return iTest;
|
* return iTest;
|
||||||
* return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
|
* return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
|
||||||
* }
|
* }
|
||||||
* Basically we have a test for each sorting column, if the data in that column is equal,
|
* Basically we have a test for each sorting column, if the data in that column is equal,
|
||||||
* test the next column. If all columns match, then we use a numeric sort on the row
|
* test the next column. If all columns match, then we use a numeric sort on the row
|
||||||
@ -426,7 +426,7 @@ function _fnSortingClasses( oSettings )
|
|||||||
var sSpanClass;
|
var sSpanClass;
|
||||||
if ( iFound == -1 )
|
if ( iFound == -1 )
|
||||||
{
|
{
|
||||||
sSpanClass = oSettings.aoColumns[i].sSortingClassJUI;
|
sSpanClass = oSettings.aoColumns[i].sSortingClassJUI;
|
||||||
}
|
}
|
||||||
else if ( aaSort[iFound][1] == "asc" )
|
else if ( aaSort[iFound][1] == "asc" )
|
||||||
{
|
{
|
||||||
|
@ -283,7 +283,7 @@ DataTable.defaults = {
|
|||||||
* $('#example').dataTable( {
|
* $('#example').dataTable( {
|
||||||
* "ajax": function (data, callback, settings) {
|
* "ajax": function (data, callback, settings) {
|
||||||
* callback(
|
* callback(
|
||||||
* JSON.parse( localStorage.getItem('dataTablesData') )
|
* JSON.parse( localStorage.getItem('dataTablesData') )
|
||||||
* );
|
* );
|
||||||
* }
|
* }
|
||||||
* } );
|
* } );
|
||||||
@ -1767,7 +1767,7 @@ DataTable.defaults = {
|
|||||||
* with a custom select box if required.
|
* with a custom select box if required.
|
||||||
* @type string
|
* @type string
|
||||||
* @default Show _MENU_ entries
|
* @default Show _MENU_ entries
|
||||||
*
|
*
|
||||||
* @dtopt Language
|
* @dtopt Language
|
||||||
* @name DataTable.defaults.language.lengthMenu
|
* @name DataTable.defaults.language.lengthMenu
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user