From 0f332e6564ed67ef7eb4d715ce3bcb5ff54c50cf Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Wed, 24 Jul 2013 12:22:49 +0200 Subject: Upgrade to newly released 3.2.2 --- .../Web/UI/ActiveControls/TActiveLinkButton.php | 37 +++++++++++++++++--- framework/Web/UI/ActiveControls/TDraggable.php | 40 ++++++++++++++++++++-- framework/Web/UI/ActiveControls/TDropContainer.php | 37 ++++++++++++++++++-- 3 files changed, 104 insertions(+), 10 deletions(-) (limited to 'framework/Web/UI/ActiveControls') diff --git a/framework/Web/UI/ActiveControls/TActiveLinkButton.php b/framework/Web/UI/ActiveControls/TActiveLinkButton.php index b95dad88..d8a8ffcb 100644 --- a/framework/Web/UI/ActiveControls/TActiveLinkButton.php +++ b/framework/Web/UI/ActiveControls/TActiveLinkButton.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: TActiveLinkButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ + * @version $Id: TActiveLinkButton.php 3292 2013-05-31 08:51:42Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ @@ -29,7 +29,7 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); * will update the link text upon callback response completion. * * @author Wei Zhuo - * @version $Id: TActiveLinkButton.php 3245 2013-01-07 20:23:32Z ctrlaltca $ + * @version $Id: TActiveLinkButton.php 3292 2013-05-31 08:51:42Z ctrlaltca $ * @package System.Web.UI.ActiveControls * @since 3.1 */ @@ -118,9 +118,36 @@ class TActiveLinkButton extends TLinkButton implements IActiveControl, ICallback { parent::addAttributesToRender($writer); $writer->addAttribute('id',$this->getClientID()); - $this->renderLinkButtonHref($writer); - $this->getActiveControl()->registerCallbackClientScript( - $this->getClientClassName(), $this->getPostBackOptions()); + + if($this->getEnabled(true)) + { + $this->getActiveControl()->registerCallbackClientScript( + $this->getClientClassName(), $this->getPostBackOptions()); + } + } + + /** + * Ensures that the anchor is rendered correctly when its Enabled property + * changes in a callback + * @param bool enabled + */ + public function setEnabled($value) + { + parent::setEnabled($value); + if($this->getActiveControl()->canUpdateClientSide()) + { + if($this->getEnabled(true)) + { + $nop = "javascript:;//".$this->getClientID(); + $this->getPage()->getCallbackClient()->setAttribute($this, 'href', $nop); + + $this->getActiveControl()->registerCallbackClientScript( + $this->getClientClassName(), $this->getPostBackOptions()); + + } else { + $this->getPage()->getCallbackClient()->setAttribute($this, 'href', false); + } + } } /** diff --git a/framework/Web/UI/ActiveControls/TDraggable.php b/framework/Web/UI/ActiveControls/TDraggable.php index 23687207..df92bec5 100755 --- a/framework/Web/UI/ActiveControls/TDraggable.php +++ b/framework/Web/UI/ActiveControls/TDraggable.php @@ -6,7 +6,27 @@ * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license * @package System.Web.UI.ActiveControls - * @version $Id: TDraggable.php 3247 2013-01-07 21:38:18Z ctrlaltca $ + * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ + */ + +/** + * TDraggable is a control which can be dragged + * + * This control will make "draggable" control. + * Properties : + * + * {@link setGhosting Ghosting} : If set to "Ghosting" or "True", the dragged element will be cloned, and the clone will be dragged. + * If set to "SuperGhosting", the element will be cloned, and attached to body, so it can be dragged outside of its parent. + * If set to "None" of "False" (default), the element itself is dragged + * {@link setRevert Revert}: Set to True if you want your dragged element to revert to its initial position if not dropped on a valid area. + * {@link setConstraint Constraint}: Set this to Horizontal or Vertical if you want to constraint your move in one direction. + * {@link setHandle Handle}: + * + * @author Christophe BOULAIN (Christophe.Boulain@gmail.com) + * @copyright Copyright © 2008, PradoSoft + * @license http://www.pradosoft.com/license + * @package System.Web.UI.ActiveControls + * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ */ class TDraggable extends TPanel { @@ -193,7 +213,21 @@ class TDraggable extends TPanel * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license * @package System.Web.UI.ActiveControls - * @version $Id: TDraggable.php 3247 2013-01-07 21:38:18Z ctrlaltca $ + * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ + */ +class TDraggableConstraint extends TEnumerable +{ + const None='None'; + const Horizontal='Horizontal'; + const Vertical='Vertical'; +} + +/** + * @author Christophe BOULAIN (Christophe.Boulain@gmail.com) + * @copyright Copyright © 2008, PradoSoft + * @license http://www.pradosoft.com/license + * @package System.Web.UI.ActiveControls + * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ */ class TDraggableGhostingOptions extends TEnumerable { @@ -207,7 +241,7 @@ class TDraggableGhostingOptions extends TEnumerable * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license * @package System.Web.UI.ActiveControls - * @version $Id: TDraggable.php 3247 2013-01-07 21:38:18Z ctrlaltca $ + * @version $Id: TDraggable.php 3285 2013-04-11 07:28:07Z ctrlaltca $ */ class TDraggableRevertOptions extends TEnumerable { diff --git a/framework/Web/UI/ActiveControls/TDropContainer.php b/framework/Web/UI/ActiveControls/TDropContainer.php index e603adf9..43e8017c 100755 --- a/framework/Web/UI/ActiveControls/TDropContainer.php +++ b/framework/Web/UI/ActiveControls/TDropContainer.php @@ -7,7 +7,40 @@ * @license http://www.pradosoft.com/license * @version $Id: TDropContainer.php 3159 2012-2013 PradoSoft * @license http://www.pradosoft.com/license - * @version $Id: TDropContainer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ + * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $ + * @package System.Web.UI.ActiveControls + */ + +/** + * Load active control adapter. + */ +Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter'); +/** + * Load active panel. + */ +Prado::using('System.Web.UI.ActiveControls.TActivePanel'); + + +/** + * TDropContainer is a panel where TDraggable controls can be dropped. + * When a TDraggable component is dropped into a TDropContainer, the {@link OnDrop OnDrop} event is raised. + * The {@link TDropContainerEventParameter} param will contain the dropped control. + * + * Properties : + * + * {@link setAcceptCssClass AcceptCssClass} : a coma delimited classname of elements that the drop container can accept. + * {@link setHoverCssClass HoverCssClass}: CSS classname of the container when a draggable element hovers over the container. + * + * Events: + * + * {@link OnDrop OnDrop} : raised when a TDraggable control is dropped. The dropped control id is encapsulated in the event parameter, + * as well as mouse coordinates and key modifiers status + * + * + * @author Christophe BOULAIN (Christophe.Boulain@gmail.com) + * @copyright Copyright © 2008, PradoSoft + * @license http://www.pradosoft.com/license + * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHandler @@ -225,7 +258,7 @@ class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHan * @author Christophe BOULAIN (Christophe.Boulain@ceram.fr) * @copyright Copyright © 2008, PradoSoft * @license http://www.pradosoft.com/license - * @version $Id: TDropContainer.php 3245 2013-01-07 20:23:32Z ctrlaltca $ + * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $ * @package System.Web.UI.ActiveControls */ class TDropContainerEventParameter extends TEventParameter -- cgit v1.2.3