Ticket #6707: 6707.c.diff

File 6707.c.diff, 2.9 kB (added by mdawaffe, 7 months ago)
  • wp-includes/js/autosave.js

    old new  
    5656        if ( res && res.responses.length && !res.errors ) { 
    5757                var tempID = jQuery('#post_ID').val(); 
    5858                var postID = parseInt( res.responses[0].id ); 
    59                 autosave_update_post_ID( postID ); 
     59                autosave_update_post_ID( postID ); // disabled form buttons are re-enabled here 
    6060                if ( tempID < 0 && postID > 0) // update media buttons 
    6161                        jQuery('#media-buttons a').each(function(){ 
    6262                                this.href = this.href.replace(tempID, postID); 
    6363                        }); 
     64        } else { 
     65                autosave_enable_buttons(); // re-enable disabled form buttons 
    6466        } 
    65         autosave_enable_buttons(); // re-enable disabled form buttons 
    6667} 
    6768 
    6869function autosave_update_post_ID( postID ) { 
     
    7879                        post_type: jQuery('#post_type').val() 
    7980                }, function(html) { 
    8081                        jQuery('#_wpnonce').val(html); 
     82                        autosave_enable_buttons(); // re-enable disabled form buttons 
    8183                }); 
    8284                jQuery('#hiddenaction').val('editpost'); 
    8385        } 
     
    127129 
    128130function autosave_disable_buttons() { 
    129131        jQuery("#submitpost :button:enabled, #submitpost :submit:enabled").attr('disabled', 'disabled'); 
    130         setTimeout(autosave_enable_buttons, 1000); // Re-enable 1 sec later.  Just gives autosave a head start to avoid collisions. 
     132        setTimeout(autosave_enable_buttons, 5000); // Re-enable 5 sec later.  Just gives autosave a head start to avoid collisions. 
    131133} 
    132134 
    133135var autosave = function() { 
  • wp-includes/script-loader.php

    old new  
    4747                        'broken' => __('An unidentified error has occurred.') 
    4848                ) ); 
    4949 
    50                 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080422' ); 
     50                $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080424' ); 
    5151 
    5252                $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306'); 
    5353                $this->localize( 'wp-ajax', 'WPAjaxL10n', array( 
  • wp-admin/css/colors-fresh.css

    old new  
    188188        border-color: #80b5d0; 
    189189} 
    190190 
     191.button[disabled], .button:disabled { 
     192        background-color: #999; 
     193} 
     194 
    191195.submit input:hover, .button:hover, #edit-slug-buttons a.save:hover { 
    192196        border-color: #535353; 
    193197} 
  • wp-admin/css/colors-classic.css

    old new  
    192192        border-color: #a3a3a3; 
    193193} 
    194194 
     195.button[disabled], .button:disabled { 
     196        background-color: #999; 
     197} 
     198 
    195199.tablenav .button-secondary { 
    196200        border-color: #5396c5; 
    197201}