jenkins-bot has submitted this change and it was merged.

Change subject: Move unsortable class into tablesorter config
......................................................................


Move unsortable class into tablesorter config

Change-Id: I7fc1e9fe9e63128b3c6bac0ec067f1631e53cde2
---
M resources/jquery/jquery.tablesorter.js
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Matmarex: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/jquery/jquery.tablesorter.js 
b/resources/jquery/jquery.tablesorter.js
index 863d8ec..acf21d6 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.

-- 
To view, visit https://gerrit.wikimedia.org/r/74500
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fc1e9fe9e63128b3c6bac0ec067f1631e53cde2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Matmarex <[email protected]>
Gerrit-Reviewer: Rillke <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to