Example #1
0
 /**
  * Run the widget
  */
 public function run()
 {
     $this->publishAssets();
     $this->registerClientScripts();
     $this->registerCssFile($this->cssFile);
     $htmlOptions['id'] = 'nav-container';
     echo CHtml::openTag('div', $htmlOptions) . "\n";
     $htmlOptions['id'] = 'nav-bar';
     echo CHtml::openTag('div', $htmlOptions) . "\n";
     parent::run();
     echo CHtml::closeTag('div');
     echo CHtml::closeTag('div');
 }
Example #2
0
    public function run()
    {
        $items = $this->items;
        foreach ($items as $item) {
            $this->items = $item['items'];
            if (count($this->items) == 0) {
                continue;
            }
            echo '<div class="panel panel-default">
              <a class="panel-heading collapsed" href="#smm-' . $item['id_object'] . '" data-toggle="collapse">' . $item['label'] . '</a>
              <div id="smm-' . $item['id_object'] . '" class="collapse panel-collapse">';
            parent::run();
            echo '
              </div>
            </div>
';
        }
    }
Example #3
0
 function run()
 {
     if (array_key_exists('class', $this->htmlOptions)) {
         $this->htmlOptions['class'] .= " sf-menu";
     } else {
         $this->htmlOptions['class'] = " sf-menu";
     }
     $cs = Yii::app()->getClientScript();
     $id = $this->getId();
     $assets = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets');
     $cs->registerCssFile($assets . '/css/superfish.css');
     if ($this->vertical) {
         $cs->registerCssFile($assets . '/css/superfish-vertical.css');
         $this->htmlOptions['class'] .= " sf-vertical";
     }
     if ($this->navbar) {
         $cs->registerCssFile($assets . '/css/superfish-navbar.css');
         $this->htmlOptions['class'] .= " sf-navbar";
     }
     if ($this->hoverIntent) {
         $cs->registerScriptFile($assets . '/js/hoverIntent.js');
     }
     $cs->registerScriptFile($assets . '/js/superfish.js');
     $options = $this->makeOptions();
     $js = "jQuery('#{$id}')";
     if ($this->supersubs['enable']) {
         $cs->registerScriptFile($assets . '/js/supersubs.js');
         //make subpersubs options
         $supersubsOptions = CJavaScript::encode($this->supersubs['options']);
         $js .= ".supersubs({$supersubsOptions})";
     }
     $js .= ".superfish({$options});";
     $cs->registerScript(__CLASS__ . '#' . $id, $js);
     parent::run();
 }
Example #4
0
 /**
  * Run the widget
  */
 public function run()
 {
     $this->publishAssets();
     $this->registerClientScripts();
     parent::run();
 }
Example #5
0
 /**
  * Menu running
  */
 public function run()
 {
     return parent::run();
 }
Example #6
0
 /**
  * Run the widget.
  */
 public function run()
 {
     $this->registerClientScripts();
     $this->registerCssFile();
     parent::run();
 }
Example #7
0
 /**
  * Run the widget
  */
 public function run()
 {
     $this->publishAssets();
     $this->registerClientScripts();
     $this->registerCssFile($this->cssFile);
     $htmlOptions['id'] = 'nav-container';
     echo CHtml::openTag('div', $htmlOptions) . "\n";
     $htmlOptions['id'] = 'nav-bar';
     echo CHtml::openTag('div', $htmlOptions) . "\n";
     parent::run();
     $q = isset($_GET['q']) ? $_GET['q'] : '';
     echo CHtml::textField('q', $q, array('class' => 'input-small search-query pull-right', 'placeholder' => 'Pesquisa', 'id' => 'sq'));
     echo CHtml::closeTag('div');
     echo CHtml::closeTag('div');
 }
Example #8
0
 public function run()
 {
     if ($this->baseTemplate == null) {
         parent::run();
     } else {
         ob_start();
         ob_implicit_flush(false);
         parent::run();
         echo strtr($this->baseTemplate, array('{menu}' => ob_get_clean()));
     }
 }
 public function run()
 {
     parent::run();
 }
 public function run()
 {
     parent::run();
     echo EBootstrap::closeTag('div');
 }
Example #11
0
 /**
  * Runs the menu widget.
  */
 public function run()
 {
     parent::run();
     $id = $this->getId();
     Yii::app()->clientScript->registerScript(__CLASS__ . '#' . $id, "\r\n\t\t\tjQuery('#{$id} .dropdown-toggle').bind('click', function() {\r\n\t\t\t\t\$(this).parent().toggleClass('open');\r\n\t\t\t});\r\n\t\t");
 }