From: TheDJ Date: Wed, 14 Aug 2013 18:57:35 +0000 (+0000) Subject: Merge "jquery.tablesorter: buildCollationTable() on first sort, not on load" X-Git-Tag: 1.31.0-rc.0~18975 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=627234a926ac89cad471c7076010c03fbd977a3c;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "jquery.tablesorter: buildCollationTable() on first sort, not on load" --- 627234a926ac89cad471c7076010c03fbd977a3c diff --combined resources/jquery/jquery.tablesorter.js index cac056e1d0,aa95ec003e..b71ef83739 --- a/resources/jquery/jquery.tablesorter.js +++ b/resources/jquery/jquery.tablesorter.js @@@ -347,7 -347,7 +347,7 @@@ .addClass( table.config.cssHeader ) .prop( 'tabIndex', 0 ) .attr( { - role: 'button', + role: 'columnheader button', title: msg[1] } ); } @@@ -717,10 -717,9 +717,9 @@@ // Build headers $headers = buildHeaders( table, sortMsg ); - // Grab and process locale settings + // Grab and process locale settings. buildTransformTable(); buildDateTable(); - buildCollationTable(); // Precaching regexps can bring 10 fold // performance improvements in some browsers. @@@ -729,6 -728,12 +728,12 @@@ function setupForFirstSort() { firstTime = false; + // Defer buildCollationTable to first sort. As user and site scripts + // may customize tableSorterCollation but load after $.ready(), other + // scripts may call .tablesorter() before they have done the + // tableSorterCollation customizations. + buildCollationTable(); + // Legacy fix of .sortbottoms // Wrap them inside inside a tfoot (because that's what they actually want to be) & // and put the at the end of the