tag-widget

Tag widget
12 followers

A tag form, use it with taggable behvior

Resources

Documentation

Requirements

Change Log

August 11, 2010

  • Initial release.

Total 2 comments

#11180 report it
Mirocow at 2012/12/23 07:34pm
My fix

replace all into

$tag_it_js=Yii::app()->getAssetManager()->publish($tag_it.'/tag-it.js');
$tag_it_css=Yii::app()->getAssetManager()->publish($tag_it.'/tag-it.css');
 
Yii::app()->clientScript
  //->registerCoreScript('jquery') FIX
  ->registerCoreScript('jquery.ui')
  ->registerScriptFile($tag_it_js)
  ->registerCssFile($tag_it_css)
  ->registerScript($id,'
    $("#'.$id.'").tagit({
        tags: '.$tags.',
        url: "'.$url.'"
    });
', CClientScript::POS_READY);

$tag_it - it`s my variable from widget

public function run()
    {
        $this->tags = json_encode($this->tags);
        // this method is called by CController::endWidget()
        $this->render('TagView', array(
            'id' => $this->id,
            'tags' => $this->tags,
            'url' => $this->url,
            'tag_it' => dirname(__FILE__),
            'title' => $this->title,
        ));
    }
#10549 report it
xtranophilist at 2012/11/04 03:59am
FIx that works for me

In the file TagView.php, delete the line

$jui=Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.vendors.jui').'/js/jquery-ui.min.js');

And replace

$cs->registerScriptFile($jui);

with

$cs->registerCoreScript('jquery.ui');

Leave a comment

Please to leave your comment.

Create extension
Downloads