Cjuidraggable enables drag-and-drop functionality for other UI components that contain it, encapsulating JUI draggable plug-ins.
To enable a UI component to be dragged and dropped, the following are the basic uses of cjuidraggable:
<?php $this->beginwidget ('
zii.widgets.jui.CJuiDraggable ', Array ('
options ' =>array (
' Cursor ' => ' move ',
),
' Htmloptions ' =>array (
' style ' => ' width:200px;
height:200px; padding:5px; Border:none solid #e3e3e3;
Background: #0 '
))
;
Anything between Beginwidget and Endwidget is draggable.
Echo ' endwidget ();
? >
All content contained between Beginwidget and Endwidget can support drag-and-drop, and the Htmloptions section defines the size of UI components that need to support drag-and-drop. This example uses a drag-and-drop image.
See a full set of tutorials: http://www.bianceng.cn/webkf/PHP/201301/35265.htm
This example downloads: Http://www.imobilebbs.com/download/yii/JuiDraggableDemo.zip