]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added ugly hack to get around problems with sliding in hidden images in visual captch...
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 14 Jul 2010 18:56:04 +0000 (18:56 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 14 Jul 2010 18:56:04 +0000 (18:56 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6705 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/account/forms/login_walled_garden.php

index c7531efbd4efd3b0be997ed3db4b35791c8bdf85..56ea365bbe3442c8eba94ae10f7f0d6508a5b0aa 100644 (file)
@@ -67,22 +67,26 @@ __HTML;
 </div><div id="hiddenform_bottom"></div></div>
 
 <script type="text/javascript"> 
-$(document).ready(function() {         
+$(document).ready(function() {
        $('input.username').focus();
        
        // add cancel button to inline register form
        $('#registration_form').find('input.submit_button').after("<input class='action_button disabled cancel_request' type='reset' value='Cancel'>");
        
        function elgg_slide_hiddenform(activateLink, parentElement, toggleElement) {
-               $(activateLink).closest(parentElement).find(toggleElement).animate({"width": "563px"}, { duration: 400 });
-               $(activateLink).closest(parentElement).animate({"height": "256px"}, { duration: 400 });
+               $(activateLink).closest(parentElement).find(toggleElement).animate({"width": "563px", duration: 400});
+               $(activateLink).closest(parentElement).animate({"height": "256px", duration: 400}, function() {
+                       // ewwww dirty.  Webkit has problems when showing images that were hidden.
+                       // forcing a reload of all the images.
+                       $('.visual_captcha img').each(function() { $(this).attr('src', $(this).attr('src')); });
+               });
                return false;
        }
 
        $('a.registration_link').click(function(e) {
                e.preventDefault();
                elgg_slide_hiddenform(this, '.walledgardenlogin', '#registration_form');
-               $('input.name').focus();        
+               $('input.name').focus();
        });
        
        $('a.forgotten_password_link').click(function(e) {