summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TCallbackClientScript.php
diff options
context:
space:
mode:
authormikl <>2008-04-17 16:16:03 +0000
committermikl <>2008-04-17 16:16:03 +0000
commit2ff1a4bcb650b0dce241c2d947fbf59759c2efff (patch)
treeadc1c4fa758f67f5c404f7f1d320fd5dbf8296e9 /framework/Web/UI/ActiveControls/TCallbackClientScript.php
parent5f6f3f560b826b6b4f9f98bb4e83724b28e454d6 (diff)
Fixed #622
Diffstat (limited to 'framework/Web/UI/ActiveControls/TCallbackClientScript.php')
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientScript.php68
1 files changed, 67 insertions, 1 deletions
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
index 4ddb0654..d372e057 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php
@@ -164,6 +164,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function setAttribute($control, $name, $value)
{
+ if ($control instanceof TControl && $control instanceof IControlContainer)
+ $control=$control->getContainerClientID();
$this->callClientFunction('Prado.Element.setAttribute',array($control, $name, $value));
}
@@ -191,6 +193,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function show($element)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction('Element.show', $element);
}
@@ -200,6 +204,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function hide($element)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction('Element.hide', $element);
}
@@ -211,6 +217,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function toggle($element, $effect=null, $options=array())
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction('Element.toggle', array($element,$effect,$options));
}
@@ -220,6 +228,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function remove($element)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction('Element.remove', $element);
}
@@ -236,6 +246,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function update($element, $content)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->replace($element, $content, 'Element.update');
}
@@ -246,6 +258,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function addCssClass($element, $cssClass)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction('Element.addClassName', array($element, $cssClass));
}
@@ -256,6 +270,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function removeCssClass($element, $cssClass)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction('Element.removeClassName', array($element, $cssClass));
}
@@ -276,6 +292,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function scrollTo($element)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction('Element.scrollTo', $element);
}
@@ -296,6 +314,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function setStyle($element, $styles)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction('Prado.Element.setStyle', array($element, $styles));
}
@@ -306,6 +326,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function appendContent($element, $content)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->replace($element, $content, 'Prado.Element.Insert.append');
}
@@ -316,6 +338,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function prependContent($element, $content)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->replace($element, $content, 'Prado.Element.Insert.prepend');
}
@@ -326,6 +350,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function insertContentAfter($element, $content)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->replace($element, $content, 'Prado.Element.Insert.after');
}
@@ -336,6 +362,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function insertContentBefore($element, $content)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->replace($element, $content, 'Prado.Element.Insert.before');
}
@@ -378,6 +406,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function replaceContent($element,$content)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->replace($element, $content);
}
@@ -428,6 +458,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function visualEffect($type, $element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->callClientFunction($type, array($element, $options));
}
@@ -438,6 +470,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function appear($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Appear', $element, $options);
}
@@ -448,6 +482,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function blindDown($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.BlindDown', $element, $options);
}
@@ -458,6 +494,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function blindUp($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.BlindUp', $element, $options);
}
@@ -469,6 +507,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function dropOut($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.DropOut', $element, $options);
}
@@ -479,6 +519,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function fade($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Fade', $element, $options);
}
@@ -489,6 +531,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function fold($element, $options = null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Fold', $element, $options);
}
@@ -499,6 +543,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function grow($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Grow', $element, $options);
}
@@ -509,6 +555,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function puff($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Puff', $element, $options);
}
@@ -519,6 +567,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function pulsate($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Pulsate', $element, $options);
}
@@ -529,6 +579,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function shake($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Shake', $element, $options);
}
@@ -539,6 +591,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function shrink($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Shrink', $element, $options);
}
@@ -549,6 +603,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function slideDown($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.SlideDown', $element, $options);
}
@@ -559,6 +615,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function slideUp($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.SlideUp', $element, $options);
}
@@ -569,6 +627,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function squish($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.Squish', $element, $options);
}
@@ -579,6 +639,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function switchOff($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Effect.SwitchOff', $element, $options);
}
@@ -589,6 +651,8 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function highlight($element, $options=null)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$this->visualEffect('Prado.Effect.Highlight', $element, $options);
}
@@ -599,9 +663,11 @@ class TCallbackClientScript extends TApplicationComponent
*/
public function setOpacity($element, $value)
{
+ if ($element instanceof TControl && $element instanceof IControlContainer)
+ $element=$element->getContainerClientID();
$value = TPropertyValue::ensureFloat($value);
$this->callClientFunction('Element.setOpacity', array($element,$value));
}
}
-?> \ No newline at end of file
+?>