summaryrefslogtreecommitdiffstats
path: root/wp-includes/js
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-08-17 12:36:23 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-08-17 12:36:23 +0000
commite9261c6491959b5b0efe1036ec37ff9e850bd62e (patch)
treeb0ca05cf207206ab1ec85216c0d7abc4c16eca5b /wp-includes/js
parent62a85df302a839177400100c6a09813161440ce0 (diff)
downloadwordpress-mu-e9261c6491959b5b0efe1036ec37ff9e850bd62e.tar.gz
wordpress-mu-e9261c6491959b5b0efe1036ec37ff9e850bd62e.tar.xz
wordpress-mu-e9261c6491959b5b0efe1036ec37ff9e850bd62e.zip
WP Merge to rev 4104
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@723 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/js')
-rw-r--r--wp-includes/js/autosave.js.php8
-rw-r--r--wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js5
2 files changed, 9 insertions, 4 deletions
diff --git a/wp-includes/js/autosave.js.php b/wp-includes/js/autosave.js.php
index cb73ebf..f0c3520 100644
--- a/wp-includes/js/autosave.js.php
+++ b/wp-includes/js/autosave.js.php
@@ -14,6 +14,8 @@ function autosave_timer() {
}
function autosave_start_timer() {
+ var form = $('post');
+ autosaveLast = form.post_title.value+form.content.value;
setTimeout("autosave_timer()", <?php echo apply_filters('autosave_start_delay', '60000') ?>);
}
addLoadEvent(autosave_start_timer)
@@ -41,7 +43,6 @@ function autosave_update_post_ID() {
message = "<?php _e('Saved at '); ?>" + autosave_cur_time();
$('post_ID').name = "post_ID";
$('post_ID').value = res;
- $('hiddenaction').value = 'editpost';
// We need new nonces
nonceAjax = new sack();
nonceAjax.element = null;
@@ -53,7 +54,7 @@ function autosave_update_post_ID() {
nonceAjax.onCompletion = autosave_update_nonce;
nonceAjax.method = "POST";
nonceAjax.runAJAX();
-
+ $('hiddenaction').value = 'editpost';
}
$('autosave').innerHTML = message;
}
@@ -84,6 +85,7 @@ function autosave() {
if ( typeof tinyMCE == "undefined" || tinyMCE.configs.length < 1 ) {
autosaveAjax.setVar("content", form.content.value);
} else {
+ if(tinyMCE.selectedInstance.spellcheckerOn) return;
tinyMCE.wpTriggerSave();
autosaveAjax.setVar("content", form.content.value);
}
@@ -127,4 +129,4 @@ function autosave() {
else
autosaveAjax.onCompletion = autosave_saved;
autosaveAjax.runAJAX();
-} \ No newline at end of file
+}
diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
index ef5df27..9a118f9 100644
--- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
+++ b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
@@ -424,7 +424,10 @@ wpInstTriggerSave = function (skip_cleanup, skip_callback) {
}
tinyMCE._customCleanup(this, "submit_content_dom", this.contentWindow.document.body);
- var htm = skip_cleanup ? this.getBody().innerHTML : tinyMCE._cleanupHTML(this, this.getDoc(), this.settings, this.getBody(), tinyMCE.visualAid, true, true);
+ tinyMCE.selectedInstance.getWin().oldfocus=tinyMCE.selectedInstance.getWin().focus;
+ tinyMCE.selectedInstance.getWin().focus=function() {};
+ var htm = tinyMCE._cleanupHTML(this, this.getDoc(), this.settings, this.getBody(), tinyMCE.visualAid, true, true);
+ tinyMCE.selectedInstance.getWin().focus=tinyMCE.selectedInstance.getWin().oldfocus;
htm = tinyMCE._customCleanup(this, "submit_content", htm);
if (!skip_callback && tinyMCE.settings['save_callback'] != "")