WordPress.org

Make WordPress Core

Ticket #10680: 10680.3-quickpress-spinner.diff

File 10680.3-quickpress-spinner.diff, 3.0 KB (added by nacin, 8 years ago)
  • css/dashboard.dev.css

     
    299299}
    300300
    301301#dashboard-widgets #dashboard_quick_press form p.submit #publish {
    302         float: right;
     302        float: none;
    303303}
    304304
     305#dashboard-widgets #dashboard_quick_press form p.submit img.waiting {
     306        vertical-align: middle;
     307        visibility: hidden;
     308}
     309
    305310/* Recent Drafts */
    306311#dashboard_recent_drafts ul {
    307312        margin: 0;
  • includes/dashboard.php

     
    415415                        <?php wp_nonce_field('add-post'); ?>
    416416                        <input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php esc_attr_e('Save Draft'); ?>" />
    417417                        <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" />
    418                         <?php if ( current_user_can('publish_posts') ) { ?>
    419                         <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php esc_attr_e('Publish'); ?>" />
    420                         <?php } else { ?>
    421                         <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php esc_attr_e('Submit for Review'); ?>" />
    422                         <?php } ?>
     418                        <span id="publishing-action">
     419                                <img class="waiting" src="images/wpspin_light.gif" />
     420                                <?php if ( current_user_can('publish_posts') ) { ?>
     421                                <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php esc_attr_e('Publish'); ?>" />
     422                                <?php } else { ?>
     423                                <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php esc_attr_e('Submit for Review'); ?>" />
     424                                <?php } ?>
     425                        </span>
    423426                        <br class="clear" />
    424427                </p>
    425428
  • js/dashboard.dev.js

     
    4343        quickPressLoad = function() {
    4444                var act = $('#quickpost-action'), t;
    4545                t = $('#quick-press').submit( function() {
    46                         $('#dashboard_quick_press h3').append( '<img src="images/wpspin_light.gif" style="margin: 0 6px 0 0; vertical-align: middle" />' );
     46                        $('#dashboard_quick_press #publishing-action img.waiting').css('visibility', 'visible');
    4747                        $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr('disabled','disabled');
    4848
    4949                        if ( 'post' == act.val() ) {
     
    5151                        }
    5252
    5353                        $('#dashboard_quick_press div.inside').load( t.attr( 'action' ), t.serializeArray(), function() {
    54                                 $('#dashboard_quick_press h3 img').remove();
     54                                $('#dashboard_quick_press #publishing-action img.waiting').css('visibility', 'hidden');
    5555                                $('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr('disabled','');
    5656                                $('#dashboard_quick_press ul').find('li').each( function() {
    5757                                        $('#dashboard_recent_drafts ul').prepend( this );