run() public method

Runs the widget.
public run ( )
Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
 /**
  * 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 4
0
 public function run()
 {
     if ($this->runInConsoleMode == false) {
         GridViewAsset::register($this->getView());
         parent::run();
     } else {
         BaseListView::run();
     }
 }
Ejemplo n.º 5
0
 /**
  * Runs the widget.
  */
 public function run()
 {
     $view = $this->getView();
     FilemanagerAsset::register($view);
     parent::run();
 }
Ejemplo n.º 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();
    }