CJuiSortable displays a list whose items can be reordered by dragging and dropping. It encapsulates the JUI Sortable plug-in.
The basic usage is as follows:
[php]
Yii::app()->clientScript->registerCss('sortable', "
#sortable {list-style-type: none; margin: 0; padding: 0; width: 60%;}
#sortable li {margin: 2px; padding: 4px;
border: 1px solid #e3e3e3; background: #f7f7f7}
", 'screen', CClientScript::POS_HEAD);
?>
widget('zii.widgets.jui.CJuiSortable', array(
'id'=>'sortable',
'items'=>array(
'id1'=>'Item 1',
'id2'=>'Item 2',
'id3'=>'Item 3',
),
'options'=>array(
'cursor'=>'n-resize',
),
));
?>
Yii::app()->clientScript->registerCss('sortable', "
#sortable {list-style-type: none; margin: 0; padding: 0; width: 60%;}
#sortable li {margin: 2px; padding: 4px;
border: 1px solid #e3e3e3; background: #f7f7f7}
", 'screen', CClientScript::POS_HEAD);
?>
widget('zii.widgets.jui.CJuiSortable', array(
'id'=>'sortable',
'items'=>array(
'id1'=>'Item 1',
'id2'=>'Item 2',
'id3'=>'Item 3',
),
'options'=>array(
'cursor'=>'n-resize',
),
));
?>
http://www.bkjia.com/PHPjc/477818.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477818.htmlTechArticleCJuiSortable displays a list. The list items in the list can be reordered by dragging and dropping. It encapsulates the JUI Sortable plug-in . Its basic usage is as follows: [php] ?php Yii::app()-client...