From: Derk-Jan Hartman Date: Thu, 18 Jul 2013 19:43:15 +0000 (+0200) Subject: Move unsortable class into tablesorter config X-Git-Tag: 1.31.0-rc.0~19094^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=691478a832f05851081275d491bf86573d5d1cef;p=lhc%2Fweb%2Fwiklou.git Move unsortable class into tablesorter config Change-Id: I7fc1e9fe9e63128b3c6bac0ec067f1631e53cde2 --- diff --git a/resources/jquery/jquery.tablesorter.js b/resources/jquery/jquery.tablesorter.js index 863d8ec72e..acf21d602b 100644 --- a/resources/jquery/jquery.tablesorter.js +++ b/resources/jquery/jquery.tablesorter.js @@ -338,7 +338,7 @@ this.order = 0; this.count = 0; - if ( $( this ).is( '.unsortable' ) ) { + if ( $( this ).hasClass( table.config.unsortableClass ) ) { this.sortDisabled = true; } @@ -656,6 +656,7 @@ sortInitialOrder: 'asc', sortMultiSortKey: 'shiftKey', sortLocaleCompare: false, + unsortableClass: 'unsortable', parsers: {}, widgets: [], headers: {}, @@ -746,7 +747,7 @@ // Apply event handling to headers // this is too big, perhaps break it out? - $headers.filter( ':not(.unsortable)' ).on( 'keypress click', function ( e ) { + $headers.not( '.' + table.config.unsortableClass ).on( 'keypress click', function ( e ) { if ( e.type === 'click' && e.target.nodeName.toLowerCase() === 'a' ) { // The user clicked on a link inside a table header. // Do nothing and let the default link click action continue.