Kipcool has submitted this change and it was merged.
Change subject: Do not start more tablesorter than necessary
......................................................................
Do not start more tablesorter than necessary
Change-Id: I92752907c07ef0c4022d9841862da3b3421686c2
---
M OmegaWiki/resources/omegawiki-ajax.js
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
Kipcool: Verified; Looks good to me, approved
diff --git a/OmegaWiki/resources/omegawiki-ajax.js
b/OmegaWiki/resources/omegawiki-ajax.js
index d011d35..f01705e 100644
--- a/OmegaWiki/resources/omegawiki-ajax.js
+++ b/OmegaWiki/resources/omegawiki-ajax.js
@@ -59,12 +59,13 @@
'ä':'ae', 'ö' : 'oe', 'ß': 'ss', 'ü':'ue' // German
characters
});
- // start the tablesorter jquery plugin
- $("table.wiki-data-table").tablesorter();
+ // start the tablesorter jquery plugin, only for tables having
a language (or exp) column
+ tablesToSort =
$("th.language,th.exp").parents("table.wiki-data-table");
-
$("table.wiki-data-table").find("th.headerSort.language").click();
+ $(tablesToSort).tablesorter();
+ $(tablesToSort).find("th.headerSort.language").click();
// for syntrans table, the headerSort is not on language but on
expression
- $("table.wiki-data-table").find("th.headerSort.exp").click();
+ $(tablesToSort).find("th.headerSort.exp").click();
// now disable sorting for users
$(".jquery-tablesorter").find("th").off("click");
--
To view, visit https://gerrit.wikimedia.org/r/49484
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I92752907c07ef0c4022d9841862da3b3421686c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool <[email protected]>
Gerrit-Reviewer: Kipcool <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits