Issue
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 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
),
),
On my layout,
I've included the jquery,
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
Dropdown page:
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.
Error on the console:
Solution
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 )
and .hide( effect, speed )
on lines 566, 573, 600 should be replaced by the correct order .show( speed, effect )
and .hide( speed, effect )
.
Answered By - Fabian Horlacher
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.