mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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: http://svn.automattic.com/wordpress/trunk@15722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8d138e0c4c
commit
38b834c848
File diff suppressed because one or more lines are too long
@ -422,7 +422,8 @@ table.ie-fixed {
|
||||
background: #298CBA;
|
||||
}
|
||||
|
||||
#wpcontent #ajax-loading {
|
||||
#wpcontent #ajax-loading,
|
||||
#wpcontent .ajax-loading {
|
||||
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;
|
||||
}
|
||||
|
||||
#minor-publishing .ajax-loading {
|
||||
padding: 3px 0 0 4px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.preview {
|
||||
float: right;
|
||||
}
|
||||
@ -1919,10 +1924,15 @@ input#link_url {
|
||||
}
|
||||
|
||||
#media-buttons img,
|
||||
#submitpost #ajax-loading {
|
||||
#submitpost #ajax-loading,
|
||||
#submitpost .ajax-loading {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#wpcontent .ajax-loading {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.submitbox .submit {
|
||||
text-align: left;
|
||||
padding: 12px 10px 10px;
|
||||
|
@ -32,6 +32,7 @@ function post_submit_meta_box($post) {
|
||||
<?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" />
|
||||
<?php } ?>
|
||||
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="draft-ajax-loading" alt="" />
|
||||
</div>
|
||||
|
||||
<div id="preview-action">
|
||||
@ -204,7 +205,7 @@ if ( current_user_can( "delete_post", $post->ID ) ) {
|
||||
</div>
|
||||
|
||||
<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
|
||||
if ( !in_array( $post->post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) {
|
||||
if ( $can_publish ) :
|
||||
|
@ -21,7 +21,10 @@ jQuery(document).ready( function($) {
|
||||
else
|
||||
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(){
|
||||
@ -173,7 +176,7 @@ function autosave_enable_buttons() {
|
||||
// delay that a bit to avoid some rare collisions while the DOM is being updated.
|
||||
setTimeout(function(){
|
||||
jQuery(':button, :submit', '#submitpost').removeAttr('disabled');
|
||||
jQuery('#ajax-loading').css('visibility', 'hidden');
|
||||
jQuery('.ajax-loading').css('visibility', 'hidden');
|
||||
}, 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){};'
|
||||
) );
|
||||
|
||||
$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( '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
|
||||
$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' );
|
||||
|
||||
// all colors stylesheets need to have the same query strings (cache manifest compat)
|
||||
|
Loading…
Reference in New Issue
Block a user