summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls
diff options
context:
space:
mode:
authorCiro Mattia Gonano <ciromattia@gmail.com>2013-07-24 12:22:49 +0200
committerCiro Mattia Gonano <ciromattia@gmail.com>2013-07-24 12:22:49 +0200
commit0f332e6564ed67ef7eb4d715ce3bcb5ff54c50cf (patch)
tree00cecb80224872c25e712a59b417c5f1dff240cb /framework/Web/UI/ActiveControls
parent3c208455c7775838e795909923536a7de13d9c5c (diff)
Upgrade to newly released 3.2.23.2.2
Diffstat (limited to 'framework/Web/UI/ActiveControls')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveLinkButton.php37
-rwxr-xr-xframework/Web/UI/ActiveControls/TDraggable.php40
-rwxr-xr-xframework/Web/UI/ActiveControls/TDropContainer.php37
3 files changed, 104 insertions, 10 deletions
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 &copy; 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 <weizhuo[at]gmail[dot]com>
- * @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 &copy; 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 :
+ *
+ * <b>{@link setGhosting Ghosting}</b> : 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
+ * <b>{@link setRevert Revert}</b>: Set to True if you want your dragged element to revert to its initial position if not dropped on a valid area.
+ * <b>{@link setConstraint Constraint}</b>: Set this to Horizontal or Vertical if you want to constraint your move in one direction.
+ * <b>{@link setHandle Handle}</b>:
+ *
+ * @author Christophe BOULAIN (Christophe.Boulain@gmail.com)
+ * @copyright Copyright &copy; 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 &copy; 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 &copy; 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 &copy; 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 :
+ *
+ * <b>{@link setAcceptCssClass AcceptCssClass}</b> : a coma delimited classname of elements that the drop container can accept.
+ * <b>{@link setHoverCssClass HoverCssClass}</b>: CSS classname of the container when a draggable element hovers over the container.
+ *
+ * Events:
+ *
+ * <b>{@link OnDrop OnDrop}</b> : 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 &copy; 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 &copy; 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