summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TTemplateManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/TTemplateManager.php')
-rw-r--r--framework/Web/UI/TTemplateManager.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index a5e635da..566f6876 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -423,10 +423,17 @@ class TTemplate extends TApplicationComponent implements ITemplate
{
if(strncasecmp($name,'on',2)===0) // is an event
$this->configureEvent($control,$name,$value,$control);
- else if(($pos=strrpos($name,'.'))===false) // is a simple property or custom attribute
- $this->configureProperty($control,$name,$value);
- else // is a subproperty
- $this->configureSubProperty($control,$name,$value);
+ else {
+ if(strncasecmp($name,'js',2)===0)
+ {
+ $name=substr($name,2);
+ $value=TJavaScript::quoteJsLiteral($value);
+ }
+ if(($pos=strrpos($name,'.'))===false) // is a simple property or custom attribute
+ $this->configureProperty($control,$name,$value);
+ else // is a subproperty
+ $this->configureSubProperty($control,$name,$value);
+ }
}
/**
@@ -937,6 +944,8 @@ class TTemplate extends TApplicationComponent implements ITemplate
}
else
{
+ if(strncasecmp($name,'js',2)===0)
+ $name=substr($name, 2);
// a simple property
if(!$class->hasMethod('set'.$name))
{