52 'whenAddingTag' => null,
56 'definePopover' => null,
60 'pressedReturn' => null,
62 'pressedDelete' => null,
64 'pressedDown' => null,
121 $this->options = CMap::mergeArray(
123 'suggestions' => $this->suggestions,
124 'restrictTo' => $this->restrictTo,
125 'exclude' => $this->exclude,
126 'displayPopovers' => $this->displayPopovers,
127 'tagClass' => $this->tagClass,
128 'tagData' => $this->tagData,
129 'popoverData' => $this->popoverData
142 list($name, $id) = $this->resolveNameID();
160 if ($this->hasModel()) {
162 echo $this->form->hiddenField($this->model, $this->attribute);
164 echo CHtml::activeHiddenField($this->model, $this->attribute);
168 echo CHtml::hiddenField($name, $this->
value);
171 $this->htmlOptions[
'id'] =
'tags_'.$id;
172 if(isset($this->htmlOptions[
'class']) && !empty($this->htmlOptions[
'class']))
173 $this->htmlOptions[
'class'] .=
' tag-list';
175 $this->htmlOptions[
'class'] =
'tag-list';
177 echo CHtml::openTag(
'div', $this->htmlOptions);
178 echo
"<div class='tags'></div>";
179 echo CHtml::closeTag(
'div');
194 $booster->registerPackage(
'bootstrap-tags');
196 $options = !empty($this->options) ? CJavaScript::encode($this->options) :
'';
198 Yii::app()->getClientScript()->registerScript(
199 __CLASS__ .
'#' . $this->getId(),
200 "jQuery('#tags_{$id}').tags({$options});"