diff --git a/examples/basic_init/dom.html b/examples/basic_init/dom.html index 2a3fc400..807231ce 100644 --- a/examples/basic_init/dom.html +++ b/examples/basic_init/dom.html @@ -14,7 +14,7 @@ @@ -477,7 +477,7 @@

Initialisation code

$(document).ready(function() {
 	$('#example').dataTable( {
-		"sDom": '<"top"i>rt<"bottom"flp<"clear">'
+		"sDom": '<"top"i>rt<"bottom"flp><"clear">'
 	} );
 } );
diff --git a/media/css/demo_table_jui.css b/media/css/demo_table_jui.css index 1f386cc7..28d28621 100644 --- a/media/css/demo_table_jui.css +++ b/media/css/demo_table_jui.css @@ -71,6 +71,25 @@ table.display thead th { } +/* + * Sort arrow icon positioning + */ +table.display thead th div.DataTables_sort_wrapper { + position: relative; + padding-right: 20px; + padding-right: 20px; +} + +table.display thead th div.DataTables_sort_wrapper span { + position: absolute; + top: 50%; + margin-top: -8px; + right: 0; +} + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Everything below this line is the same as demo_table.css. This file is diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 5ed05817..39e26891 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -185,6 +185,7 @@ "sSortJUI": "", "sSortJUIAscAllowed": "", "sSortJUIDescAllowed": "", + "sSortJUIWrapper": "", /* Scrolling */ "sScrollWrapper": "dataTables_scroll", @@ -250,6 +251,7 @@ "sSortJUI": "css_right ui-icon ui-icon-carat-2-n-s", "sSortJUIAscAllowed": "css_right ui-icon ui-icon-carat-1-n", "sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s", + "sSortJUIWrapper": "DataTables_sort_wrapper", /* Scrolling */ "sScrollWrapper": "dataTables_scroll", @@ -2702,7 +2704,7 @@ */ function _fnDrawHead( oSettings ) { - var i, nTh, iLen; + var i, nTh, iLen, j, jLen; var iThs = oSettings.nTHead.getElementsByTagName('th').length; var iCorrector = 0; @@ -2768,8 +2770,15 @@ { for ( i=0, iLen=oSettings.aoColumns.length ; i 1 ) { + test = false; + } + } ); + return test; + } + ); + + oTest.fnTest( + "One div for each header element", + null, + function () { + return $('#example thead th div').length == 5; + } + ); + + oTest.fnTest( + "One span for each header element, nested as child of div", + null, + function () { + return $('#example thead th div>span').length == 5; + } + ); + + oTest.fnComplete(); +} ); \ No newline at end of file