Css not applied in fancybox on plugin

I use the yii tokeninput plugin Yii tokeninput for autocomplete. If I use it on the page, its css works, but if I use it in fancybox, then css is not applied.

Controller code

echo $this->renderPartial('profile/_user_message',array('model'=>$saveMessage),false,true);Yii::app()->end(); 

Code view

 <?php $prePopulate = null; $processPrePopulate = false; if($prePopulate) $processPrePopulate = true; $this->widget('ext.tokeninput.TokenInput', array( 'model' => $model, 'attribute' => 'TARGET_USER_IDS', 'url'=>$this->createUrl('user/search'), 'options' => array( 'allowCreation' => false, 'preventDuplicates' => true, // 'resultsFormatter' => 'js:function(item){ return "<li><p>" + item.name + "</p></li>" }', 'theme' => 'facebook', 'prePopulate' => $prePopulate, 'processPrePopulate' => $processPrePopulate, ) )); ?> 
+4
source share
1 answer

The Toleninput extension includes a css file on any page automatically, but it does not include a css file in fancybox. I don’t know what the reason is, so I include this css file on my parent page, it solved my problem.

 $assetUrl =Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('ext.tokeninput.assets')); Yii::app()->clientScript->registerCssFile($assetUrl.'/css/token-input-facebook.css'); 
0
source

All Articles