Merge "Use one call to .attr instead of two and linebreak consistency"
[lhc/web/wiklou.git] / resources / jquery / jquery.tablesorter.js
index 190ad1a..115a49a 100644 (file)
                        this.order = 0;
                        this.count = 0;
 
-                       if ( $( this ).is( '.unsortable' ) ) {
+                       if ( $( this ).hasClass( table.config.unsortableClass ) ) {
                                this.sortDisabled = true;
                        }
 
                                sortInitialOrder: 'asc',
                                sortMultiSortKey: 'shiftKey',
                                sortLocaleCompare: false,
+                               unsortableClass: 'unsortable',
                                parsers: {},
                                widgets: [],
                                headers: {},
 
                                        // 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.