From 2c8dcb09949ea6fb1ae9ee45cc1b36a0d5c396d9 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 9 May 2007 03:53:07 +0000 Subject: Fixed #603 --- framework/Web/UI/WebControls/THtmlArea.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'framework/Web/UI/WebControls/THtmlArea.php') 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(); } /** @@ -349,6 +350,27 @@ class THtmlArea extends TTextBox $scripts->registerScriptFile('prado:THtmlArea', $this->getScriptUrl()); } + /** + * Changes the TinyMCE triggerSave() function to allow for missing textareas. + */ + protected function applyJavascriptFixes() + { + $scripts = $this->getPage()->getClientScript(); + $js = <<isEndScriptRegistered('prado:THtmlArea:fix')) + $scripts->registerEndScript('prado:THtmlArea:fix', $js); + } + /** * Registers the editor javascript file and code to initialize the editor. */ -- cgit v1.2.3