Пример #1
0
 /**
  * Initializes the list view.
  * This method will initialize required property values and instantiate {@link columns} objects.
  */
 public function init()
 {
     if ($this->itemView === null) {
         throw new CException(Yii::t('zii', 'The property "itemView" cannot be empty.'));
     }
     parent::init();
     if (!isset($this->htmlOptions['class'])) {
         $this->htmlOptions['class'] = 'list-view';
     }
     if ($this->baseScriptUrl === null) {
         $this->baseScriptUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.widgets.assets')) . '/listview';
     }
     if ($this->cssFile !== false) {
         if ($this->cssFile === null) {
             $this->cssFile = $this->baseScriptUrl . '/styles.css';
         }
         Yii::app()->getClientScript()->registerCssFile($this->cssFile);
     }
 }
Пример #2
0
 /**
  * Initializes the grid view.
  * This method will initialize required property values and instantiate {@link columns} objects.
  */
 public function init()
 {
     parent::init();
     if (empty($this->updateSelector)) {
         throw new CException(Yii::t('zii', 'The property updateSelector should be defined.'));
     }
     if (!isset($this->htmlOptions['class'])) {
         $this->htmlOptions['class'] = 'grid-view';
     }
     if ($this->baseScriptUrl === null) {
         $this->baseScriptUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.widgets.assets')) . '/gridview';
     }
     if ($this->cssFile !== false) {
         if ($this->cssFile === null) {
             $this->cssFile = $this->baseScriptUrl . '/styles.css';
         }
         Yii::app()->getClientScript()->registerCssFile($this->cssFile);
     }
     $this->initColumns();
 }
Пример #3
0
 public function init()
 {
     parent::init();
     $this->initColumns();
 }
Пример #4
0
 /**
  * Initializes the grid view.
  * This method will initialize required property values and instantiate {@link columns} objects.
  */
 public function init()
 {
     parent::init();
     if (!isset($this->htmlOptions['class'])) {
         $this->htmlOptions['class'] = 'grid-view';
     }
     if ($this->baseScriptUrl === null) {
         $this->baseScriptUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.widgets.assets')) . '/gridview';
     }
     if ($this->cssFile !== false) {
         if ($this->cssFile === null) {
             $this->cssFile = $this->baseScriptUrl . '/styles.css';
         }
         Yii::app()->getClientScript()->registerCssFile($this->cssFile);
     }
     $this->initColumns();
 }
Пример #5
0
 /**
  * Initializes the grid view.
  * This method will initialize required property values and instantiate {@link columns} objects.
  */
 public function init()
 {
     parent::init();
     $this->htmlOptions['id'] = $this->getId() . '-widget';
     if ($this->baseScriptUrl === null) {
         $this->baseScriptUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('ext.JCarousel.assets'));
     }
     if ($this->cssFile !== false) {
         if ($this->cssFile === null) {
             $this->cssFile = $this->baseScriptUrl . '/skin.css';
         }
         Yii::app()->getClientScript()->registerCssFile($this->cssFile);
     }
     if (!isset($this->thumbUrl)) {
         throw new CHttpException(500, Yii::t('jcarousel', 'you must assign a value for thumbUrl'));
     } elseif (str_word_count($this->thumbUrl) === 1) {
         $this->thumbUrl = '$data->' . $this->thumbUrl;
     }
     if (!isset($this->imageUrl)) {
         throw new CHttpException(500, Yii::t('jcarousel', 'you must assign a value for imageUrl'));
     } elseif (str_word_count($this->imageUrl) === 1) {
         $this->imageUrl = '$data->' . $this->imageUrl;
     }
 }