diff options
author | wei <> | 2007-05-09 03:53:07 +0000 |
---|---|---|
committer | wei <> | 2007-05-09 03:53:07 +0000 |
commit | 2c8dcb09949ea6fb1ae9ee45cc1b36a0d5c396d9 (patch) | |
tree | b5edc5d1cd31991afe4dac7a9c842d6705a96d00 | |
parent | e2614a35a70f609bccc1d65df6f1b92ff1fef5ef (diff) |
Fixed #603
-rw-r--r-- | framework/Web/UI/WebControls/THtmlArea.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/THtmlArea.php b/framework/Web/UI/WebControls/THtmlArea.php index efe3e6d9..19971eed 100644 --- a/framework/Web/UI/WebControls/THtmlArea.php +++ b/framework/Web/UI/WebControls/THtmlArea.php @@ -289,6 +289,7 @@ class THtmlArea extends TTextBox $this->loadJavascriptLibrary();
if($this->getEnableCompression())
$this->preLoadCompressedScript();
+ $this->applyJavascriptFixes();
}
/**
@@ -350,6 +351,27 @@ class THtmlArea extends TTextBox }
/**
+ * Changes the TinyMCE triggerSave() function to allow for missing textareas.
+ */
+ protected function applyJavascriptFixes()
+ {
+ $scripts = $this->getPage()->getClientScript();
+ $js = <<<EOD
+if(typeof(tinyMCE)!='undefined')
+{
+ TinyMCE_Control.prototype.triggerSave_old = TinyMCE_Control.prototype.triggerSave;
+ TinyMCE_Control.prototype.triggerSave = function(skip_cleanup, skip_callback)
+ {
+ if(this.getDoc()!=null)
+ this.triggerSave_old(skip_cleanup, skip_callback);
+ }
+}
+EOD;
+ if(!$scripts->isEndScriptRegistered('prado:THtmlArea:fix'))
+ $scripts->registerEndScript('prado:THtmlArea:fix', $js);
+ }
+
+ /**
* Registers the editor javascript file and code to initialize the editor.
*/
protected function registerEditorClientScript($writer)
|