Changeset 1857


Ignore:
Timestamp:
11/01/2010 03:38:48 AM (19 months ago)
Author:
Gongwei.Yu
Message:

[trunk]update to the old version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/w/extensions/recaptcha/ReCaptcha.php

    r1820 r1857  
    6767                global $recaptcha_public_key,$wgRequest; 
    6868                if($wgRequest->getVal('useAjaxSignup')=='1'){ 
    69                         return " 
    70                 <script>jQuery.getScript('http://www.google.com/recaptcha/api/js/recaptcha_ajax.js',function (){Recaptcha.create('".$recaptcha_public_key."','captchadiv',{theme:'custom'});});</script>";       
     69                        $script = "<script>"; 
     70                        $script .= "jQuery.getScript('http://www.google.com/recaptcha/api/js/recaptcha_ajax.js',"; 
     71                        $script .= "function (){"; 
     72                        $script .= "jQuery('#recaptcha_response_field').click(function(){"; 
     73                        $script .= "jQuery('#recaptcha_image').css({'height':'57px','width':'300px'});"; 
     74                        $script .= "var pos = jQuery('#recaptcha_response_field').position();"; 
     75                        $script .= "jQuery('#recaptcha_image').css({'top':pos.top-57,'left':pos.left});"; 
     76                        $script .= "jQuery('#recaptcha_image').show();onTextboxFocus(this,'Show me the captcha');Recaptcha.create('".$recaptcha_public_key."','captchadiv',{theme:'custom'});});"; 
     77                        $script .= "jQuery('#recaptcha_response_field').blur(function(){"; 
     78                        $script .= "jQuery('#recaptcha_image').hide();onTextboxBlur(this,'Show me the captcha');jQuery('#recaptcha_image').html('');"; 
     79                        $script .= "});"; 
     80                        $script .= "});</script>"; 
     81                        return $script;  
    7182                }else{ 
    7283                        return "<script>var RecaptchaOptions = { tabindex : 1 }; </script> " . 
Note: See TracChangeset for help on using the changeset viewer.