summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/ActiveControls/TCallbackClientSide.php3
-rw-r--r--framework/Web/UI/WebControls/TSlider.php6
-rw-r--r--framework/Web/UI/WebControls/TValidationSummary.php5
3 files changed, 6 insertions, 8 deletions
diff --git a/framework/Web/UI/ActiveControls/TCallbackClientSide.php b/framework/Web/UI/ActiveControls/TCallbackClientSide.php
index cfef37c4..54e6c1a3 100644
--- a/framework/Web/UI/ActiveControls/TCallbackClientSide.php
+++ b/framework/Web/UI/ActiveControls/TCallbackClientSide.php
@@ -54,8 +54,7 @@ class TCallbackClientSide extends TClientSideOptions
{
/**
* Returns javascript statement enclosed within a javascript function.
- * @param string javascript statement, if string begins within
- * "javascript:" the whole string is assumed to be a function.
+ * @param string javascript statement
* @return string javascript statement wrapped in a javascript function
*/
protected function ensureFunction($javascript)
diff --git a/framework/Web/UI/WebControls/TSlider.php b/framework/Web/UI/WebControls/TSlider.php
index da2189cb..f453e3ac 100644
--- a/framework/Web/UI/WebControls/TSlider.php
+++ b/framework/Web/UI/WebControls/TSlider.php
@@ -457,7 +457,7 @@ class TSlider extends TWebControl implements IPostBackDataHandler, IDataRenderer
$options['axis'] = strtolower($this->getDirection());
$options['maximum'] = $maxValue;
$options['minimum'] = $minValue;
- $options['range'] = 'javascript:$R('.$minValue.",".$maxValue.")";
+ $options['range'] = TJavascript::quoteFunction('$R('.$minValue.",".$maxValue.")");
$options['sliderValue'] = $this->getValue();
$options['disabled'] = !$this->getEnabled();
$values=$this->getValues();
@@ -520,7 +520,7 @@ class TSliderClientScript extends TClientSideOptions
*/
public function setOnChange($javascript)
{
- $code="javascript: function (value) { {$javascript} }";
+ $code=TJavascript::quoteFunction("function (value) { {$javascript} }");
$this->setFunction('onChange', $code);
}
@@ -537,7 +537,7 @@ class TSliderClientScript extends TClientSideOptions
*/
public function setOnSlide($javascript)
{
- $code="javascript: function (value) { {$javascript} }";
+ $code=TJavascript::quoteFunction("function (value) { {$javascript} }");
$this->setFunction('onSlide', $code);
}
diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php
index 5f6a59ce..f3164d86 100644
--- a/framework/Web/UI/WebControls/TValidationSummary.php
+++ b/framework/Web/UI/WebControls/TValidationSummary.php
@@ -475,9 +475,8 @@ class TClientSideValidationSummaryOptions extends TClientSideOptions
}
/**
- * Ensure the string is a valid javascript function. If the string begins
- * with "javascript:" valid javascript function is assumed, otherwise the
- * code block is enclosed with "function(summary, validators){ }" block.
+ * Ensure the string is a valid javascript function. The code block
+ * is enclosed with "function(summary, validators){ }" block.
* @param string javascript code.
* @return string javascript function code.
*/