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