<?php
/**
* TDropContainer class file
- *
+ *
* @author Christophe BOULAIN (Christophe.Boulain@gmail.com)
* @copyright Copyright © 2008, PradoSoft
- * @license http://www.pradosoft.com/license
- * @version $Id: TDropContainer.php 3159 2012-2013 PradoSoft
- * @license http://www.pradosoft.com/license
- * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $
+ * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
+ * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
* @package System.Web.UI.ActiveControls
*/
/**
* TDropContainer is a panel where TDraggable controls can be dropped.
+ *
+ * Warning: this class is deprecatd and will be removed in a future release.
+ * We suggest you to investigate using {@link TJuiDroppable} instead.
+ *
* 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.
- *
+ * 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 © 2008, PradoSoft
- * @license http://www.pradosoft.com/license
- * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $
+ * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
* @package System.Web.UI.ActiveControls
+ * @deprecated Use TJuiDroppable instead
*/
-class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHandler
-{
+class TDropContainer extends TPanel implements IActiveControl, ICallbackEventHandler
+{
private $_container=null;
-
+
/**
* Creates a new callback control, sets the adapter to
* TActiveControlAdapter. If you override this class, be sure to set the
{
$this->setViewState('Accepts', TPropertyValue::ensureArray($value), '');
}
-
+
/**
* Sets the Css class name used when a draggble element is hovering
* over this container.
{
return $this->getViewState('HoverClass', '');
}
-
-
+
+
/**
* Raises callback event. This method is required bu {@link ICallbackEventHandler}
* interface.
$this->onDrop($param->getCallbackParameter());
$this->onCallback($param);
}
-
+
/**
- * Raises the onDrop event.
+ * Raises the onDrop event.
* The drop parameters are encapsulated into a {@link TDropContainerEventParameter}
- *
+ *
* @param object $dropControlId
*/
public function onDrop ($dropParams)
{
$this->raiseEvent('OnDrop', $this, new TDropContainerEventParameter ($dropParams));
-
+
}
-
+
/**
* This method is invoked when a callback is requested. The method raises
* 'OnCallback' event to fire up the event handlers. If you override this
{
$this->raiseEvent('OnCallback', $this, $param);
}
-
+
/**
* Gets the post back options for this textbox.
* @return array
$options['hoverclass'] = $this->getHoverCssClass();
return $options;
}
-
+
/**
* Gets the name of the javascript class responsible for performing postback for this control.
* This method overrides the parent implementation.
protected function getClientClassName()
{
return 'Prado.WebUI.DropContainer';
- }
+ }
/**
* Registers clientscripts
$this->getActiveControl()->registerCallbackClientScript(
$this->getClientClassName(), $this->getPostBackOptions());
}
-
+
/**
* Creates child control
* Override parent implementation to create a container which will contain all
parent::getControls()->add($this->_container);
}
}
-
+
/**
* Override parent implementation to return the container control collection.
*
$this->ensureChildControls();
return $this->_container->getControls();
}
-
+
/**
* Renders and replaces the panel's content on the client-side.
* When render() is called before the OnPreRender event, such as when render()
$this->getPage()->getAdapter()->registerControlToRender($this->_container,$writer);
}
}
-
+
}
/**
* TDropContainerEventParameter class
- *
+ *
* TDropContainerEventParameter encapsulate the parameter
* data for <b>OnDrop</b> event of TDropContainer components
- *
+ *
* @author Christophe BOULAIN (Christophe.Boulain@ceram.fr)
* @copyright Copyright © 2008, PradoSoft
- * @license http://www.pradosoft.com/license
- * @version $Id: TDropContainer.php 3285 2013-04-11 07:28:07Z ctrlaltca $
+ * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
* @package System.Web.UI.ActiveControls
*/
class TDropContainerEventParameter extends TEventParameter