/** * @inheritdoc */ public function init() { parent::init(); $this->registerPlugin('button'); Html::addCssClass($this->options, 'btn-group'); $this->options['data-toggle'] = 'buttons'; }
public function init() { parent::init(); $attrs = array(); CHtml::resolveNameID($this->model, $this->source, $attrs); $options = CJavaScript::encode(array('source' => $attrs['id'], 'destination' => $this->id, 'urlSeparator' => $this->divider)); Yii::app()->clientScript->registerScriptFile($this->assets . '/jquery.synctranslit.js')->registerScriptFile($this->assets . '/alias.js')->registerScript($this->id . '_alias', "\$('#{$this->id}').alias({$options});"); }
public function init() { parent::init(); $options = CJavaScript::encode(array( 'no_results_text' => "Выберите один из вариантов", 'allow_single_deselect'=> true, 'onChange' => $this->onchange )); Yii::app()->clientScript->registerScriptFile($this->assets . '/chosen.jquery.js')->registerCssFile( $this->assets . '/chosen.css')->registerScript( $this->id . '_chosen', "$('#{$this->id}').chosen($options);"); }
public function init() { parent::init(); $options = CJavaScript::encode(array( 'checkedLabel' => $this->checkedLabel, 'uncheckedLabel' => $this->uncheckedLabel, 'onChange' => $this->onChange, )); Yii::app()->clientScript ->registerScriptFile($this->assets . '/iphone-style-checkboxes.js') ->registerCssFile($this->assets . '/style.css')->registerScript( $this->id . '_iphone_checkbox', "$('#{$this->id}').iphoneStyle($options);"); }