diff options
author | emkael <emkael@tlen.pl> | 2016-06-08 15:19:11 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-06-10 11:46:41 +0200 |
commit | 6ab01ff111f2aca0786f4fd45df25ea6ad9be1ca (patch) | |
tree | b8002a9239b2d4050bcc8ad48cccc39d56ffbe34 | |
parent | 90d93b09640ef2026d4450e17f9e9c5fedb76c81 (diff) |
* Prado upgraded to 3.3.1-rbd4929d
-rw-r--r-- | lib/prado/HISTORY | 9 | ||||
-rw-r--r-- | lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js | 2 | ||||
-rw-r--r-- | lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php | 6 | ||||
-rw-r--r-- | lib/prado/framework/Web/UI/TControl.php | 25 | ||||
-rw-r--r-- | lib/prado/framework/Web/UI/WebControls/TDatePicker.php | 16 |
5 files changed, 46 insertions, 12 deletions
diff --git a/lib/prado/HISTORY b/lib/prado/HISTORY index 89cea5c..58a6054 100644 --- a/lib/prado/HISTORY +++ b/lib/prado/HISTORY @@ -1,3 +1,12 @@ +Version 3.3.2 xxx, 2016 + +BUG: Issue #592 - Fix TActiveMultiView brokwn on 3.3.1 (ctrlaltca) +BUG: Issue #588 - Fix reading values of controls inside TJuiDialog (ctrlaltca) +BUG: Issue #597 - TDatePicker::getDateFromPostData selected month issue (Sachat) +ENH: Issue #591 - Support for hyphenated attributes via <prop:*></prop:*> template syntax (emkael) +ENH: Issue #594 - Added ability to check for subcontrols using isset(), empty() (jojoinside) +ENH: Allow TStyle behaviors (LCSKJ) + Version 3.3.1 April 19, 2016 BUG: Issue #540 - Fix TActiveFileUpload on IE11 (ctrlaltca) diff --git a/lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js b/lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js index 1115c3b..48481ab 100644 --- a/lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js +++ b/lib/prado/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js @@ -298,7 +298,7 @@ Prado.CallbackRequest = jQuery.klass(Prado.PostBack, if(this.options.PostInputs != false) { var form = this.getForm(); - return jQuery(form).serialize() + '&' + jQuery.param(data); + return jQuery('input, select, textarea').serialize() + '&' + jQuery.param(data); } else { var pagestate = jQuery("#"+Prado.CallbackRequestManager.FIELD_CALLBACK_PAGESTATE); if(pagestate) diff --git a/lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php b/lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php index 45c137d..ca26554 100644 --- a/lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php +++ b/lib/prado/framework/Web/UI/ActiveControls/TActiveMultiView.php @@ -92,9 +92,6 @@ class TActiveMultiView extends TMultiView implements IActiveControl */ public function setActiveViewIndex($value) { - if(parent::getActiveViewIndex() === $value) - return; - parent::setActiveViewIndex($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); @@ -106,9 +103,6 @@ class TActiveMultiView extends TMultiView implements IActiveControl */ public function setActiveView($value) { - if(parent::getActiveView() === $value) - return; - parent::setActiveView($value); if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); diff --git a/lib/prado/framework/Web/UI/TControl.php b/lib/prado/framework/Web/UI/TControl.php index be7b118..1b8a213 100644 --- a/lib/prado/framework/Web/UI/TControl.php +++ b/lib/prado/framework/Web/UI/TControl.php @@ -196,6 +196,31 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable } /** + * Checks for the existance of a property value by name or a control by ID. + * This overrides the parent implementation by allowing checking for the + * existance of a control via its ID using the following syntax, + * <code> + * $menuBarExists = isset($this->menuBar); + * </code> + * Do not call this method. This is a PHP magic method that we override + * to allow using isset() to detect if a component property is set or not. + * Note, the control must be configured in the template + * with explicit ID. If the name matches both a property and a control ID, + * the control ID will take the precedence. + * + * @param string the property name or control ID + * @return bool wether the control or property exists + * @see __get + */ + public function __isset($name) { + if(isset($this->_rf[self::RF_NAMED_OBJECTS][$name])) { + return true; + } else { + return parent::__isset($name); + } + } + + /** * @return boolean whether there is an adapter for this control */ public function getHasAdapter() diff --git a/lib/prado/framework/Web/UI/WebControls/TDatePicker.php b/lib/prado/framework/Web/UI/WebControls/TDatePicker.php index 7a164dd..a773c69 100644 --- a/lib/prado/framework/Web/UI/WebControls/TDatePicker.php +++ b/lib/prado/framework/Web/UI/WebControls/TDatePicker.php @@ -483,10 +483,19 @@ class TDatePicker extends TTextBox { $date = @getdate(); - if(isset($values[$key.'$day'])) + $pattern = $this->getDateFormat(); + $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $pattern); + + $order = $formatter->getDayMonthYearOrdering(); + + if(isset($values[$key.'$day'])) { $day = intval($values[$key.'$day']); - else + } elseif(in_array('day', $order)) { $day = $date['mday']; + } else { + $day = 1; + } if(isset($values[$key.'$month'])) $month = intval($values[$key.'$month']) + 1; @@ -502,9 +511,6 @@ class TDatePicker extends TTextBox $date = $s->getTimeStamp(0, 0, 0, $month, $day, $year); //$date = @mktime(0, 0, 0, $month, $day, $year); - $pattern = $this->getDateFormat(); - $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $pattern); return $formatter->format($date); } |