Switch from addLoadEvent to jQuery(document).ready. Fixes #6241 props azaozz.
git-svn-id: https://develop.svn.wordpress.org/trunk@7325 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5a72522fb2
commit
2d7ba950bc
@ -66,15 +66,7 @@ else
|
|||||||
?>" />
|
?>" />
|
||||||
|
|
||||||
<?php echo $form_extra ?>
|
<?php echo $form_extra ?>
|
||||||
<?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
function focusit() {
|
|
||||||
// focus on first input field
|
|
||||||
document.post.title.focus();
|
|
||||||
}
|
|
||||||
addLoadEvent(focusit);
|
|
||||||
</script>
|
|
||||||
<?php endif; ?>
|
|
||||||
<div id="poststuff">
|
<div id="poststuff">
|
||||||
|
|
||||||
<div class="submitbox" id="submitpost">
|
<div class="submitbox" id="submitpost">
|
||||||
@ -352,3 +344,9 @@ if ( $authors && count( $authors ) > 1 ) :
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
try{document.post.title.focus();}catch(e){}
|
||||||
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
|
@ -12,13 +12,6 @@ $form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment-
|
|||||||
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
|
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
|
||||||
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
|
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function focusit() { // focus on first input field
|
|
||||||
document.post.name.focus();
|
|
||||||
}
|
|
||||||
addLoadEvent(focusit);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div id="poststuff">
|
<div id="poststuff">
|
||||||
|
|
||||||
<div class="submitbox" id="submitcomment">
|
<div class="submitbox" id="submitcomment">
|
||||||
@ -108,3 +101,7 @@ echo "<a href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
try{document.post.name.focus();}catch(e){}
|
||||||
|
</script>
|
||||||
|
@ -9,15 +9,6 @@
|
|||||||
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
|
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
|
||||||
<input type="hidden" name="action" value='post' />
|
<input type="hidden" name="action" value='post' />
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
function focusit() { // focus on first input field
|
|
||||||
document.getElementById('title').focus();
|
|
||||||
}
|
|
||||||
addLoadEvent(focusit);
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div id="poststuff">
|
<div id="poststuff">
|
||||||
<fieldset id="titlediv">
|
<fieldset id="titlediv">
|
||||||
<legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
|
<legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
|
||||||
@ -72,4 +63,7 @@ edCanvas = document.getElementById('content');
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
try{document.getElementById('title').focus();}catch(e){}
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,14 +44,6 @@ else
|
|||||||
echo clean_url(stripslashes(wp_get_referer()));
|
echo clean_url(stripslashes(wp_get_referer()));
|
||||||
?>" />
|
?>" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
// <![CDATA[
|
|
||||||
function focusit() { // focus on first input field
|
|
||||||
document.post.title.focus();
|
|
||||||
}
|
|
||||||
addLoadEvent(focusit);
|
|
||||||
// ]]>
|
|
||||||
</script>
|
|
||||||
<div id="poststuff">
|
<div id="poststuff">
|
||||||
|
|
||||||
<div class="submitbox" id="submitpage">
|
<div class="submitbox" id="submitpage">
|
||||||
@ -281,3 +273,7 @@ if ( $authors && count( $authors ) > 1 ) :
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
try{document.post.title.focus();}catch(e){}
|
||||||
|
</script>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
addLoadEvent( function() {
|
jQuery(document).ready( function() {
|
||||||
add_postbox_toggles('comment');
|
add_postbox_toggles('comment');
|
||||||
|
|
||||||
jQuery('.edit-timestamp').click(function () {
|
jQuery('.edit-timestamp').click(function () {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
addLoadEvent( function() {
|
jQuery(document).ready( function() {
|
||||||
// pulse
|
// pulse
|
||||||
jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
|
jQuery('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
addLoadEvent( function() {
|
jQuery(document).ready( function() {
|
||||||
jQuery('#link_name').focus();
|
jQuery('#link_name').focus();
|
||||||
// postboxes
|
// postboxes
|
||||||
add_postbox_toggles('link');
|
add_postbox_toggles('link');
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
addLoadEvent( function() {
|
jQuery(document).ready( function() {
|
||||||
add_postbox_toggles('page');
|
add_postbox_toggles('page');
|
||||||
make_slugedit_clickable();
|
make_slugedit_clickable();
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ function tag_press_key( e ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addLoadEvent( function() {
|
jQuery(document).ready( function() {
|
||||||
// postboxes
|
// postboxes
|
||||||
add_postbox_toggles('post');
|
add_postbox_toggles('post');
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
addLoadEvent( function() {
|
jQuery(document).ready( function() {
|
||||||
theFileList = {
|
theFileList = {
|
||||||
currentImage: {ID: 0},
|
currentImage: {ID: 0},
|
||||||
nonce: '',
|
nonce: '',
|
||||||
|
@ -47,7 +47,7 @@ function profile_js ( ) {
|
|||||||
$('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
|
$('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
|
||||||
} );
|
} );
|
||||||
|
|
||||||
addLoadEvent( function() {
|
jQuery(document).ready( function() {
|
||||||
jQuery('#pass1,#pass2').attr('autocomplete','off');
|
jQuery('#pass1,#pass2').attr('autocomplete','off');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -11,7 +11,7 @@ var tb_closeImage = "../wp-includes/js/thickbox/tb-close.png";
|
|||||||
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
|
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
|
||||||
|
|
||||||
//on page load call tb_init
|
//on page load call tb_init
|
||||||
addLoadEvent(function(){
|
jQuery(document).ready(function(){
|
||||||
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
|
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
|
||||||
imgLoader = new Image();// preload image
|
imgLoader = new Image();// preload image
|
||||||
imgLoader.src = tb_pathToImage;
|
imgLoader.src = tb_pathToImage;
|
||||||
|
Loading…
Reference in New Issue
Block a user