From 878314d7db26bc8c75594d3fcb73b7c1d3abbd3f Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Sun, 13 Mar 2016 13:09:51 +0000 Subject: [PATCH] Follow-up Ia16e19985: Fix table sort arrow direction In Ia16e19985 we accidentally fixed the down arrow being 'sort_up', but by not switches the class order we changed the meaning of the up and down arrows. An up arrow should be labelled as 'up' but show when the table is in ascending order (smallest at the top). Bug: T129775 Change-Id: Ia30d4a26728dd0fe93939d746ce9bf9e90742de6 --- resources/src/jquery/jquery.tablesorter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/src/jquery/jquery.tablesorter.js b/resources/src/jquery/jquery.tablesorter.js index 2318b33a19..50bfa879d9 100644 --- a/resources/src/jquery/jquery.tablesorter.js +++ b/resources/src/jquery/jquery.tablesorter.js @@ -808,7 +808,9 @@ $.data( table, 'tablesorter', { config: config } ); // Get the CSS class names, could be done elsewhere - sortCSS = [ config.cssDesc, config.cssAsc ]; + sortCSS = [ config.cssAsc, config.cssDesc ]; + // Messages tell the the user what the *next* state will be + // so are in reverse order to the CSS classes. sortMsg = [ mw.msg( 'sort-descending' ), mw.msg( 'sort-ascending' ) ]; // Build headers -- 2.20.1