Ejemplo n.º 1
0
 public function apply($request, $response)
 {
     $response->status = MStatusCode::OK;
     if (Manager::isAjaxCall()) {
         $this->page->onLoad("manager.doRedirect('{$this->url}','');");
         $json = new MRenderJSON();
         $json->apply($request, $response);
     } else {
         header('Location:' . $this->url);
     }
 }
Ejemplo n.º 2
0
 public function __construct($prompt)
 {
     parent::__construct();
     $this->ajax = Manager::getAjax();
     $this->page = Manager::getPage();
     if ($this->ajax->isEmpty()) {
         $this->page->setName($prompt->getId());
         $this->page->setContent($prompt);
         if (!$this->page->isPostBack()) {
             $this->page->onLoad("manager.doPrompt('{$prompt->getId()}')");
         }
         $this->ajax->setId($this->page->getName());
         $this->ajax->setType('prompt');
         $this->ajax->setData($this->page->generate());
     }
     $this->content = $this->ajax->returnData();
 }