diff options
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/ActiveControls/TCallbackClientScript.php | 5 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TJavascriptLogger.php | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientScript.php b/framework/Web/UI/ActiveControls/TCallbackClientScript.php index 2c9a01b9..15300727 100644 --- a/framework/Web/UI/ActiveControls/TCallbackClientScript.php +++ b/framework/Web/UI/ActiveControls/TCallbackClientScript.php @@ -153,6 +153,11 @@ class TCallbackClientScript extends TApplicationComponent 'Value', 'Index', 'Clear', 'Indices', 'Values', 'All', 'Invert'); $type = ($type===null) ? $this->getSelectionControlType($control) : $type; $total = $this->getSelectionControlIsListType($control) ? $control->getItemCount() : 1; + + // pass the ID to avoid getting the surrounding elements (ISurroundable) + if($control instanceof TControl) + $control = $control->getClientID(); + $this->callClientFunction('Prado.Element.select', array($control, $type.$method, $value, $total)); } diff --git a/framework/Web/UI/WebControls/TJavascriptLogger.php b/framework/Web/UI/WebControls/TJavascriptLogger.php index a2f1c1c2..2af8bda6 100644 --- a/framework/Web/UI/WebControls/TJavascriptLogger.php +++ b/framework/Web/UI/WebControls/TJavascriptLogger.php @@ -70,7 +70,7 @@ class TJavascriptLogger extends TWebControl { $key = strtolower($this->getToggleKey()); $code = isset(self::$_keyCodes[$key]) ? self::$_keyCodes[$key] : 74; - $js = "var logConsole; Event.OnLoad(function() { logConsole = new LogConsole($code)}); "; + $js = "var logConsole; jQuery(function() { logConsole = new LogConsole($code)}); "; $cs = $this->getPage()->getClientScript(); $cs->registerBeginScript($this->getClientID(),$js); $cs->registerPradoScript('logger'); |