From 691478a832f05851081275d491bf86573d5d1cef Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Thu, 18 Jul 2013 21:43:15 +0200 Subject: [PATCH] Move unsortable class into tablesorter config Change-Id: I7fc1e9fe9e63128b3c6bac0ec067f1631e53cde2 --- resources/jquery/jquery.tablesorter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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. -- 2.20.1