WordPress.org

Make WordPress Core

Changeset 7325


Ignore:
Timestamp:
03/15/08 22:57:47 (6 years ago)
Author:
westi
Message:

Switch from addLoadEvent to jQuery(document).ready. Fixes #6241 props azaozz.

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r7310 r7325  
    6767 
    6868<?php echo $form_extra ?> 
    69 <?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?> 
    70 <script type="text/javascript"> 
    71 function focusit() { 
    72     // focus on first input field 
    73     document.post.title.focus(); 
    74 } 
    75 addLoadEvent(focusit); 
    76 </script> 
    77 <?php endif; ?> 
     69 
    7870<div id="poststuff"> 
    7971 
     
    353345 
    354346</form> 
     347 
     348<?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?> 
     349<script type="text/javascript"> 
     350try{document.post.title.focus();}catch(e){} 
     351</script> 
     352<?php endif; ?> 
  • trunk/wp-admin/edit-form-comment.php

    r7310 r7325  
    1212<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 
    1313<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' /> 
    14  
    15 <script type="text/javascript"> 
    16 function focusit() { // focus on first input field 
    17     document.post.name.focus(); 
    18 } 
    19 addLoadEvent(focusit); 
    20 </script> 
    2114 
    2215<div id="poststuff"> 
     
    109102 
    110103</form> 
     104 
     105<script type="text/javascript"> 
     106try{document.post.name.focus();}catch(e){} 
     107</script> 
  • trunk/wp-admin/edit-form.php

    r7304 r7325  
    99<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 
    1010<input type="hidden" name="action" value='post' /> 
    11  
    12 <script type="text/javascript"> 
    13 <!-- 
    14 function focusit() { // focus on first input field 
    15     document.getElementById('title').focus(); 
    16 } 
    17 addLoadEvent(focusit); 
    18 //--> 
    19 </script> 
    2011 
    2112<div id="poststuff"> 
     
    7364</form> 
    7465 
     66<script type="text/javascript"> 
     67try{document.getElementById('title').focus();}catch(e){} 
     68</script> 
    7569</div> 
  • trunk/wp-admin/edit-page-form.php

    r7310 r7325  
    4545?>" /> 
    4646 
    47 <script type="text/javascript"> 
    48 // <![CDATA[ 
    49 function focusit() { // focus on first input field 
    50     document.post.title.focus(); 
    51 } 
    52 addLoadEvent(focusit); 
    53 // ]]> 
    54 </script> 
    5547<div id="poststuff"> 
    5648 
     
    282274 
    283275</form> 
     276 
     277<script type="text/javascript"> 
     278try{document.post.title.focus();}catch(e){} 
     279</script> 
  • trunk/wp-admin/js/comment.js

    r7285 r7325  
    1 addLoadEvent( function() { 
     1jQuery(document).ready( function() { 
    22    add_postbox_toggles('comment'); 
    33 
  • trunk/wp-admin/js/common.js

    r7311 r7325  
    1 addLoadEvent( function() { 
     1jQuery(document).ready( function() { 
    22    // pulse 
    33    jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300); 
  • trunk/wp-admin/js/link.js

    r7143 r7325  
    1 addLoadEvent( function() { 
     1jQuery(document).ready( function() { 
    22    jQuery('#link_name').focus(); 
    33    // postboxes 
  • trunk/wp-admin/js/page.js

    r7285 r7325  
    1 addLoadEvent( function() { 
     1jQuery(document).ready( function() { 
    22    add_postbox_toggles('page'); 
    33    make_slugedit_clickable(); 
  • trunk/wp-admin/js/post.js

    r7285 r7325  
    5959} 
    6060 
    61 addLoadEvent( function() { 
     61jQuery(document).ready( function() { 
    6262    // postboxes 
    6363    add_postbox_toggles('post'); 
  • trunk/wp-admin/js/upload.js

    r7130 r7325  
    1 addLoadEvent( function() { 
     1jQuery(document).ready( function() { 
    22    theFileList = { 
    33        currentImage: {ID: 0}, 
  • trunk/wp-admin/user-edit.php

    r7318 r7325  
    4848    } ); 
    4949     
    50     addLoadEvent( function() { 
     50    jQuery(document).ready( function() { 
    5151        jQuery('#pass1,#pass2').attr('autocomplete','off'); 
    5252    }); 
  • trunk/wp-includes/js/thickbox/thickbox.js

    r6579 r7325  
    1212 
    1313//on page load call tb_init 
    14 addLoadEvent(function(){    
     14jQuery(document).ready(function(){    
    1515    tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox 
    1616    imgLoader = new Image();// preload image 
Note: See TracChangeset for help on using the changeset viewer.