当前位置:Gxlcms >
PHP教程 >
Yii-视图-CListView操作扩展用法(zyd)_PHP教程
Yii-视图-CListView操作扩展用法(zyd)_PHP教程
时间:2021-07-01 10:21:17
帮助过:7人阅读
视图文件
[html]
getCmpCat('移动到分类'),array('class'=>'s_ipt w_120 removedropcatbatch'));
$remove_drop = CHtml::dropDownList('catlist','',CmpCat::model()->getCmpCat('添加到分类'),array('class'=>'s_ipt w_120 adddropcatbatch'))
?>
widget('zii.widgets.CListView', array(
'dataProvider'=>$model->search(),
'itemView'=>'product_saleing_view',
'emptyText'=>'暂时没有数据',
'selectAll'=>array('ids[]','id[]'),
'artLink'=>array(
//首页推荐
array(Yii::t('cmp','Recommended home'),'/company/product/recommend','确认推荐选中产品到首页!'),
//取消推荐
array(Yii::t('cmp','un Recommended home'),'/company/product/uncommend','确认取消推荐选中产品!'),
//下架
array(Yii::t('cmp','downshelf'),'/company/product/downshelf','确认上架选中产品!'),
),
'batchItem'=>array(
//移动到分类
$add_drop,
//添加到分类
$remove_drop,
),
));
?>
jq代码
[html]
全选反选
[html]
'chk f_l chkitem','onclick'=>'CheckList("ids[]","id[]")','value'=>$data->zp_id))?>
效果图
1.
2.
http://www.bkjia.com/PHPjc/477707.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/477707.htmlTechArticle视图文件 [html] ?php $add_drop = CHtml::dropDownList(catlist,,CmpCat::model()-getCmpCat(移动到分类),array(class=s_ipt w_120 removedropcatbatch)); $remove_drop = CHtml::drop...