summaryrefslogtreecommitdiffstats
path: root/wp-includes/js
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-18 11:27:26 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-18 11:27:26 +0000
commitacdcdacc2fe65422a3f52e3320283feba13d9c40 (patch)
treebad2b7ef0aef1f89e9abc6bafa0264a3ba302f46 /wp-includes/js
parent26b0392f7796ed87daa7725a33ac87057b3b2a4c (diff)
downloadwordpress-mu-acdcdacc2fe65422a3f52e3320283feba13d9c40.tar.gz
wordpress-mu-acdcdacc2fe65422a3f52e3320283feba13d9c40.tar.xz
wordpress-mu-acdcdacc2fe65422a3f52e3320283feba13d9c40.zip
WP Merge to rev 4763
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@851 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/js')
-rw-r--r--wp-includes/js/autosave-js.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/wp-includes/js/autosave-js.php b/wp-includes/js/autosave-js.php
index 67fcde7..e30134d 100644
--- a/wp-includes/js/autosave-js.php
+++ b/wp-includes/js/autosave-js.php
@@ -7,6 +7,7 @@ var autosavePeriodical;
function autosave_start_timer() {
var form = $('post');
autosaveLast = form.post_title.value+form.content.value;
+ // Keep autosave_interval in sync with edit_post().
autosavePeriodical = new PeriodicalExecuter(autosave, <?php echo apply_filters('autosave_interval', '120'); ?>);
//Disable autosave after the form has been submitted
if(form.addEventListener) {
@@ -85,6 +86,7 @@ function autosave_disable_buttons() {
form.submit ? form.submit.disabled = 'disabled' : null;
form.publish ? form.publish.disabled = 'disabled' : null;
form.deletepost ? form.deletepost.disabled = 'disabled' : null;
+ setTimeout('autosave_enable_buttons();', 1000); // Re-enable 1 sec later. Just gives autosave a head start to avoid collisions.
}
function autosave_enable_buttons() {