public function deleteAction() { $this->_disableRender(); if ($this->getRequest()->getParam('all')) { $json = new ZendT_Json_Result(); try { if (!$this->getRequest()->getParam('confirmacao')) { $form = new ZendT_Form(); $form->setAction(ZendT_Url::getUri()); $params = $this->getRequest()->getParams(); $params['confirmacao'] = '1'; foreach ($params as $key => $val) { $element = new ZendT_Form_Element_Hidden($key); $element->setValue($val); $form->addElement($element); } $msg = "Deseja remover todas as notificações?"; throw new ZendT_Exception_Confirm($msg . $form->render()); } else { if (Auth_Session_User::getInstance()->authenticated()) { $this->getMapper()->setIdUsuario(Zend_Auth::getInstance()->getStorage()->read()->getId())->delete(); } $json->setResult(true); } } catch (Exception $ex) { $json->setException($ex); } echo $json->render(); } else { parent::deleteAction(); } }
public function configGrid() { parent::configGrid(); $idPropRelac = $this->getRequest()->getParam('id_prop_relac'); if ($idPropRelac) { $this->getGrid()->setPostData(array('img_docto-id_prop_relac' => $idPropRelac)); } }
public function configGrid() { parent::configGrid(); $idConteudo = $this->getRequest()->getParam('id_conteudo'); if ($idConteudo) { $add = $this->getGrid()->getToolbarButton('add'); $add->setUrl($add->getUrl() . '&id_conteudo=' . $idConteudo); $this->getGrid()->setPostData(array('cms_priv_conteudo-id_conteudo' => $idConteudo)); } }
public function configGrid() { parent::configGrid(); $idCategoria = $this->getRequest()->getParam('id_categoria'); if ($idCategoria) { $add = $this->getGrid()->getToolbarButton('add'); $add->setUrl($add->getUrl() . '&id_categoria=' . $idCategoria); $this->getGrid()->setPostData(array('cms_priv_categ-id_categoria' => $idCategoria)); } }
public function configGrid() { parent::configGrid(); $this->getGrid()->setOnSelectRow("function(){ selectedRowConteudo(); }"); $idCategoria = $this->getRequest()->getParam('id_categoria'); if ($idCategoria) { $add = $this->getGrid()->getToolbarButton('add'); $add->setUrl($add->getUrl() . '&id_categoria=' . $idCategoria); $this->getGrid()->setPostData(array('cms_conteudo-id_categoria' => $idCategoria)); } }
public function configGrid() { parent::configGrid(); $isSearch = $this->getRequest()->getParam('isSearch'); $id_objeto = $this->getRequest()->getParam('id_objeto'); $log_objeto_nome = $this->getRequest()->getParam('log_objeto_nome'); if ($isSearch) { $postData = array('log_evento-id_objeto' => $id_objeto, 'log_objeto-nome' => $log_objeto_nome); $this->getGrid()->setPostData($postData); } }
public function gridAction() { parent::gridAction(); if ($this instanceof ZendT_Controller_ActionCrud && ZendT_Acl::getInstance()->isAllowed('efetivar', $this->_resourceBase)) { $btnId = 'btn_efetivar_' . $this->getGrid()->getID(); $_efetivar = new ZendT_Grid_Button_Ajax($idbt); $_efetivar->setIdGrid($this->getGrid()->getID())->setButtonIcon('ui-icon-check')->setUrl(ZendT_Url::getUri(true) . '/efetivar')->setTitle('Efetivar'); $this->view->hotkeys()->add('btn_efetivar', 'ctrl+t', '$("#' . $btnId . '").click();'); $this->getGrid()->addToolbarButton('btn_efetivar', $_efetivar, 'btn_efetiva'); } if ($this instanceof ZendT_Controller_ActionCrud && ZendT_Acl::getInstance()->isAllowed('cancelar', $this->_resourceBase)) { $btnId = 'btn_cancelar_' . $this->getGrid()->getID(); $_efetivar = new ZendT_Grid_Button_Ajax($idbt); $_efetivar->setIdGrid($this->getGrid()->getID())->setButtonIcon('ui-icon-cancel')->setUrl(ZendT_Url::getUri(true) . '/cancelar')->setTitle('Cancelar'); $this->view->hotkeys()->add('btn_cancelar', 'ctrl+r', '$("#' . $btnId . '").click();'); $this->getGrid()->addToolbarButton('btn_cancelar', $_efetivar, 'btn_cancelar'); } }
public function updateAction() { if ($this->_setConfig()) { parent::updateAction(); } }
public function configGrid() { parent::configGrid(); $this->getGrid()->setOnSelectRow("function(){ selectedRowCategoria(); }"); }
public function deleteAction() { $param = $this->getRequest()->getParams(); if ($param['id']) { $_objectViewPriv = new Profile_Model_ObjectViewPriv_Mapper(); $_objectViewPriv->setIdProfileObjectView($param['id'])->delete(); } parent::deleteAction(); }