diff options
author | ctrlaltca <> | 2012-05-18 15:17:13 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-05-18 15:17:13 +0000 |
commit | 4560efdc051a3b3f76e74375fadf40f118b6dbb3 (patch) | |
tree | bbacc17ff2e4b62947a2d61353b34aca044862c8 /framework/Web/UI | |
parent | 30a457a57db5c1d76280478aa6d126da34729eb4 (diff) |
Partial patch for #401
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/WebControls/TClientScript.php | 12 |
1 files changed, 11 insertions, 1 deletions
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("<script type=\"text/javascript\" src=\"$scriptUrl\"></script>\n");
+ {
+ if($this->getPage()->getIsCallback())
+ {
+ $cs = $this->getPage()->getClientScript();
+ $uniqueid=$this->ClientID.'_custom';
+ if(!$cs->isScriptFileRegistered($uniqueid))
+ $cs->registerScriptFile($uniqueid, $scriptUrl);
+ } else {
+ $writer->write("<script type=\"text/javascript\" src=\"$scriptUrl\"></script>\n");
+ }
+ }
}
/**
|