mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-07 05:54:15 +01:00
Merge branch 'master' of github.com:DataTables/DataTables
This commit is contained in:
commit
076744a84c
@ -22,8 +22,8 @@
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
$("tfoot input").keyup( function () {
|
$("tfoot input").keyup( function () {
|
||||||
/* Filter on the column (the index) of this element */
|
/* Filter on the column based on the index of this element's parent <th> */
|
||||||
oTable.fnFilter( this.value, $("tfoot input").index(this) );
|
oTable.fnFilter( this.value, $("tfoot th").index($(this).parent()) );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
8
media/js/jquery.dataTables.js
vendored
8
media/js/jquery.dataTables.js
vendored
@ -296,23 +296,27 @@
|
|||||||
|
|
||||||
/* Check that the class assignment is correct for sorting */
|
/* Check that the class assignment is correct for sorting */
|
||||||
if ( !oCol.bSortable ||
|
if ( !oCol.bSortable ||
|
||||||
($.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1) )
|
($.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1) )
|
||||||
{
|
{
|
||||||
|
// either sorting is disabled for this column or neither 'asc' nor 'desc' is in the array
|
||||||
oCol.sSortingClass = oSettings.oClasses.sSortableNone;
|
oCol.sSortingClass = oSettings.oClasses.sSortableNone;
|
||||||
oCol.sSortingClassJUI = "";
|
oCol.sSortingClassJUI = "";
|
||||||
}
|
}
|
||||||
else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1 )
|
else if ( $.inArray('asc', oCol.asSorting) != -1 && $.inArray('desc', oCol.asSorting) != -1 )
|
||||||
{
|
{
|
||||||
|
// both, 'asc' and 'desc' are in the array, so it can be sorted both directions
|
||||||
oCol.sSortingClass = oSettings.oClasses.sSortable;
|
oCol.sSortingClass = oSettings.oClasses.sSortable;
|
||||||
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUI;
|
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUI;
|
||||||
}
|
}
|
||||||
else if ( $.inArray('asc', oCol.asSorting) != -1 && $.inArray('desc', oCol.asSorting) == -1 )
|
else if ( $.inArray('asc', oCol.asSorting) != -1 && $.inArray('desc', oCol.asSorting) == -1 )
|
||||||
{
|
{
|
||||||
|
// 'asc' is in the array, while 'desc' is not, so the column can only be sorted ascending
|
||||||
oCol.sSortingClass = oSettings.oClasses.sSortableAsc;
|
oCol.sSortingClass = oSettings.oClasses.sSortableAsc;
|
||||||
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIAscAllowed;
|
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIAscAllowed;
|
||||||
}
|
}
|
||||||
else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) != -1 )
|
else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) != -1 )
|
||||||
{
|
{
|
||||||
|
// 'asc' is not in the array, while 'desc' is, so the column can only be sorted descending
|
||||||
oCol.sSortingClass = oSettings.oClasses.sSortableDesc;
|
oCol.sSortingClass = oSettings.oClasses.sSortableDesc;
|
||||||
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIDescAllowed;
|
oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIDescAllowed;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a column to the list used for the table with default values
|
* Add a column to the list used for the table with default values
|
||||||
* @param {object} oSettings dataTables settings object
|
* @param {object} oSettings dataTables settings object
|
||||||
@ -69,7 +68,7 @@ function _fnColumnOptions( oSettings, iCol, oOptions )
|
|||||||
_fnCamelToHungarian( DataTable.defaults.column, oOptions );
|
_fnCamelToHungarian( DataTable.defaults.column, oOptions );
|
||||||
|
|
||||||
/* Backwards compatibility for mDataProp */
|
/* Backwards compatibility for mDataProp */
|
||||||
if ( oOptions.mDataProp && !oOptions.mData )
|
if ( oOptions.mDataProp !== undefined && !oOptions.mData )
|
||||||
{
|
{
|
||||||
oOptions.mData = oOptions.mDataProp;
|
oOptions.mData = oOptions.mDataProp;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user