Пример #1
0
 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');
     }
 }
Пример #2
0
 /**
  * Renderiza o botão
  * 
  * @return method 
  */
 public function render()
 {
     return parent::render();
 }