summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Javascripts/source/prado/scriptaculous-adapter.js11
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientScript.php9
2 files changed, 13 insertions, 7 deletions
diff --git a/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js b/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js
index 2423df9a..2905deec 100644
--- a/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js
+++ b/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js
@@ -356,6 +356,17 @@ Prado.Element =
evaluateScript : function(content)
{
content.evalScripts();
+ },
+
+ setStyle : function (element, styles)
+ {
+ var s = {}
+ // Camelize all styles keys
+ for (var property in styles)
+ {
+ s[property.camelize()]=styles[property].camelize();
+ }
+ Element.setStyle(element, s);
}
};
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
index 523a4b56..4ddb0654 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
@@ -295,13 +295,8 @@ class TCallbackClientScript extends TApplicationComponent
* @param array list of key-value pairs as style property and style value.
*/
public function setStyle($element, $styles)
- {
- $s=array();
- foreach ($styles as $key=>$value)
- {
- $s[]=$key.": ".$value;
- }
- $this->callClientFunction('Element.setStyle', array($element, $s));
+ {
+ $this->callClientFunction('Prado.Element.setStyle', array($element, $styles));
}
/**