From 4560efdc051a3b3f76e74375fadf40f118b6dbb3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Fri, 18 May 2012 15:17:13 +0000 Subject: Partial patch for #401 --- framework/Web/UI/WebControls/TClientScript.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TClientScript.php') diff --git a/framework/Web/UI/WebControls/TClientScript.php b/framework/Web/UI/WebControls/TClientScript.php index 41bf8b57..325105bc 100644 --- a/framework/Web/UI/WebControls/TClientScript.php +++ b/framework/Web/UI/WebControls/TClientScript.php @@ -111,7 +111,17 @@ class TClientScript extends TControl protected function renderCustomScriptFile($writer) { if(($scriptUrl = $this->getScriptUrl())!=='') - $writer->write("\n"); + { + if($this->getPage()->getIsCallback()) + { + $cs = $this->getPage()->getClientScript(); + $uniqueid=$this->ClientID.'_custom'; + if(!$cs->isScriptFileRegistered($uniqueid)) + $cs->registerScriptFile($uniqueid, $scriptUrl); + } else { + $writer->write("\n"); + } + } } /** -- cgit v1.2.3