Example #1
0
 /**
  * Registers the assets for [[TabsX]] widget.
  */
 public function registerAssets()
 {
     $view = $this->getView();
     TabsXAsset::register($view);
     if ($this->printable) {
         $view->registerCss('@media print { .tab-content.printable > .tab-pane { display: block; opacity: 1; }}');
     }
     $id = 'jQuery("#' . $this->containerOptions['id'] . '")';
     $this->registerPlugin($this->pluginName, $id);
     if ($this->enableStickyTabs) {
         StickyTabsAsset::register($view);
         $opts = Json::encode($this->stickyTabsOptions);
         $id = 'jQuery("#' . $this->containerOptions['id'] . '>.nav")';
         $view->registerJs("{$id}.stickyTabs({$opts});");
     }
 }
Example #2
0
 /**
  * Registers the needed assets
  */
 public function registerAssets()
 {
     $view = $this->getView();
     TabsXAsset::register($view);
     $id = 'jQuery("#' . $this->containerOptions['id'] . '")';
     $this->registerPlugin($this->pluginName, $id);
     if ($this->enableStickyTabs) {
         StickyTabsAsset::register($view);
         $opts = Json::encode($this->stickyTabsOptions);
         $view->registerJs("{$id}.stickyTabs({$opts});");
     }
 }