From: Aryeh Gregor Date: Mon, 1 Sep 2008 19:15:04 +0000 (+0000) Subject: (bug 15399) Disable odd/even classes for sortable tables X-Git-Tag: 1.31.0-rc.0~45530 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/?a=commitdiff_plain;h=b23c8cf10f770ee0d75df400dd2740a4a430538a;p=lhc%2Fweb%2Fwiklou.git (bug 15399) Disable odd/even classes for sortable tables These might or might not be useful, but if they are useful they should be added in PHP, not JavaScript. There have been reports of significant slowness for large tables due to the row numbering. This also fixes a bug where setting ts_alternate_row_colors = false would only work until the user tried sorting the table. Patch by Mike Horvath. --- diff --git a/CREDITS b/CREDITS index 0d9130ccfa..8222e5ebda 100644 --- a/CREDITS +++ b/CREDITS @@ -43,6 +43,7 @@ following names for their contribution to the product. * Jeremy Baron * Louperivois * Max Semenik +* Mike Horvath * Mormegil * RememberTheDot * Soxred93 diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 04515da896..a6f5249f92 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -173,6 +173,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN Use a separate database connection for the objectcache table to avoid long-lasting locks on that table. * Respect file restrictions in the file history list +* (bug 15399) Odd/even classes on sortable tables' rows could be slow for large + tables, and have been disabled by default. === API changes in 1.14 === diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 59f15cef64..a762ae56e9 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -518,7 +518,7 @@ var ts_image_up = "sort_up.gif"; var ts_image_down = "sort_down.gif"; var ts_image_none = "sort_none.gif"; var ts_europeandate = wgContentLanguage != "en"; // The non-American-inclined can change to "true" -var ts_alternate_row_colors = true; +var ts_alternate_row_colors = false; var SORT_COLUMN_INDEX; function sortables_init() { @@ -661,7 +661,9 @@ function ts_resortTable(lnk) { } span.innerHTML = arrowHTML; - ts_alternate(table); + if (ts_alternate_row_colors) { + ts_alternate(table); + } } function ts_dateToSortKey(date) {