[MediaWiki-commits] [Gerrit] jquery.tablesorter: buildCollationTable() on first sort, not... - change (mediawiki/core)

2013-08-14 Thread TheDJ (Code Review)
TheDJ has submitted this change and it was merged.

Change subject: jquery.tablesorter: buildCollationTable() on first sort, not on 
load
..


jquery.tablesorter: buildCollationTable() on first sort, not on load

Since user and site scripts are now loaded after $.ready(), other
scripts may call .tablesorter() before they have done the
tableSorterCollation customizations.

Bug: 51982
Change-Id: I269181169a5e25fbd98eb2acbd9e2e0f4586
---
M resources/jquery/jquery.tablesorter.js
1 file changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/resources/jquery/jquery.tablesorter.js 
b/resources/jquery/jquery.tablesorter.js
index 115a49a..aa95ec0 100644
--- a/resources/jquery/jquery.tablesorter.js
+++ b/resources/jquery/jquery.tablesorter.js
@@ -717,10 +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 @@
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 tfoot at the 
end of the table

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I269181169a5e25fbd98eb2acbd9e2e0f4586
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex matma@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Matmarex matma@gmail.com
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] jquery.tablesorter: buildCollationTable() on first sort, not... - change (mediawiki/core)

2013-07-24 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/75671


Change subject: jquery.tablesorter: buildCollationTable() on first sort, not on 
load
..

jquery.tablesorter: buildCollationTable() on first sort, not on load

MediaWiki:Common.js is now loaded after document-ready.

Bug: 51982
Change-Id: I269181169a5e25fbd98eb2acbd9e2e0f4586
---
M resources/jquery/jquery.tablesorter.js
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/75671/1

diff --git a/resources/jquery/jquery.tablesorter.js 
b/resources/jquery/jquery.tablesorter.js
index 863d8ec..709cabf 100644
--- a/resources/jquery/jquery.tablesorter.js
+++ b/resources/jquery/jquery.tablesorter.js
@@ -713,10 +713,11 @@
// Build headers
$headers = buildHeaders( table, sortMsg 
);
 
-   // Grab and process locale settings
+   // Grab and process locale settings.
+   // buildCollationTable() needs to be 
below because it's
+   // intended to be set in common.js, 
after document-ready.
buildTransformTable();
buildDateTable();
-   buildCollationTable();
 
// Precaching regexps can bring 10 fold
// performance improvements in some 
browsers.
@@ -725,6 +726,8 @@
function setupForFirstSort() {
firstTime = false;
 
+   buildCollationTable();
+
// Legacy fix of .sortbottoms
// Wrap them inside inside a 
tfoot (because that's what they actually want to be) 
// and put the tfoot at the 
end of the table

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I269181169a5e25fbd98eb2acbd9e2e0f4586
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex matma@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits