From: jdlrobson Date: Mon, 7 May 2018 19:45:13 +0000 (-0700) Subject: jquery-tablesorter and sortable classes always added together X-Git-Tag: 1.34.0-rc.0~5506^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=001c5fbf0cffaa78e9c0f98668d4d60838eec20e;p=lhc%2Fweb%2Fwiklou.git jquery-tablesorter and sortable classes always added together If absent, jquery-tablesorter should add the sortable class. The sortable class should be used to avoid FOUC, but clients may need time to update their interfaces to do so. Bug: T194045 Change-Id: I76709bf30ab06ff5ee7fc18bed1f143002477529 --- diff --git a/resources/src/jquery/jquery.tablesorter.js b/resources/src/jquery/jquery.tablesorter.js index e9d5a917a0..552c0c394f 100644 --- a/resources/src/jquery/jquery.tablesorter.js +++ b/resources/src/jquery/jquery.tablesorter.js @@ -829,7 +829,11 @@ return; } } - $table.addClass( 'jquery-tablesorter' ); + // The `sortable` class is used to identify tables which will become sortable + // If not used it will create a FOUC but it should be added since the sortable class + // is responsible for certain crucial style elements. If the class is already present + // this action will be harmless. + $table.addClass( 'jquery-tablesorter sortable' ); // Merge and extend config = $.extend( {}, $.tablesorter.defaultOptions, settings );