WordPress.org

Make WordPress Core

Ticket #6241: js-onload.patch

File js-onload.patch, 5.8 KB (added by azaozz, 6 years ago)
  • wp-admin/edit-form-advanced.php

     
    6666?>" /> 
    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 
    8072<div class="submitbox" id="submitpost"> 
     
    352344</div> 
    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; ?> 
  • wp-admin/edit-form-comment.php

     
    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 ?>' /> 
    1414 
    15 <script type="text/javascript"> 
    16 function focusit() { // focus on first input field 
    17         document.post.name.focus(); 
    18 } 
    19 addLoadEvent(focusit); 
    20 </script> 
    21  
    2215<div id="poststuff"> 
    2316 
    2417<div class="submitbox" id="submitcomment"> 
     
    108101</div> 
    109102 
    110103</form> 
     104 
     105<script type="text/javascript"> 
     106try{document.post.name.focus();}catch(e){} 
     107</script> 
  • wp-admin/edit-form.php

     
    99<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 
    1010<input type="hidden" name="action" value='post' /> 
    1111 
    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> 
    20  
    2112<div id="poststuff"> 
    2213    <fieldset id="titlediv"> 
    2314      <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend> 
     
    7263</div> 
    7364</form> 
    7465 
     66<script type="text/javascript"> 
     67try{document.getElementById('title').focus();}catch(e){} 
     68</script> 
    7569</div> 
  • wp-admin/edit-page-form.php

     
    4444        echo clean_url(stripslashes(wp_get_referer())); 
    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 
    5749<div class="submitbox" id="submitpage"> 
     
    281273</div> 
    282274 
    283275</form> 
     276 
     277<script type="text/javascript"> 
     278try{document.post.title.focus();}catch(e){} 
     279</script> 
  • wp-admin/js/comment.js

     
    1 addLoadEvent( function() { 
     1jQuery(document).ready( function() { 
    22        add_postbox_toggles('comment'); 
    33 
    44        jQuery('.edit-timestamp').click(function () { 
  • wp-admin/js/common.js

     
    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); 
    44 
  • wp-admin/js/link.js

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

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

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

     
    1 addLoadEvent( function() { 
     1jQuery(document).ready( function() { 
    22        theFileList = { 
    33                currentImage: {ID: 0}, 
    44                nonce: '', 
  • wp-includes/js/thickbox/thickbox.js

     
    1111/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ 
    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 
    1717        imgLoader.src = tb_pathToImage;