1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-28 01:54:15 +01:00

Merge pull request #46 from Petah/master

Allow custom JUI header and footer classes
This commit is contained in:
Allan Jardine 2012-04-29 02:13:33 -07:00
commit fee3ba754f
2 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,4 @@
/**
* Create a new TR element (and it's TD children) for a row
* @param {object} oSettings dataTables settings object
@ -573,11 +572,11 @@ function _fnAddOptionsHtml ( oSettings )
/* Replace jQuery UI constants */
if ( sAttr == "H" )
{
sAttr = "fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";
sAttr = oSettings.oClasses.sJUIHeader;
}
else if ( sAttr == "F" )
{
sAttr = "fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";
sAttr = oSettings.oClasses.sJUIFooter;
}
/* The attribute can be in the format of "#id.class", "#id" or "class" This logic

View File

@ -1,4 +1,3 @@
$.extend( DataTable.ext.oStdClasses, {
"sTable": "dataTable",
@ -59,7 +58,9 @@ $.extend( DataTable.ext.oStdClasses, {
"sScrollFootInner": "dataTables_scrollFootInner",
/* Misc */
"sFooterTH": ""
"sFooterTH": "",
"sJUIHeader": "",
"sJUIFooter": ""
} );
@ -103,6 +104,8 @@ $.extend( DataTable.ext.oJUIClasses, DataTable.ext.oStdClasses, {
"sScrollFoot": "dataTables_scrollFoot ui-state-default",
/* Misc */
"sFooterTH": "ui-state-default"
"sFooterTH": "ui-state-default",
"sJUIHeader": "fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",
"sJUIFooter": "fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"
} );