mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-10-08 13:44:18 +00:00
Core: add cssNoSort
option
This commit is contained in:
parent
764426d2c4
commit
39f50d90c9
@ -832,6 +832,14 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr id="cssnosort">
|
||||
<td><span class="permalink">cssNoSort</span></td>
|
||||
<td>String</td>
|
||||
<td>"tablesorter-noSort"</td>
|
||||
<td>Class name added to element inside header. Clicking on that element won't cause a sort. (<span class="version">v2.19.2</span>).</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr id="cssignorerow">
|
||||
<td><a href="#" class="permalink">cssIgnoreRow</a></td>
|
||||
<td>String</td>
|
||||
|
@ -105,6 +105,7 @@
|
||||
cssIconDesc : '', // class name added to the icon when the column has a descending sort
|
||||
cssInfoBlock : 'tablesorter-infoOnly', // don't sort tbody with this class name (only one class name allowed here!)
|
||||
cssAllowClicks : 'tablesorter-allowClicks', // class name added to table header which allows clicks to bubble up
|
||||
cssNoSort : 'tablesorter-noSort', // class name added to element inside header; clicking on it won't cause a sort
|
||||
cssIgnoreRow : 'tablesorter-ignoreRow', // header row to ignore; cells within this row will not be added to c.$headers
|
||||
|
||||
// *** selectors
|
||||
@ -1344,10 +1345,12 @@
|
||||
// set timer on mousedown
|
||||
if (type === 'mousedown') {
|
||||
downTime = new Date().getTime();
|
||||
cell = $.fn.closest ? $(e.target).closest('td,th') : $(e.target).parents('td,th').filter(':first');
|
||||
return /(input|select|button|textarea)/i.test(e.target.tagName) ||
|
||||
// allow clicks to contents of selected cells
|
||||
cell.hasClass(c.cssAllowClicks) ? '' : !c.cancelSelection;
|
||||
return;
|
||||
}
|
||||
cell = $.fn.closest ? $(e.target).closest('td,th') : $(e.target).parents('td,th').filter(':first');
|
||||
// allow clicks to contents of selected cells
|
||||
if ( /(input|select|button|textarea)/i.test(e.target.tagName) || ( cell.hasClass(c.cssAllowClicks) ) || $(e.target).hasClass(c.cssNoSort) ) {
|
||||
return !c.cancelSelection;
|
||||
}
|
||||
if (c.delayInit && isEmptyObject(c.cache)) { buildCache(table); }
|
||||
// jQuery v1.2.6 doesn't have closest()
|
||||
|
Loading…
Reference in New Issue
Block a user