Ticket #6707: 6707.diff
| File 6707.diff, 2.1 kB (added by mdawaffe, 7 months ago) |
|---|
-
wp-includes/js/autosave.js
old new 11 11 }); 12 12 13 13 // called when autosaving pre-existing post 14 function autosave_saved(response ) {14 function autosave_saved(response, keepDisabled) { 15 15 var res = wpAjax.parseAjaxResponse(response, 'autosave'); // parse the ajax response 16 16 var message = ''; 17 17 … … 41 41 } 42 42 if ( message ) { jQuery('#autosave').html(message); } // update autosave message 43 43 else if ( autosaveOldMessage && res ) { jQuery('#autosave').html( autosaveOldMessage ); } 44 autosave_enable_buttons(); // re-enable disabled form buttons 44 if ( !keepDisabled ) { 45 autosave_enable_buttons(); // re-enable disabled form buttons 46 } 45 47 return res; 46 48 } 47 49 48 50 // called when autosaving new post 49 51 function autosave_saved_new(response) { 50 var res = autosave_saved(response ); // parse the ajax response do the above52 var res = autosave_saved(response, true); // parse the ajax response do the above 51 53 // if no errors: update post_ID from the temporary value, grab new save-nonce for that new ID 52 54 if ( res && res.responses.length && !res.errors ) { 53 55 var tempID = jQuery('#post_ID').val(); … … 58 60 this.href = this.href.replace(tempID, postID); 59 61 }); 60 62 } 63 autosave_enable_buttons(); // re-enable disabled form buttons 61 64 } 62 65 63 66 function autosave_update_post_ID( postID ) { -
wp-includes/script-loader.php
old new 47 47 'broken' => __('An unidentified error has occurred.') 48 48 ) ); 49 49 50 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '200804 16' );50 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080422' ); 51 51 52 52 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306'); 53 53 $this->localize( 'wp-ajax', 'WPAjaxL10n', array(
