Exemple #1
0
 /**
  *### .init()
  *
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $classes = array('table');
     if (isset($this->type)) {
         if (is_string($this->type)) {
             $this->type = explode(' ', $this->type);
         }
         $validTypes = array(self::TYPE_STRIPED, self::TYPE_BORDERED, self::TYPE_CONDENSED);
         if (!empty($this->type)) {
             foreach ($this->type as $type) {
                 if (in_array($type, $validTypes)) {
                     $classes[] = 'table-' . $type;
                 }
             }
         }
     }
     if (!empty($classes)) {
         $classes = implode(' ', $classes);
         if (isset($this->htmlOptions['class'])) {
             $this->htmlOptions['class'] .= ' ' . $classes;
         } else {
             $this->htmlOptions['class'] = $classes;
         }
     }
 }
Exemple #2
0
 public function init()
 {
     if (!$this->data instanceof CModel) {
         throw new CException('Property "data" should be of CModel class.');
     }
     parent::init();
 }
 /**
  * Initializes the widget
  * @throws CException
  */
 public function init()
 {
     if (!$this->data instanceof CModel) {
         throw new CException('Property "data" should be of CModel class.');
     }
     $this->htmlOptions = array('class' => 'table table-bordered table-striped table-hover');
     //disable loading Yii's css for bootstrap
     $this->cssFile = false;
     parent::init();
 }
 public function init()
 {
     if (!$this->data instanceof CModel) {
         throw new CException('Property "data" should be of CModel class.');
     }
     //set bootstrap css
     if (yii::app()->editable->form === EditableConfig::FORM_BOOTSTRAP) {
         $this->htmlOptions = array('class' => 'table table-bordered table-striped table-hover');
     }
     parent::init();
 }
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $classes = array('table');
     if (isset($this->type) && !empty($this->type)) {
         if (is_string($this->type)) {
             $this->type = explode(' ', $this->type);
         }
     }
     $this->addCssClass(implode(' ', $classes));
 }
 public function init()
 {
     if (!$this->data instanceof CModel) {
         throw new CException('Property "data" should be of CModel class.');
     }
     // set bootstrap css
     /* TODO if(yii::app()->editable->form === 'bootstrap') { */
     $this->htmlOptions = array('class' => 'table table-bordered table-striped table-hover');
     // disable loading Yii's css for bootstrap
     $this->cssFile = false;
     // }
     parent::init();
 }
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $classes = array('table');
     if (!empty($this->type)) {
         if (is_string($this->type)) {
             $this->type = explode(' ', $this->type);
         }
         foreach ($this->type as $type) {
             $classes[] = 'table-' . $type;
         }
     }
     TbHtml::addCssClass($classes, $this->htmlOptions);
 }
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $classes = array('table');
     if (isset($this->type) && !empty($this->type)) {
         if (is_string($this->type)) {
             $this->type = explode(' ', $this->type);
         }
         foreach ($this->type as $type) {
             $classes[] = 'table-' . $type;
         }
     }
     $this->htmlOptions = TbHtml::addClassName(implode(' ', $classes), $this->htmlOptions);
 }
 /**
  * Init the widget
  */
 public function init()
 {
     parent::init();
     $classes = array('table');
     if ($this->bordered) {
         $classes[] = 'table-bordered';
     }
     if ($this->striped) {
         $classes[] = 'table-striped';
     }
     if ($this->condensed) {
         $classes[] = 'table-condensed';
     }
     EBootstrap::mergeClass($this->htmlOptions, $classes);
 }
Exemple #10
0
 public function init()
 {
     parent::init();
     Yii::app()->clientScript->registerCss($this->id . 'fix_detail_view', ' 
         #' . $this->id . ' .profile-info-name {width: ' . $this->label_width . 'px;}
         #' . $this->id . ' .profile-info-value {margin-left: ' . $this->label_width . 'px;min-height: 20px;}
     ');
     foreach ($this->attributes as $k => $attribute) {
         if (!isset($attribute['external_link'])) {
             continue;
         }
         if (empty($attribute['value_id'])) {
             continue;
         }
         $this->attributes[$k]['value'] .= '&nbsp;' . CHtml::link('<i class="icon-external-link"></i>', $attribute['external_link'], array('target' => '_blank', 'title' => $attribute['external_title'], 'data-toggle' => 'tooltip'));
     }
 }
Exemple #11
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $classes = array('table');
     if (isset($this->type) && !empty($this->type)) {
         if (is_string($this->type)) {
             $this->type = explode(' ', $this->type);
         }
         $validTypes = array(TbHtml::GRID_TYPE_BORDERED, TbHtml::GRID_TYPE_CONDENSED, TbHtml::GRID_TYPE_STRIPED, TbHtml::GRID_TYPE_HOVER);
         foreach ($this->type as $type) {
             if (in_array($type, $validTypes)) {
                 $classes[] = 'table-' . $type;
             }
         }
     }
     $this->htmlOptions = TbHtml::addClassName(implode(' ', $classes), $this->htmlOptions);
 }
Exemple #12
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     // Don't let Yii include its default stylesheet
     if ($this->cssFile === null) {
         $this->cssFile = false;
     }
     parent::init();
     if (is_string($this->type)) {
         $types = explode(' ', $this->type);
     } else {
         $types = $this->type;
     }
     $validTypes = array(TbHtml::DETAIL_TYPE_BORDERED, TbHtml::DETAIL_TYPE_CONDENSED, TbHtml::DETAIL_TYPE_HOVER, TbHtml::DETAIL_TYPE_STRIPED);
     // Set class names
     foreach ($types as $type) {
         if (in_array($type, $validTypes)) {
             $this->htmlOptions = TbHtml::addClassName('table-' . $type, $this->htmlOptions);
         }
     }
     $this->htmlOptions = TbHtml::addClassName('table', $this->htmlOptions);
 }
Exemple #13
0
 public function init()
 {
     parent::init();
 }
 public function init()
 {
     $this->htmlOptions = array_merge($this->htmlOptions, array('class' => 'ui-widget ui-widget-content detail-view'));
     $this->baseScriptUrl = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . '/assets/detailviewui');
     parent::init();
 }
 /**
  * Initializes the detail view.
  * This method will initialize required property values.
  */
 public function init()
 {
     //$this->_aryColumns = array_fill(1, $this->ItemColumns, $this->itemTemplate);
     $this->_init();
     return parent::init();
 }
Exemple #16
0
 public function init()
 {
     $this->baseScriptUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.widgets._base.assets.detailview'), false, -1, YII_DEBUG);
     $this->cssFile = $this->baseScriptUrl . '/detailview.css';
     parent::init();
 }
 /**
  * Init the widget
  */
 public function init()
 {
     parent::init();
     EBootstrap::mergeClass($this->htmlOptions, array('bootstrap-list-view-item'));
 }