Use separate ajax spinners for the Save Draft and Publish buttons on the post form. fixes #14582 with initial patch from wojtek.szkutnik.
git-svn-id: https://develop.svn.wordpress.org/trunk@15722 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7b01cbcc6e
commit
4360f8c1a4
File diff suppressed because one or more lines are too long
|
@ -422,7 +422,8 @@ table.ie-fixed {
|
||||||
background: #298CBA;
|
background: #298CBA;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpcontent #ajax-loading {
|
#wpcontent #ajax-loading,
|
||||||
|
#wpcontent .ajax-loading {
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -317,6 +317,11 @@ form p.submit a.cancel:hover {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#minor-publishing .ajax-loading {
|
||||||
|
padding: 3px 0 0 4px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
.preview {
|
.preview {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
@ -1919,10 +1924,15 @@ input#link_url {
|
||||||
}
|
}
|
||||||
|
|
||||||
#media-buttons img,
|
#media-buttons img,
|
||||||
#submitpost #ajax-loading {
|
#submitpost #ajax-loading,
|
||||||
|
#submitpost .ajax-loading {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#wpcontent .ajax-loading {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.submitbox .submit {
|
.submitbox .submit {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 12px 10px 10px;
|
padding: 12px 10px 10px;
|
||||||
|
|
|
@ -32,6 +32,7 @@ function post_submit_meta_box($post) {
|
||||||
<?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?>
|
<?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?>
|
||||||
<input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" />
|
<input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="draft-ajax-loading" alt="" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="preview-action">
|
<div id="preview-action">
|
||||||
|
@ -204,7 +205,7 @@ if ( current_user_can( "delete_post", $post->ID ) ) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="publishing-action">
|
<div id="publishing-action">
|
||||||
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" id="ajax-loading" style="visibility:hidden;" alt="" />
|
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" />
|
||||||
<?php
|
<?php
|
||||||
if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
|
if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
|
||||||
if ( $can_publish ) :
|
if ( $can_publish ) :
|
||||||
|
|
|
@ -21,7 +21,10 @@ jQuery(document).ready( function($) {
|
||||||
else
|
else
|
||||||
t.addClass('button-disabled');
|
t.addClass('button-disabled');
|
||||||
});
|
});
|
||||||
$('#ajax-loading').css('visibility', 'visible');
|
if ( $(this).attr('id') == 'publish' )
|
||||||
|
$('#ajax-loading').css('visibility', 'visible');
|
||||||
|
else
|
||||||
|
$('#draft-ajax-loading').css('visibility', 'visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
window.onbeforeunload = function(){
|
window.onbeforeunload = function(){
|
||||||
|
@ -173,7 +176,7 @@ function autosave_enable_buttons() {
|
||||||
// delay that a bit to avoid some rare collisions while the DOM is being updated.
|
// delay that a bit to avoid some rare collisions while the DOM is being updated.
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
jQuery(':button, :submit', '#submitpost').removeAttr('disabled');
|
jQuery(':button, :submit', '#submitpost').removeAttr('disabled');
|
||||||
jQuery('#ajax-loading').css('visibility', 'hidden');
|
jQuery('.ajax-loading').css('visibility', 'hidden');
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -98,7 +98,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
|
'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20100410' );
|
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20101004' );
|
||||||
$scripts->add_data( 'autosave', 'group', 1 );
|
$scripts->add_data( 'autosave', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20091128' );
|
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20091128' );
|
||||||
|
@ -456,9 +456,9 @@ function wp_default_styles( &$styles ) {
|
||||||
// Any rtl stylesheets that don't have a .dev version for ltr
|
// Any rtl stylesheets that don't have a .dev version for ltr
|
||||||
$no_suffix = array( 'farbtastic' );
|
$no_suffix = array( 'farbtastic' );
|
||||||
|
|
||||||
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20100925' );
|
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20101004' );
|
||||||
|
|
||||||
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20100610' );
|
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101004' );
|
||||||
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
||||||
|
|
||||||
// all colors stylesheets need to have the same query strings (cache manifest compat)
|
// all colors stylesheets need to have the same query strings (cache manifest compat)
|
||||||
|
|
Loading…
Reference in New Issue