Changeset 12817
- Timestamp:
- 01/24/2010 06:16:17 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/script-loader.php
r12815 r12817 143 143 $scripts->add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable'), '1.7.1' ); 144 144 $scripts->add_data( 'jquery-ui-dialog', 'group', 1 ); 145 146 $scripts->add( 'jquery-ui-effects', '/wp-includes/js/jquery/ui.effects.js', array('jquery-ui-core'), '1.7.2' ); // Yes, this one is 1.7.2 — the others need to be updated147 $scripts->add_data( 'jquery-ui-effects', 'group', 1 );148 145 149 146 // deprecated, not used in core, most functionality is included in jQuery 1.3 -
trunk/wp-login.php
r12815 r12817 46 46 add_action( 'login_head', 'noindex' ); 47 47 48 // Print scripts49 add_action( 'login_head', 'wp_print_scripts' );50 51 48 if ( empty($wp_error) ) 52 49 $wp_error = new WP_Error(); … … 56 53 $shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes ); 57 54 58 if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) ) { 59 wp_enqueue_script( 'jquery-ui-effects' ); 55 if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) ) 60 56 add_action( 'login_head', 'wp_shake_js', 12 ); 61 }62 57 63 58 ?> … … 121 116 } 122 117 } // End of login_header() 123 124 118 function wp_shake_js() { 125 119 ?> 126 120 <script type="text/javascript"> 127 jQuery( document ).ready(function(){ 128 jQuery( '#h1' ).focus(); 129 jQuery( '#loginform, #registerform, #lostpasswordform' ).effect('shake', {times: 3}, 40, function(){try{wp_attempt_focus();} catch(e){}}); 130 }); 121 addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 122 function s(id,pos){g(id).left=pos+'px';} 123 function g(id){return document.getElementById(id).style;} 124 function shake(id,a,d){c=a.shift();s(id,c);if(a.length>0){setTimeout(function(){shake(id,a,d);},d);}else{try{wp_attempt_focus();}catch(e){}}} 125 addLoadEvent(function(){ var p=new Array(15,30,15,0,-15,-30,-15,0);p=p.concat(p.concat(p));var i=document.forms[0].id;g(i).position='relative';shake(i,p,20);}); 131 126 </script> 132 127 <?php … … 411 406 <script type="text/javascript"> 412 407 try{document.getElementById('user_login').focus();}catch(e){} 408 if(typeof wpOnload=='function')wpOnload(); 413 409 </script> 414 410 </body> … … 486 482 <script type="text/javascript"> 487 483 try{document.getElementById('user_login').focus();}catch(e){} 484 if(typeof wpOnload=='function')wpOnload(); 488 485 </script> 489 486 </body> … … 629 626 wp_attempt_focus(); 630 627 <?php } ?> 628 if(typeof wpOnload=='function')wpOnload(); 631 629 </script> 632 630 </body>
Note: See TracChangeset
for help on using the changeset viewer.