mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-27 00:54:15 +01:00
New - init option: classes
option can be used to modify the classes
object - Previously to modify the class names that DataTables uses for its components you has to use $.fn.dataTable.ext.oStdClasses. Now you can use the `classes` initialisation option which will extend the classes object of the DataTable. - This fixes issue #180.
This commit is contained in:
parent
5cecbb5528
commit
d2755c4037
@ -172,7 +172,7 @@ if ( oInit.bJQueryUI )
|
||||
/* Use the JUI classes object for display. You could clone the oStdClasses object if
|
||||
* you want to have multiple tables with multiple independent classes
|
||||
*/
|
||||
$.extend( oSettings.oClasses, DataTable.ext.oJUIClasses );
|
||||
$.extend( oSettings.oClasses, DataTable.ext.oJUIClasses, oInit.oClasses );
|
||||
|
||||
if ( oInit.sDom === DataTable.defaults.sDom && DataTable.defaults.sDom === "lfrtip" )
|
||||
{
|
||||
@ -182,7 +182,7 @@ if ( oInit.bJQueryUI )
|
||||
}
|
||||
else
|
||||
{
|
||||
$.extend( oSettings.oClasses, DataTable.ext.oStdClasses );
|
||||
$.extend( oSettings.oClasses, DataTable.ext.oStdClasses, oInit.oClasses );
|
||||
}
|
||||
$(this).addClass( oSettings.oClasses.sTable );
|
||||
|
||||
|
@ -1483,6 +1483,17 @@ DataTable.defaults = {
|
||||
"iTabIndex": 0,
|
||||
|
||||
|
||||
/**
|
||||
* Classes that DataTables assigns to the various components and features
|
||||
* that it adds to the HTML table. This allows classes to be configured
|
||||
* during initialisation in addition to through the static
|
||||
* {@link DataTable.ext.oStdClasses} object).
|
||||
* @namespace
|
||||
* @name DataTable.defaults.classes
|
||||
*/
|
||||
"oClasses": {},
|
||||
|
||||
|
||||
/**
|
||||
* All strings that DataTables uses in the user interface that it creates
|
||||
* are defined in this object, allowing you to modified them individually or
|
||||
|
Loading…
x
Reference in New Issue
Block a user