TheDJ has uploaded a new change for review.
https://gerrit.wikimedia.org/r/74500
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, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/00/74500/1
diff --git a/resources/jquery/jquery.tablesorter.js
b/resources/jquery/jquery.tablesorter.js
index b09de54..efd8556 100644
--- a/resources/jquery/jquery.tablesorter.js
+++ b/resources/jquery/jquery.tablesorter.js
@@ -207,7 +207,7 @@
// if this row has a fixed position in the table, then
we don't want to consider it
// for sorting and we just remember its original
position
- if ( $row.hasClass( 'unsortable' ) ) {
+ if ( $row.hasClass( table.config.unsortableClass ) ) {
cache.unsortable.push( [i, $row.get(0)] );
continue;
}
@@ -370,7 +370,7 @@
this.order = 0;
this.count = 0;
- if ( $( this ).is( '.unsortable' ) ) {
+ if ( $( this ).is( '.' + table.config.unsortableClass )
) {
this.sortDisabled = true;
}
@@ -685,6 +685,7 @@
sortInitialOrder: 'asc',
sortMultiSortKey: 'shiftKey',
sortLocaleCompare: false,
+ unsortableClass: 'unsortable',
parsers: {},
widgets: [],
headers: {},
@@ -775,7 +776,7 @@
// Apply event handling to headers
// this is too big, perhaps break it
out?
- $headers.filter( ':not(.unsortable)'
).click( function ( e ) {
+ $headers.filter( ':not(
table.config.unsortableClass )' ).click( function ( e ) {
if (
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: newchange
Gerrit-Change-Id: I7fc1e9fe9e63128b3c6bac0ec067f1631e53cde2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits