Exemple #1
0
 public function handleSave()
 {
     $this->presenter = $this->getPresenter();
     if ($this->presenter->isAjax()) {
         $request = $this->presenter->getRequest();
         $result = $request->getPost();
         foreach ($this->onSave as $call) {
             $call($result);
         }
         $this->presenter->payload->neco = $result;
         $this->presenter->sendPayload();
     }
 }
Exemple #2
0
 /**
  * @param Presenter $presenter
  */
 public function updateModal(Presenter $presenter)
 {
     $presenter->getTemplate()->modal = $activeModal = Modal::getActiveModal();
     if ($presenter->isAjax()) {
         // close the previous modal
         if (Modal::isCloseRequired()) {
             $presenter->getPayload()->closeModal = TRUE;
         }
         $redrawModal = $activeModal && $activeModal->isOpenRequired() || Modal::isCloseRequired();
         $presenter->redrawControl('modal', $redrawModal);
     }
 }
Exemple #3
0
 public function isAjax()
 {
     return $this->forceAjaxMode === TRUE ? TRUE : parent::isAjax();
 }
Exemple #4
0
 /**
  * If current request is targeted to modal dialog
  * @return bool
  */
 public function isRequested()
 {
     return $this->presenter->isAjax() and $this->presenter->getParameter('_target', null) == "modal";
 }