diff options
author | Daniel <darthdaniel85@gmail.com> | 2013-11-22 15:35:07 -0500 |
---|---|---|
committer | Daniel <darthdaniel85@gmail.com> | 2013-11-22 15:35:07 -0500 |
commit | efde949d00b808f55710abbd3d82ceb490545116 (patch) | |
tree | 25dd2d54b1432bb3317e6f3cbdc326bf5f48a355 /framework/Web/UI | |
parent | ab6effd64caefa732ef0994d6c3048f5cd474bf6 (diff) | |
parent | 0dfd57339fe3c92103767b556c9b20002323df56 (diff) |
Merge branch 'jquery' of https://github.com/pradosoft/prado into jquery
Diffstat (limited to 'framework/Web/UI')
-rwxr-xr-x | framework/Web/UI/ActiveControls/TActiveDatePicker.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/TClientScriptManager.php | 5 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDatePicker.php | 6 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TSlider.php | 2 |
4 files changed, 6 insertions, 9 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveDatePicker.php b/framework/Web/UI/ActiveControls/TActiveDatePicker.php index bfac83a0..279739a8 100755 --- a/framework/Web/UI/ActiveControls/TActiveDatePicker.php +++ b/framework/Web/UI/ActiveControls/TActiveDatePicker.php @@ -139,7 +139,7 @@ class TActiveDatePicker extends TDatePicker implements ICallbackEventHandler, I $cs->registerPradoScript("activedatepicker"); } - protected function registerCalendarClientScriptPost() + protected function renderClientControlScript($writer) { $cs = $this->getPage()->getClientScript(); if(!$cs->isEndScriptRegistered('TDatePicker.spacer')) diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index 80a71ea0..a9f6c5b4 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -340,11 +340,10 @@ class TClientScriptManager extends TApplicationComponent */ public function registerFocusControl($target) { - $this->registerPradoScriptInternal('effects'); + $this->registerPradoScriptInternal('jquery'); if($target instanceof TControl) $target=$target->getClientID(); - $id = TJavaScript::quoteString($target); - $this->_endScripts['prado:focus'] = 'new Effect.ScrollTo('.$id.'); Prado.Element.focus('.$id.');'; + $this->_endScripts['prado:focus'] = 'new Prado.Element.scrollTo(\''.$target.'\'); jQuery(\'#'.$target.'\').focus();'; $params=func_get_args(); $this->_page->registerCachingAction('Page.ClientScript','registerFocusControl',$params); diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index b5ed8a86..275fc557 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -428,7 +428,7 @@ class TDatePicker extends TTextBox $this->renderDropDownListCalendar($writer); if($this->hasDayPattern()) { - $this->registerCalendarClientScriptPost(); + $this->renderClientControlScript($writer); $this->renderDatePickerButtons($writer); } } @@ -850,10 +850,8 @@ class TDatePicker extends TTextBox { parent::addAttributesToRender($writer); $writer->addAttribute('id',$this->getClientID()); - $this->registerCalendarClientScriptPost(); } - /** * Registers the javascript code to initialize the date picker. */ @@ -866,7 +864,7 @@ class TDatePicker extends TTextBox } } - protected function registerCalendarClientScriptPost() + protected function renderClientControlScript($writer) { if($this->getShowCalendar()) { diff --git a/framework/Web/UI/WebControls/TSlider.php b/framework/Web/UI/WebControls/TSlider.php index dcf34bfc..a07c995f 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'] = TJavascript::quoteJsLiteral('$R('.$minValue.",".$maxValue.")"); + $options['range'] = array($minValue, $maxValue); $options['sliderValue'] = $this->getValue(); $options['disabled'] = !$this->getEnabled(); $values=$this->getValues(); |