From: vlakoff Date: Sat, 5 May 2012 13:55:50 +0000 (+0200) Subject: fix 2 missing "local var" JavaScript statements X-Git-Tag: 1.31.0-rc.0~23704^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=aca77ecdcba315b7c5966db641d4bf6d1a9cb1de;p=lhc%2Fweb%2Fwiklou.git fix 2 missing "local var" JavaScript statements Change-Id: I0e8a5824be635e526c385f3168ffc6269928a05c --- diff --git a/resources/jquery/jquery.suggestions.js b/resources/jquery/jquery.suggestions.js index 55c30010e0..466c551c98 100644 --- a/resources/jquery/jquery.suggestions.js +++ b/resources/jquery/jquery.suggestions.js @@ -103,7 +103,7 @@ $.suggestions = { // Wait for the browser to update the value setTimeout( function() { // Render special - $special = context.data.$container.find( '.suggestions-special' ); + var $special = context.data.$container.find( '.suggestions-special' ); context.config.special.render.call( $special, context.data.$textbox.val() ); }, 1 ); } @@ -311,7 +311,7 @@ $.suggestions = { case 13: context.data.$container.hide(); preventDefault = wasVisible; - selected = context.data.$container.find( '.suggestions-result-current' ); + var selected = context.data.$container.find( '.suggestions-result-current' ); if ( selected.length === 0 || context.data.selectedWithMouse ) { // if nothing is selected OR if something was selected with the mouse, // cancel any current requests and submit the form