From 76d7735f8de76dfc4fa0ff671e5f18ae025bbcf3 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Sat, 24 Mar 2012 22:52:29 +0000 Subject: Committer 2nd part of patch for #391 --- framework/Web/UI/TTemplateManager.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI/TTemplateManager.php') 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)) { -- cgit v1.2.3