mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Fix: The sStripeOdd / sStripeEven options for the class objects were not being applied to the table. The fix is to set the default for asStripeClasses to be null, and then if null is found there, then the user hasn't applied a default, nor have they overridden the default, therefore we can use the classes from the class objects - 8770.
This commit is contained in:
parent
e40d1edebc
commit
3a40c3a440
12
media/js/jquery.dataTables.js
vendored
12
media/js/jquery.dataTables.js
vendored
@ -6353,6 +6353,13 @@
|
||||
/*
|
||||
* Stripes
|
||||
*/
|
||||
if ( oInit.asStripeClasses === null )
|
||||
{
|
||||
oSettings.asStripeClasses =[
|
||||
oSettings.oClasses.sStripeOdd,
|
||||
oSettings.oClasses.sStripeEven
|
||||
];
|
||||
}
|
||||
|
||||
/* Remove row stripe classes if they are already on the table row */
|
||||
var bStripeRemove = false;
|
||||
@ -7683,7 +7690,8 @@
|
||||
* array may be of any length, and DataTables will apply each class
|
||||
* sequentially, looping when required.
|
||||
* @type array
|
||||
* @default [ 'odd', 'even' ]
|
||||
* @default null <i>Will take the values determinted by the oClasses.sStripe*
|
||||
* options</i>
|
||||
* @dtopt Option
|
||||
*
|
||||
* @example
|
||||
@ -7693,7 +7701,7 @@
|
||||
* } );
|
||||
* } )
|
||||
*/
|
||||
"asStripeClasses": [ 'odd', 'even' ],
|
||||
"asStripeClasses": null,
|
||||
|
||||
|
||||
/**
|
||||
|
@ -230,6 +230,13 @@ else
|
||||
/*
|
||||
* Stripes
|
||||
*/
|
||||
if ( oInit.asStripeClasses === null )
|
||||
{
|
||||
oSettings.asStripeClasses =[
|
||||
oSettings.oClasses.sStripeOdd,
|
||||
oSettings.oClasses.sStripeEven
|
||||
];
|
||||
}
|
||||
|
||||
/* Remove row stripe classes if they are already on the table row */
|
||||
var bStripeRemove = false;
|
||||
|
@ -209,7 +209,8 @@ DataTable.defaults = {
|
||||
* array may be of any length, and DataTables will apply each class
|
||||
* sequentially, looping when required.
|
||||
* @type array
|
||||
* @default [ 'odd', 'even' ]
|
||||
* @default null <i>Will take the values determinted by the oClasses.sStripe*
|
||||
* options</i>
|
||||
* @dtopt Option
|
||||
*
|
||||
* @example
|
||||
@ -219,7 +220,7 @@ DataTable.defaults = {
|
||||
* } );
|
||||
* } )
|
||||
*/
|
||||
"asStripeClasses": [ 'odd', 'even' ],
|
||||
"asStripeClasses": null,
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user