Exemple #1
0
 /**
  * Registers the needed assets
  */
 public function registerAssets()
 {
     $view = $this->getView();
     TabsXAsset::register($view);
     $this->registerPlugin($this->_pluginName, 'jQuery("#' . $this->containerOptions['id'] . '")');
 }
Exemple #2
0
 /**
  * Registers the needed assets
  */
 public function registerAssets()
 {
     $view = $this->getView();
     TabsXAsset::register($view);
     $id = $this->containerOptions['id'];
     if (!empty($this->pluginEvents)) {
         foreach ($this->pluginEvents as $event => $handler) {
             $function = new JsExpression($handler);
             $script .= "{$id}.on('{$event}', {$function});\n";
         }
     }
 }
Exemple #3
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});");
     }
 }
Exemple #4
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});");
     }
 }