Esempio n. 1
1
 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();
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public function run()
 {
     $this->registerClientScript();
     echo $this->renderContent();
     echo $this->renderNoTemyMessage();
     return parent::run();
 }
Esempio n. 4
0
 /**
  * @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}');");
     }
 }
Esempio n. 5
0
 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;
     }
 }
Esempio n. 6
0
    /**
     * @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);
    }
Esempio n. 7
0
    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();
 }