src/Modal.php
public function enableCallback()
    {
        $this->cb_view = $this->add('View');
        $this->cb_view->stickyGet('__atk_m', $this->name);
        $this->cb = $this->cb_view->add('CallbackLater');

        $this->cb->set(function () {
            if ($this->cb->triggered() && $this->fx) {
                $this->fx[0]($this->cb_view);
            }
            $modalName = isset($_GET['__atk_m']) ? $_GET['__atk_m'] : null;
            if ($modalName === $this->name) {
                $this->app->terminate($this->cb_view->renderJSON());
            }
        });
    }
public function enableCallback()
    {
        $this->cb_view = $this->add('View');
        $this->cb_view->stickyGet('__atk_m', $this->name);
        $this->cb = $this->cb_view->add('CallbackLater');

        $this->cb->set(function () {
            if ($this->cb->triggered() && $this->fx) {
                $this->fx[0]($this->cb_view);
            }
            $modalName = isset($_GET['__atk_m']) ? $_GET['__atk_m'] : null;
            if ($modalName === $this->name) {
                $this->app->terminate($this->cb_view->renderJSON());
            }
        });
    }
public function enableCallback ( ) { $ this -> cb_view = $ this -> add ( 'View' ) ; $ this -> cb_view -> stickyGet ( '__atk_m' , $ this -> name ) ; $ this -> cb = $ this -> cb_view -> add ( 'CallbackLater' ) ; $ this -> cb -> set ( function ( ) { if ( $ this -> cb -> triggered ( ) && $ this -> fx ) { $ this -> fx [ 0 ] ( $ this -> cb_view ) ; } $ modalName = isset ( $ _GET [ '__atk_m' ] ) ? $ _GET [ '__atk_m' ] : null ; if ( $ modalName === $ this -> name ) { $ this -> app -> terminate ( $ this -> cb_view -> renderJSON ( ) ) ; } } ) ; }
Add View to be loaded in this modal and
attach CallbackLater to it.
The cb_view only will be loaded dynamically within modal
div.atk-content.
Add View to be loaded in this modal and attach CallbackLater to it . The cb_view only will be loaded dynamically within modal div . atk - content .