1
0
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:
Allan Jardine 2012-02-29 09:09:16 +00:00
parent e40d1edebc
commit 3a40c3a440
3 changed files with 20 additions and 4 deletions

View File

@ -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,
/**

View File

@ -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;

View File

@ -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,
/**