ui theme & pager update

This commit is contained in:
Rob Garrison 2011-07-27 01:14:20 -05:00
parent 3e1ec68cc0
commit 440f5549ad
14 changed files with 355 additions and 33 deletions

View File

@ -28,6 +28,29 @@ Included all original [document pages](http://mottie.github.com/tablesorter/docs
View the [complete listing here](changelog.markdown).
#### Version 2.0.9 (2011-07-27)
* Added a jQuery UI theme and widget example. To apply the jQuery UI theme:
* Include any jQuery UI theme on your page.
* Add the base tablesorter ui theme (located in css/ui directory)
* Add the jQuery UI theme widget code found on [this example page](docs/example-option-ui-theme.html). This demo page includes the UI theme switcher.
* Added a header index to the `onRenderHeader` function to make it easier to target specific header cells for modification. See the [render header example](docs/example-option-render-header.html) for an example.
* Pager plugin updates:
* Removed the `separator` option and added an `output` option which allows you to completely customize the output string.
* In the `output` string, include any of the following variables:
* `{page}` is replaced with the current page number.
* `{totalPages}` is replaced with the total number of pages.
* `{startRow}` is replaced with the number of the visible start row of the pager.
* `{endRow}` is replaced with the number of the visible end row of the pager.
* `{totalRows}` is replaced with the total number of rows.
* The `cssPageDisplay` option can now target any element; in previous versions, this element was an input of type text.
* Added a `pagerArrows` and `cssDisabled` options:
* When `pagerArrows` is true, the first and previous pager arrows have the css class name contained in the `cssDisabled` option applied when the first row is visible.
* The next and last pager arrows will be have the `cssDisabled` class applied when the last row is visible.
* Additionally, if the number of table rows is less than the pager size, the pager will get the `cssDisabled` class name applied.
* If false (the default setting), the pager arrows class names will not change.
* Please see the updated [pager demo](docs/example-pager.html) to see this working.
#### Version 2.0.8 (2011-07-21)
* Fixed parsers for currency and digits to work with number values separated by commas. Thanks to Josh Renaud for the information!

View File

@ -1,8 +1,30 @@
/*
* tablesorter pager plugin
* updated 7/27/2011
*/
(function($) {
$.extend({tablesorterPager: new function() {
var updatePageDisplay = function(table,c) {
var s = $(c.cssPageDisplay,c.container).val((c.page+1) + c.seperator + c.totalPages);
c.startRow = c.size * (c.page) + 1;
c.endRow = Math.min(c.totalRows, c.size * (c.page+1));
var out = $(c.cssPageDisplay, c.container),
// form the output string
s = c.output.replace(/\{(page|totalPages|startRow|endRow|totalRows)\}/gi, function(m){
return {
'{page}' : c.page + 1,
'{totalPages}' : c.totalPages,
'{startRow}' : c.startRow,
'{endRow}' : c.endRow,
'{totalRows}' : c.totalRows
}[m];
});
if (out[0].tagName === 'INPUT') {
out.val(s);
} else {
out.html(s);
}
$(table).trigger('pagerComplete', c);
},
@ -49,11 +71,29 @@
updatePageDisplay(table,c);
},
// hide arrows at extremes
pagerArrows = function(c) {
if (c.updateArrows) {
c.container.removeClass(c.cssDisabled);
$(c.cssFirst + ',' + c.cssPrev + ',' + c.cssNext + ',' + c.cssLast, c.container).removeClass(c.cssDisabled);
if (c.page === 0) {
$(c.cssFirst + ',' + c.cssPrev, c.container).addClass(c.cssDisabled);
} else if (c.page === c.totalPages - 1) {
$(c.cssNext + ',' + c.cssLast, c.container).addClass(c.cssDisabled);
}
// if the total # of pages is less than the selected number of visible rows, then hide the pager
if (c.totalRows < c.size) {
c.container.addClass(c.cssDisabled);
}
}
},
moveToPage = function(table) {
var c = table.config;
if (c.page < 0 || c.page > (c.totalPages-1)) {
c.page = 0;
}
pagerArrows(c);
renderTable(table,c.rowsCopy);
},
@ -117,7 +157,9 @@
cssLast: '.last',
cssPageDisplay: '.pagedisplay',
cssPageSize: '.pagesize',
seperator: "/",
cssDisabled: 'disabled',
output: '{page}/{totalPages}', // '{startRow} to {endRow} of {totalRows} rows',
updateArrows: false,
positionFixed: true,
appender: this.appender
};
@ -130,6 +172,7 @@
$(this).trigger("appendCache");
config.size = parseInt($(".pagesize",pager).val(), 10);
pagerArrows(config);
$(config.cssFirst,pager).click(function() {
moveToFirstPage(table);

View File

@ -1,2 +1,2 @@
/* tablesorter pager plugin */
(function(d){d.extend({tablesorterPager:new function(){var k=function(b){var a=b.config,b=d(b);if(!a.pagerPositionSet&&a.positionFixed)b.offset&&a.container.css({top:b.offset().top+b.height()+"px",position:"absolute"}),a.pagerPositionSet=!0},m=function(b,a){var c,f,h,i,e=b.config,g=a.length;c=e.page*e.size;var j=c+e.size;d(b).trigger("pagerChange",e);if(j>a.length)j=a.length;i=d(b.tBodies[0]);for(d.tablesorter.clearTableBody(b);c<j;c++){h=a[c];g=h.length;for(f=0;f<g;f++)i[0].appendChild(h[f])}k(b, i);d(b).trigger("applyWidgets");e.page>=e.totalPages&&l(b);d(e.cssPageDisplay,e.container).val(e.page+1+e.seperator+e.totalPages);d(b).trigger("pagerComplete",e)},g=function(b){var a=b.config;if(a.page<0||a.page>a.totalPages-1)a.page=0;m(b,a.rowsCopy)},l=function(b){var a=b.config;a.page=a.totalPages-1;g(b)};this.appender=function(b,a){var c=b.config;c.rowsCopy=a;c.totalRows=a.length;c.totalPages=Math.ceil(c.totalRows/c.size);m(b,a)};this.defaults={size:10,offset:0,page:0,totalRows:0,totalPages:0, container:null,cssNext:".next",cssPrev:".prev",cssFirst:".first",cssLast:".last",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",seperator:"/",positionFixed:!0,appender:this.appender};this.construct=function(b){return this.each(function(){var a=d.extend(this.config,d.tablesorterPager.defaults,b),c=this,f=a.container;d(this).trigger("appendCache");a.size=parseInt(d(".pagesize",f).val(),10);d(a.cssFirst,f).click(function(){c.config.page=0;g(c);return!1});d(a.cssNext,f).click(function(){var a= c.config;a.page++;if(a.page>=a.totalPages-1)a.page=a.totalPages-1;g(c);return!1});d(a.cssPrev,f).click(function(){var a=c.config;a.page--;if(a.page<=0)a.page=0;g(c);return!1});d(a.cssLast,f).click(function(){l(c);return!1});d(a.cssPageSize,f).change(function(){var a=parseInt(d(this).val(),10),b=c.config;b.size=a;b.totalPages=Math.ceil(b.totalRows/b.size);b.pagerPositionSet=!1;g(c);k(c);return!1})})}}});d.fn.extend({tablesorterPager:d.tablesorterPager.construct})})(jQuery);
(function(d){d.extend({tablesorterPager:new function(){var o=function(a,b){b.startRow=b.size*b.page+1;b.endRow=Math.min(b.totalRows,b.size*(b.page+1));var c=d(b.cssPageDisplay,b.container),e=b.output.replace(/\{(page|totalPages|startRow|endRow|totalRows)\}/gi,function(a){return{"{page}":b.page+1,"{totalPages}":b.totalPages,"{startRow}":b.startRow,"{endRow}":b.endRow,"{totalRows}":b.totalRows}[a]});c[0].tagName==="INPUT"?c.val(e):c.html(e);d(a).trigger("pagerComplete",b)},k=function(a){var b=a.config, a=d(a);if(!b.pagerPositionSet&&b.positionFixed)a.offset&&b.container.css({top:a.offset().top+a.height()+"px",position:"absolute"}),b.pagerPositionSet=!0},m=function(a,b){var c,e,h,i,g=a.config,f=b.length;c=g.page*g.size;var j=c+g.size;d(a).trigger("pagerChange",g);if(j>b.length)j=b.length;i=d(a.tBodies[0]);for(d.tablesorter.clearTableBody(a);c<j;c++){h=b[c];f=h.length;for(e=0;e<f;e++)i[0].appendChild(h[e])}k(a,i);d(a).trigger("applyWidgets");g.page>=g.totalPages&&l(a);o(a,g)},n=function(a){a.updateArrows&& (a.container.removeClass(a.cssDisabled),d(a.cssFirst+","+a.cssPrev+","+a.cssNext+","+a.cssLast,a.container).removeClass(a.cssDisabled),a.page===0?d(a.cssFirst+","+a.cssPrev,a.container).addClass(a.cssDisabled):a.page===a.totalPages-1&&d(a.cssNext+","+a.cssLast,a.container).addClass(a.cssDisabled),a.totalRows<a.size&&a.container.addClass(a.cssDisabled))},f=function(a){var b=a.config;if(b.page<0||b.page>b.totalPages-1)b.page=0;n(b);m(a,b.rowsCopy)},l=function(a){var b=a.config;b.page=b.totalPages-1; f(a)};this.appender=function(a,b){var c=a.config;c.rowsCopy=b;c.totalRows=b.length;c.totalPages=Math.ceil(c.totalRows/c.size);m(a,b)};this.defaults={size:10,offset:0,page:0,totalRows:0,totalPages:0,container:null,cssNext:".next",cssPrev:".prev",cssFirst:".first",cssLast:".last",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",cssDisabled:"disabled",output:"{page}/{totalPages}",updateArrows:!1,positionFixed:!0,appender:this.appender};this.construct=function(a){return this.each(function(){var b= d.extend(this.config,d.tablesorterPager.defaults,a),c=this,e=b.container;d(this).trigger("appendCache");b.size=parseInt(d(".pagesize",e).val(),10);n(b);d(b.cssFirst,e).click(function(){c.config.page=0;f(c);return!1});d(b.cssNext,e).click(function(){var a=c.config;a.page++;if(a.page>=a.totalPages-1)a.page=a.totalPages-1;f(c);return!1});d(b.cssPrev,e).click(function(){var a=c.config;a.page--;if(a.page<=0)a.page=0;f(c);return!1});d(b.cssLast,e).click(function(){l(c);return!1});d(b.cssPageSize,e).change(function(){var a= parseInt(d(this).val(),10),b=c.config;b.size=a;b.totalPages=Math.ceil(b.totalRows/b.size);b.pagerPositionSet=!1;f(c);k(c);return!1})})}}});d.fn.extend({tablesorterPager:d.tablesorterPager.construct})})(jQuery);

View File

@ -1,5 +1,28 @@
###TableSorter Change Log
#### Version 2.0.9 (2011-07-27)
* Added a jQuery UI theme and widget example. To apply the jQuery UI theme:
* Include any jQuery UI theme on your page.
* Add the base tablesorter ui theme (located in css/ui directory)
* Add the jQuery UI theme widget code found on [this example page](docs/example-option-ui-theme.html). This demo page includes the UI theme switcher.
* Added a header index to the `onRenderHeader` function to make it easier to target specific header cells for modification. See the [render header example](docs/example-option-render-header.html) for an example.
* Pager plugin updates:
* Removed the `separator` option and added an `output` option which allows you to completely customize the output string.
* In the `output` string, include any of the following variables:
* `{page}` is replaced with the current page number.
* `{totalPages}` is replaced with the total number of pages.
* `{startRow}` is replaced with the number of the visible start row of the pager.
* `{endRow}` is replaced with the number of the visible end row of the pager.
* `{totalRows}` is replaced with the total number of rows.
* The `cssPageDisplay` option can now target any element; in previous versions, this element was an input of type text.
* Added a `pagerArrows` and `cssDisabled` options:
* When `pagerArrows` is true, the first and previous pager arrows have the css class name contained in the `cssDisabled` option applied when the first row is visible.
* The next and last pager arrows will be have the `cssDisabled` class applied when the last row is visible.
* Additionally, if the number of table rows is less than the pager size, the pager will get the `cssDisabled` class name applied.
* If false (the default setting), the pager arrows class names will not change.
* Please see the updated [pager demo](docs/example-pager.html) to see this working.
#### Version 2.0.8 (2011-07-21)
* Fixed parsers for currency and digits to work with number values separated by commas. Thanks to Josh Renaud for the information!

26
css/ui/style.css Normal file
View File

@ -0,0 +1,26 @@
/* jQuery UI Theme */
table.tablesorter {
font-family: arial;
margin: 10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
border-collapse: collapse;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
padding: 4px;
vertical-align: top;
}
table.tablesorter .header .ui-theme {
display: block;
float: right;
}

View File

@ -35,9 +35,9 @@
<script id="js">$(function() {
// call the tablesorter plugin
$("table").tablesorter({
onRenderHeader: function (){
onRenderHeader: function (index){
// the TH content is wrapped with a span by default, so just add the class
$(this).find('span').addClass('roundedCorners');
$(this).find('span').addClass('roundedCorners header' + index );
}
});
});</script>

File diff suppressed because one or more lines are too long

193
docs/example-ui-theme.html Normal file
View File

@ -0,0 +1,193 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery plugin: Tablesorter 2.0 - jQuery UI Theme Widget</title>
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<!-- Demo stuff -->
<link rel="stylesheet" href="css/jq.css">
<script src="js/chili/jquery.chili-2.2.js"></script>
<script src="js/chili/recipes.js"></script>
<script src="js/docs.js"></script>
<!-- theme switcher -->
<script src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
<!-- Tablesorter: required; also include any of the jQuery UI themes -->
<link rel="stylesheet" href="../css/ui/style.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/cupertino/jquery-ui.css">
<script src="../js/jquery.tablesorter.js"></script>
<!-- Tablesorter: optional -->
<script src="../addons/pager/jquery.tablesorter.pager.js"></script>
<script id="js">$(function() {
// add ui theme widget
$.tablesorter.addWidget({
id: "uitheme",
format: function(table) {
var c = table.config,
// ["up/down arrow (cssHeaders, unsorted)", "down arrow (cssDesc, descending)", "up arrow (cssAsc, ascending)" ]
icons = c.uitheme || ["ui-icon-arrowthick-2-n-s", "ui-icon-arrowthick-1-s", "ui-icon-arrowthick-1-n"],
klass, rmv = icons.join(' ');
if (!$(c.headerList[0]).is('.ui-theme')) {
$(table).addClass('ui-widget ui-widget-content ui-corner-all');
$.each(c.headerList, function(){
$(this)
// using new "ui-theme" class in case the user adds their own ui-icon using onRenderHeader
.addClass('ui-state-default ui-corner-all ui-theme')
.append('<span class="ui-theme"/>');
});
}
$.each(c.headerList, function(i){
if (c.headers[i] && c.headers[i].sorter === false) {
// no sort arrows for disabled columns!
$(this).find('span.ui-theme').removeClass(rmv + ' ui-icon');
} else {
//
klass = ($(this).is('.' + c.cssAsc)) ? icons[1] : ($(this).is('.' + c.cssDesc)) ? icons[2] : $(this).is('.' + c.cssHeader) ? icons[0] : '';
$(this).find('span.ui-theme').removeClass(rmv).addClass(klass + ' ui-icon');
}
});
}
});
// call the tablesorter plugin and apply the ui theme widget
$("table").tablesorter({
widgets : ['uitheme']
});
});</script>
<script>
$(function() {
// Theme switcher
// ********************
$('#switcher').themeswitcher();
});
</script>
</head>
<body>
<div id="banner">
<h1>table<em>sorter</em></h1>
<h2>jQuery UI Theme Widget</h2>
<h3>Flexible client-side table sorting</h3>
<a href="index.html">Back to documentation</a>
</div>
<div id="main">
<div id="switcher"></div>
<h1>Demo</h1>
<div id="demo"><table class="tablesorter">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Age</th>
<th>Total</th>
<th>Discount</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>Peter</td>
<td>Parker</td>
<td>28</td>
<td>$9.99</td>
<td>20%</td>
<td>Jul 6, 2006 8:14 AM</td>
</tr>
<tr>
<td>John</td>
<td>Hood</td>
<td>33</td>
<td>$19.99</td>
<td>25%</td>
<td>Dec 10, 2002 5:14 AM</td>
</tr>
<tr>
<td>Clark</td>
<td>Kent</td>
<td>18</td>
<td>$15.89</td>
<td>44%</td>
<td>Jan 12, 2003 11:14 AM</td>
</tr>
<tr>
<td>Bruce</td>
<td>Almighty</td>
<td>45</td>
<td>$153.19</td>
<td>44%</td>
<td>Jan 18, 2001 9:12 AM</td>
</tr>
<tr>
<td>Bruce</td>
<td>Evans</td>
<td>22</td>
<td>$13.19</td>
<td>11%</td>
<td>Jan 18, 2007 9:12 AM</td>
</tr>
</tbody>
</table></div>
<h1>Javascript</h1>
<div id="javascript">
<pre class="js"></pre>
</div>
<h1>CSS</h1>
<div>
<pre class="css">/* jQuery UI Theme required css; as seen in css/ui/style.css file */
table.tablesorter {
font-family: arial;
margin: 10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
border-collapse: collapse;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
padding: 4px;
vertical-align: top;
}
table.tablesorter .header .ui-theme {
display: block;
float: right;
}</pre>
</div>
<h1>HTML</h1>
<div id="html">
<pre class="html"></pre>
</div>
<div class="next-up">
<hr />
Next up: <a href="example-options-headers.html">Basic: Disable header using options &rsaquo;&rsaquo;</a>
</div>
</div>
</body>
</html>

View File

@ -321,7 +321,7 @@
<div class="next-up">
<hr />
Next up: <a href="example-pager.html">Companion Plugins: file:///C:/Temp/tablesorter/docs/example-pager.html &rsaquo;&rsaquo;</a>
Next up: <a href="example-pager.html">Companion Plugins: Pager plugin &rsaquo;&rsaquo;</a>
</div>
</div>

View File

@ -123,7 +123,7 @@ table.tablesorter tbody tr.alt-row td {
<div class="next-up">
<hr />
Next up: <a href="example-options-headers.html">Basic: Disable header using options &rsaquo;&rsaquo;</a>
Next up: <a href="example-ui-theme.html">Basic: Applying a jQuery UI theme widget &rsaquo;&rsaquo;</a>
</div>
</div>

View File

@ -36,7 +36,7 @@
</div>
<p>
<strong>Author:</strong> <a class="external" href="http://lovepeacenukes.com">Christian Bach</a><br>
<strong>Version:</strong> 2.0.8 (<a href="../changelog.markdown">changelog</a>)<br>
<strong>Version:</strong> 2.0.9 (<a href="../changelog.markdown">changelog</a>)<br>
<strong>Licence:</strong>
Dual licensed under <a class="external" href="http://www.opensource.org/licenses/mit-license.php">MIT</a>
or <a class="external" href="http://www.opensource.org/licenses/gpl-license.php">GPL</a> licenses.
@ -298,6 +298,7 @@
<li><a href="example-option-sort-order.html">Direction of initial sort</a></li>
<li><a href="example-apply-widget.html">Applying widgets</a></li>
<li><a href="example-zebra.html">Applying the zebra stripe widget</a></li>
<li><a href="example-ui-theme.html">Applying the jQuery UI theme widget</a> <span class="tip"><em>New! v2.0.9</em></span></li>
<li><a href="example-options-headers.html">Disable sort using headers options</a></li>
<li><a href="example-options-headers-locked.html">Lock sort order using header options</a></li>
<li><a href="example-options-headers-order.html">Set initial sort order using header options</a></li>
@ -644,7 +645,7 @@
<td>"asc"</td>
<td>
When clicking the header for the first time, the direction it sorts. Valid arguments are <code class="hilight">"asc"</code> for Ascending or <code class="hilight">"desc"</code> for Descending.<br>
<span class="tip"><em>New!</em></span> in 2.0.8: This order can also be set by desired column using the <a href="#headers"><code class="hilight">headers</code></a> option.
<span class="tip"><em>New!</em></span> in v2.0.8: This order can also be set by desired column using the <a href="#headers"><code class="hilight">headers</code></a> option.
</td>
<td>Ex:<a href="example-option-sort-order.html">1</a> <a href="example-options-headers-order.html">2</a></td>
</tr>
@ -932,7 +933,7 @@ $(table)
<tr id="pagerChange">
<td><a href="#" class="toggle2">pagerChange</a></td>
<td>This event fires when the pager plugin begins to render the table on the currently selected page. <span class="tip"><em>New!</em></span> in version 2.0.7.
<td>This event fires when the pager plugin begins to render the table on the currently selected page. <span class="tip"><em>New!</em></span> in v2.0.7.
<div class="collapsible">
<pre class="js">$(function(){
@ -958,7 +959,7 @@ $(table)
<tr id="pagerComplete">
<td><a href="#" class="toggle2">pagerComplete</a></td>
<td>This event fires when the pager plugin has completed its render of the table on the currently selected page. <span class="tip"><em>New!</em></span> in version 2.0.7.
<td>This event fires when the pager plugin has completed its render of the table on the currently selected page. <span class="tip"><em>New!</em></span> in v2.0.7.
<div class="collapsible">
<pre class="js">$(function(){
@ -1021,6 +1022,7 @@ $(table)
<ul>
<li><a href="../css/green/green.zip">Green Skin</a> - Images and CSS styles for green themed headers</li>
<li><a href="../css/blue/blue.zip">Blue Skin</a> - Images and CSS styles for blue themed headers (as seen in the examples)</li>
<li><a href="example-ui-theme.html">jQuery UI Theme</a> - Apply any jQuery UI theme to the table using the "uitheme" widget code. <span class="tip"><em>New!</em></span> in v2.0.9!</li>
</ul>
<a name="Compatibility"></a>
@ -1054,7 +1056,7 @@ $(table)
<p>
Documentation written by <a class="external" href="http://www.ghidinelli.com">Brian Ghidinelli</a>,
based on <a class="external" href="http://malsup.com/jquery/">Mike Alsup's</a> great documention.<br>
Missing documentation and alphanumeric sort added by <a class="external" href="https://github.com/Mottie/tablesorter">Mottie</a>.
Missing documentation, alphanumeric sort and other changes added by <a class="external" href="https://github.com/Mottie/tablesorter">Mottie</a>.
</p>
<p>
<a class="external" href="http://ejohn.org">John Resig</a> for the fantastic <a class="external" href="http://jquery.com">jQuery</a>

View File

@ -23,7 +23,7 @@
<body>
<div class="demo">
<h1><a href="https://github.com/Mottie/tablesorter">TableSorter v2.0.7</a></h1>
<h1><a href="https://github.com/Mottie/tablesorter">TableSorter</a></h1>
<p>By Christian Bach; github updates by Rob G<br>
<a href="docs/index.html">Complete docs included</a> (updated with missing docs from <a href="http://wowmotty.blogspot.com/2011/06/jquery-tablesorter-missing-docs.html">this blog post</a>)
</p>

View File

@ -1,6 +1,6 @@
/*
* TableSorter 2.0 - Client-side table sorting with ease!
* Version 2.0.8
* Version 2.0.9
* @requires jQuery v1.2.3
*
* Copyright (c) 2007 Christian Bach
@ -100,7 +100,6 @@
sortList: [],
headerList: [],
dateFormat: "us",
decimal: /\.|\,/g, // not used
onRenderHeader: null,
selectorHeaders: 'thead th',
tableClass : 'tablesorter',
@ -401,7 +400,7 @@
if (typeof(lock) !== 'undefined' && lock !== false) { this.order = this.lockedOrder = formatSortingOrder(lock); }
if (!this.sortDisabled) {
$th = $(this).addClass(table.config.cssHeader);
if (table.config.onRenderHeader) { table.config.onRenderHeader.apply($th); }
if (table.config.onRenderHeader) { table.config.onRenderHeader.apply($th, [index]); }
}
// add cell to headerList
table.config.headerList[index] = this;
@ -410,7 +409,6 @@
benchmark("Built headers:", time);
log($tableHeaders);
}
console.debug($tableHeaders);
return $tableHeaders;
}

File diff suppressed because one or more lines are too long