diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-25 09:03:55 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-25 09:03:55 +0000 |
| commit | 4dbe26b26fe556c71cc38e2531110bc63f351b4d (patch) | |
| tree | de454a939b6567f1eef16952ff4ba883548eb498 /wp-includes/js | |
| parent | bc31549fc8053f8bc6502c337707168d5e66c508 (diff) | |
| download | wordpress-mu-4dbe26b26fe556c71cc38e2531110bc63f351b4d.tar.gz wordpress-mu-4dbe26b26fe556c71cc38e2531110bc63f351b4d.tar.xz wordpress-mu-4dbe26b26fe556c71cc38e2531110bc63f351b4d.zip | |
WP Merge to revision 7826
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1266 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/js')
| -rw-r--r-- | wp-includes/js/autosave.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wp-includes/js/autosave.js b/wp-includes/js/autosave.js index c9e5fb1..b0a2fa5 100644 --- a/wp-includes/js/autosave.js +++ b/wp-includes/js/autosave.js @@ -56,13 +56,14 @@ function autosave_saved_new(response) { if ( res && res.responses.length && !res.errors ) { var tempID = jQuery('#post_ID').val(); var postID = parseInt( res.responses[0].id ); - autosave_update_post_ID( postID ); + autosave_update_post_ID( postID ); // disabled form buttons are re-enabled here if ( tempID < 0 && postID > 0) // update media buttons jQuery('#media-buttons a').each(function(){ this.href = this.href.replace(tempID, postID); }); + } else { + autosave_enable_buttons(); // re-enable disabled form buttons } - autosave_enable_buttons(); // re-enable disabled form buttons } function autosave_update_post_ID( postID ) { @@ -78,6 +79,7 @@ function autosave_update_post_ID( postID ) { post_type: jQuery('#post_type').val() }, function(html) { jQuery('#_wpnonce').val(html); + autosave_enable_buttons(); // re-enable disabled form buttons }); jQuery('#hiddenaction').val('editpost'); } @@ -127,7 +129,7 @@ function autosave_enable_buttons() { function autosave_disable_buttons() { jQuery("#submitpost :button:enabled, #submitpost :submit:enabled").attr('disabled', 'disabled'); - setTimeout(autosave_enable_buttons, 1000); // Re-enable 1 sec later. Just gives autosave a head start to avoid collisions. + setTimeout(autosave_enable_buttons, 5000); // Re-enable 5 sec later. Just gives autosave a head start to avoid collisions. } var autosave = function() { |
