From: Derk-Jan Hartman Date: Wed, 22 Jun 2011 20:40:00 +0000 (+0000) Subject: Fix global var leaks in jquery.tablersorter.js X-Git-Tag: 1.31.0-rc.0~29357 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=cc2e49d86273ee7e95564e9d7716613c58623cd4;p=lhc%2Fweb%2Fwiklou.git Fix global var leaks in jquery.tablersorter.js --- diff --git a/resources/jquery/jquery.tablesorter.js b/resources/jquery/jquery.tablesorter.js index 500447ba17..4dc6cfbdc7 100644 --- a/resources/jquery/jquery.tablesorter.js +++ b/resources/jquery/jquery.tablesorter.js @@ -101,7 +101,7 @@ l = cells.length; for ( var i = 0; i < l; i++ ) { - p = false; + var p = false; sortType = $headers.eq(i).data('sort-type'); if ( typeof sortType != 'undefined' ) { p = getParserById( sortType ); @@ -264,7 +264,7 @@ // } //var header_index = computeTableHeaderCellIndexes( table ); var realCellIndex = 0; - $tableHeaders = $( "thead:eq(0) tr", table ); + var $tableHeaders = $( "thead:eq(0) tr", table ); if ( $tableHeaders.length > 1 ) { $tableHeaders.each(function() { if (this.cells.length > maxSeen) { @@ -795,7 +795,7 @@ format: function ( s, table ) { s = $.trim( s.toLowerCase() ); - for ( i = 1, j = 0; i < 13 && j < 2; i++ ) { + for ( var i = 1, j = 0; i < 13 && j < 2; i++ ) { s = s.replace( ts.monthNames[j][i], i ); if ( i == 12 ) { j++; @@ -859,4 +859,4 @@ type: "numeric" } ); -} )( jQuery ); \ No newline at end of file +} )( jQuery );