From: Brad Jorsch Date: Mon, 13 Aug 2012 14:12:57 +0000 (-0400) Subject: (bug 39296) Fix broken table sorting X-Git-Tag: 1.31.0-rc.0~22756^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=20d098cfb34d2ce4bc98a0f4dfb7f7184cd58733;p=lhc%2Fweb%2Fwiklou.git (bug 39296) Fix broken table sorting Javascript's Array.sort wants -1, 0, or 1. Not false, true, or 0. Change-Id: I2cb73668793092b53be0c1c6f7ffc647a88bf30a --- diff --git a/resources/jquery/jquery.tablesorter.js b/resources/jquery/jquery.tablesorter.js index f28f401e16..21dc3e1520 100644 --- a/resources/jquery/jquery.tablesorter.js +++ b/resources/jquery/jquery.tablesorter.js @@ -330,11 +330,11 @@ } function sortText( a, b ) { - return ( (a < b) ? false : ((a > b) ? true : 0) ); + return ( (a < b) ? -1 : ((a > b) ? 1 : 0) ); } function sortTextDesc( a, b ) { - return ( (b < a) ? false : ((b > a) ? true : 0) ); + return ( (b < a) ? -1 : ((b > a) ? 1 : 0) ); } function multisort( table, sortList, cache ) {