Yii echmultiselect在控制台上显示错误,无法正常工作 [英] Yii echmultiselect showing error on console and not working

查看:68
本文介绍了Yii echmultiselect在控制台上显示错误,无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里选项3 "rel =" nofollow noreferrer> https://www.yiiframework.com/extension/echmultiselect#3-use-as-a-filter-in-cgridview 在我的Yii项目中添加多选下拉列表.但它显示了,

I was following the Option no 3 here https://www.yiiframework.com/extension/echmultiselect#3-use-as-a-filter-in-cgridview to add multiselect dropdown on my Yii project. But it is showing,

jquery.js:6920未捕获的TypeError:jQuery.easing [this.easing]不是 功能 在init.run(jquery.js:6920)

jquery.js:6920 Uncaught TypeError: jQuery.easing[this.easing] is not a function at init.run (jquery.js:6920)

在我的网格视图上,该列必须是多个选择复选框,

On my cgridview, this is the column that has to be multiple select checkbox,

array (
                'name'=>'brand_id',
                'filter'=> $this->widget('ext.EchMultiSelect.EchMultiSelect', array(
                    'model' => $model,
                    'dropDownAttribute' => 'brand_id',
                    'data' => CHtml::listData(Brands::model()->findAll(array("order" => "sortOrder")), 'id', 'name'),
                    'options' => array('buttonWidth' => 80, 'ajaxRefresh' => true,'filter'=>true),
                ),
                    true // capture output; needed so the widget displays inside the grid
                ),
           ),

在我的布局上,

我已经包含了jQuery,

I've included the jquery,

<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>

下拉页面:

由于jQuery.easing [this.easing]不是函数错误,因此根据此处的建议,多选功能不起作用:https://stackoverflow.com/a/12592301/1138192 我也添加了jquery用户界面,但即使它破坏了现有的下拉菜单,它也无法正常工作.

Because of that jQuery.easing[this.easing] is not a function error the multi-select functionality is not working, as per the suggestion here: https://stackoverflow.com/a/12592301/1138192 I've added the jquery UI also but it doesn't work even it breaks the existing dropdown.

控制台错误:

推荐答案

问题出在jquery.multiselect.js(倒置了(至少对于当前的jQuery版本而言):

The problem is in jquery.multiselect.js (EchMultiSelect-v1.3) as the effect method arguments are inverted (at least for the current jQuery version):

.show( effect, speed ).hide( effect, speed )应该用正确的顺序.show( speed, effect ).hide( speed, effect )代替.

.show( effect, speed ) and .hide( effect, speed ) on lines 566, 573, 600 should be replaced by the correct order .show( speed, effect ) and .hide( speed, effect ).

这篇关于Yii echmultiselect在控制台上显示错误,无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆