Ticket #6389: 6389-autosave.diff
| File 6389-autosave.diff, 1.1 KB (added by , 18 years ago) |
|---|
-
wp-includes/js/autosave.js
50 50 var res = autosave_saved(response); // parse the ajax response do the above 51 51 // if no errors: update post_ID from the temporary value, grab new save-nonce for that new ID 52 52 if ( res && res.responses.length && !res.errors ) { 53 var tempID = jQuery('#post_ID').val(); 53 54 var postID = parseInt( res.responses[0].id ); 54 55 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 }); 55 60 } 56 61 } 57 62 … … 137 142 // This (bool) tells whether or not to write the post to the DB during the ajax request. 138 143 var doAutoSave = true; 139 144 145 // No autosave while thickbox is open (media buttons) 146 if ( jQuery("#TB_window").css('display') == 'block' ) 147 doAutoSave = false; 148 140 149 /* Gotta do this up here so we can check the length when tinyMCE is in use */ 141 150 if ( rich ) { tinyMCE.triggerSave(); } 142 151