Heim  >  Artikel  >  Backend-Entwicklung  >  Yii Framework 开发教程Zii组件-Sortable示例_PHP教程

Yii Framework 开发教程Zii组件-Sortable示例_PHP教程

WBOY
WBOYOriginal
2016-07-14 10:07:58939Durchsuche

CJuiSortable显示一个列表,列表中的列表项可以通过拖放重新调整顺序,它封装了 JUI Sortable插件。

 
其基本用法如下:
 
 
[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',
),
));
?>
 
 
201212129015

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/477818.htmlTechArticleCJuiSortable显示一个列表,列表中的列表项可以通过拖放重新调整顺序,它封装了 JUI Sortable插件。 其基本用法如下: [php] ?php Yii::app()-client...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn