/**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Yii::app()->bootstrap->registerAlert();
     if (!isset($this->htmlOptions['id'])) {
         $this->htmlOptions['id'] = $this->getId();
     }
 }
Esempio n. 2
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->registerScriptFile('jquery.ui.bootmodal.js');
     $id = $this->getId();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     $options = !empty($this->options) ? CJavaScript::encode($this->options) : '';
     $this->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').bootModal({$options});");
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . PHP_EOL;
 }
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Yii::app()->bootstrap->registerModal();
     if (!isset($this->htmlOptions['id'])) {
         $this->htmlOptions['id'] = $this->getId();
     }
     if (isset($this->htmlOptions['class'])) {
         $this->htmlOptions['class'] .= ' modal';
     } else {
         $this->htmlOptions['class'] = 'modal';
     }
     if (Yii::app()->bootstrap->isPluginRegistered(Bootstrap::PLUGIN_TRANSITION)) {
         $this->htmlOptions['class'] .= ' fade';
     }
     echo CHtml::openTag('div', $this->htmlOptions) . PHP_EOL;
 }
Esempio n. 4
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->registerScriptFile('jquery.ui.bootalert.js');
 }
Esempio n. 5
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     echo strtr($this->template, array('{dt}' => '<div class="topbar">', '{dti}' => '<div class="topbar-inner">', '{c}' => '<div class="' . $this->container_class . '">', '{title}' => CHtml::link(Yii::app()->name, $this->homeUrl, array('class' => 'brand')), '{nav1}' => $this->menu_nav1, '{nav2}' => $this->menu_nav2, '{search}' => $this->search, '{cdt}' => '</div> <!-- topbar -->', '{cdti}' => '</div> <!-- topbar-inner -->', '{cc}' => '</div> <!-- ' . $this->container_class . ' -->'));
     parent::run();
 }
Esempio n. 6
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->registerScriptFile('jquery.ui.boottwipsy.js');
     $this->registerScriptFile('jquery.ui.bootpopover.js');
 }