public function run() { Icon::map($this->view, Icon::FA); echo "<div id='cjModalContent'>" . Icon::show('refresh fa-spin', [], Icon::FA) . "</div>"; // echo "".Icon::show('refresh fa-spin', [], Icon::FA).""; parent::run(); }
public function getModal() { if (self::$_modal === null) { ob_start(); ob_implicit_flush(false); $this->optionsModal['class'] = Modal::className(); self::$_modal = Yii::createObject($this->optionsModal); $out = self::$_modal->run(); $out = ob_get_clean() . $out; $view = $this->getView(); $view->on($view::EVENT_END_BODY, function () use($out) { echo $out; }); } return self::$_modal; }
public function run() { $this->registerClientScript(); echo $this->renderContent(); echo $this->renderNoTemyMessage(); return parent::run(); }
/** * @inheritdoc */ public function run() { parent::run(); if ($this->remote) { $id = $this->options['id']; $url = Url::to($this->remote); $this->getView()->registerJs("Admin.Modal.remote('#{$id}', '{$url}');"); } }
public function run() { switch (empty($this->content)) { case false: parent::init(); echo $this->content; parent::run(); break; default: echo $this->renderTogglebutton() . Html::tag('div', Html::tag('div', Html::tag('div', $this->renderHeader() . $this->content, $this->contentOptions), $this->dialogOptions), $this->options); break; } }
/** * @inheritdocs */ public function run() { $view = $this->getView(); parent::run(); ModalAsset::register($view); $id = $this->options['id']; $ajaxSubmit = $this->ajaxSubmit ? 'true' : 'false'; $js = <<<JS jQuery('#{$id}').kbModalAjax({ url: '{$this->url}', ajaxSubmit: {$ajaxSubmit}, }); JS; $view->registerJs($js); }
public function run() { parent::run(); $js = <<<JS \$(function(){ \$(".modal-button").click(function(){ console.log(\$(this)); var target = \$(this).attr('modal-target'); \$(target) .modal("show") .find(".modal-body") .load( \$(this).closest("[modal-href]").attr("modal-href") ); }); }); JS; $view = $this->getView(); $view->registerJs($js, View::POS_READY, 'yii2popup'); }
public function run() { $this->registerClientScript(); return parent::run(); }