Changeset 7791
- Timestamp:
- 04/23/08 02:23:07 (7 months ago)
- Files:
-
- branches/2.5/wp-includes/js/autosave.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.5/wp-includes/js/autosave.js
r7789 r7791 11 11 }); 12 12 13 // called when autosaving pre-existing post 14 function autosave_saved(response, keepDisabled) { 13 function autosave_parse_response(response) { 15 14 var res = wpAjax.parseAjaxResponse(response, 'autosave'); // parse the ajax response 16 15 var message = ''; … … 42 41 if ( message ) { jQuery('#autosave').html(message); } // update autosave message 43 42 else if ( autosaveOldMessage && res ) { jQuery('#autosave').html( autosaveOldMessage ); } 44 if ( !keepDisabled ) {45 autosave_enable_buttons(); // re-enable disabled form buttons46 }47 43 return res; 44 } 45 46 // called when autosaving pre-existing post 47 function autosave_saved(response) { 48 autosave_parse_response(response); // parse the ajax response 49 autosave_enable_buttons(); // re-enable disabled form buttons 48 50 } 49 51 50 52 // called when autosaving new post 51 53 function autosave_saved_new(response) { 52 var res = autosave_ saved(response, true); // parse the ajax response do the above54 var res = autosave_parse_response(response); // parse the ajax response 53 55 // if no errors: update post_ID from the temporary value, grab new save-nonce for that new ID 54 56 if ( res && res.responses.length && !res.errors ) {
