run() 공개 메소드

Runs the widget.
public run ( )
예제 #1
0
 public function run()
 {
     $id = $this->options['id'];
     $options = Json::encode($this->getClientOptions());
     $view = $this->getView();
     InputGridAsset::register($view);
     $view->registerJs("jQuery('#{$id}').mdmInputGrid({$options});");
     \yii\widgets\BaseListView::run();
 }
예제 #2
0
파일: GridView.php 프로젝트: weiyiyi/base
 /**
  * Runs the widget.
  */
 public function run()
 {
     $id = $this->options['id'];
     $options = Json::htmlEncode($this->getClientOptions());
     $view = $this->getView();
     $view->registerJs("jQuery('#{$id}').yiiGridView({$options}).trigger('init');");
     if ($this->sectionLoad) {
         $view->registerJs("jQuery('#{$id}').on('click', '.pagination a, .sort a', function(event) {jQuery('{$this->sectionLoad}').load(this.href);event.stopImmediatePropagation();return false;});");
     }
     \yii\widgets\BaseListView::run();
 }
예제 #3
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     $id = $this->options['id'];
     $options = Json::encode($this->getClientOptions());
     $view = $this->getView();
     GridViewAsset::register($view);
     $view->registerJs("jQuery('#{$id}').yiiGridView({$options});");
     parent::run();
 }
예제 #4
0
 public function run()
 {
     if ($this->runInConsoleMode == false) {
         GridViewAsset::register($this->getView());
         parent::run();
     } else {
         BaseListView::run();
     }
 }
예제 #5
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     $view = $this->getView();
     FilemanagerAsset::register($view);
     parent::run();
 }
예제 #6
0
    /**
     * @inheritdoc
     */
    public function run()
    {
        Html::addCssClass($this->tableOptions, 'table');
        if ($this->hover) {
            Html::addCssClass($this->tableOptions, 'table-hover');
        }
        if ($this->bordered) {
            Html::addCssClass($this->tableOptions, 'table-bordered');
        }
        if ($this->striped) {
            Html::addCssClass($this->tableOptions, 'table-striped');
        }
        $this->initLayout();
        GridViewAsset::register($this->view);
        $options = Json::htmlEncode($this->getClientOptions());
        $this->view->registerJs("\$('#{$this->options['id']}').yiiGridView({$options});");
        if ($this->resizableColumns !== false) {
            $options = Json::htmlEncode($this->resizableColumnsOptions);
            $url = Url::toRoute($this->resizableColumnsUrl);
            $js = <<<JS
\$('#{$this->options['id']}').resizableColumns({$options}).on('afterDragging.rc', function(event) {
    var column = \$(this).closest('[data-resizable-column]'),
        data = {};
    data[column.data('resizable-column')] = column.outerWidth();
    \$.ajax({
        type: 'post',
        url: '{$url}',
        data: data
    });
});
JS;
            $this->view->registerJs($js);
        }
        BaseListView::run();
    }