Make WordPress Core

Changeset 7532


Ignore:
Timestamp:
03/26/2008 08:28:40 PM (16 years ago)
Author:
markjaquith
Message:

Autosave fixes for attachments from andy. fixes #6389

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/autosave.js

    r7480 r7532  
    5151    // if no errors: update post_ID from the temporary value, grab new save-nonce for that new ID
    5252    if ( res && res.responses.length && !res.errors ) {
     53        var tempID = jQuery('#post_ID').val();
    5354        var postID = parseInt( res.responses[0].id );
    5455        autosave_update_post_ID( postID );
     56        if ( tempID < 0 ) // update media buttons
     57            jQuery('#media-buttons a').each(function(){
     58                this.href = this.href.replace(tempID, postID);
     59            });
    5560    }
    5661}
     
    138143    var doAutoSave = true;
    139144
     145    // No autosave while thickbox is open (media buttons)
     146    if ( jQuery("#TB_window").css('display') == 'block' )
     147        doAutoSave = false;
     148
    140149    /* Gotta do this up here so we can check the length when tinyMCE is in use */
    141150    if ( rich ) { tinyMCE.triggerSave(); }
  • trunk/wp-includes/script-loader.php

    r7529 r7532  
    4848        ) );
    4949
    50         $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080322' );
     50        $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080326' );
    5151
    5252        $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306');
Note: See TracChangeset for help on using the changeset viewer.