From e9261c6491959b5b0efe1036ec37ff9e850bd62e Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 17 Aug 2006 12:36:23 +0000 Subject: WP Merge to rev 4104 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@723 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/js/autosave.js.php | 8 +++++--- wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'wp-includes/js') 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()", ); } addLoadEvent(autosave_start_timer) @@ -41,7 +43,6 @@ function autosave_update_post_ID() { message = "" + 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'] != "") -- cgit