Exemplo n.º 1
0
 /**
  * Getting The end javascript
  *
  * @return string
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= "pageJs";
     $js .= ".setCallbackId('getData', '" . $this->_getDataBtn->getUniqueID() . "')";
     $js .= ".setHTMLID('resultDivId', 'statics-div');";
     return $js;
 }
Exemplo n.º 2
0
 /**
  * Getting The end javascript
  *
  * @return string
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $class = trim($this->_focusEntity);
     if ($class === '' || !isset($this->Request['id'])) {
         die('System Error: no id or class passed in');
     }
     if (trim($this->Request['id']) === 'new') {
         $entity = new $class();
     } else {
         if (!($entity = $class::get($this->Request['id'])) instanceof $class) {
             die('invalid item!');
         }
     }
     $js .= "pageJs.setHTMLID('itemDiv', 'item-div')";
     $js .= ".setItem(" . (trim($entity->getId()) === '' ? '{}' : json_encode($entity->getJson())) . ")";
     $js .= ".setCallbackId('saveItem', '" . $this->_saveItemBtn->getUniqueID() . "');";
     return $js;
 }
Exemplo n.º 3
0
 /**
  * Getting The end javascript
  *
  * @return string
  */
 protected function _getEndJs()
 {
     $js = parent::_getEndJs();
     $js .= "pageJs.setCallbackId('getItems', '" . $this->_getItemsBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('deleteItems', '" . $this->_delItemsBtn->getUniqueID() . "')";
     $js .= ".setCallbackId('saveItem', '" . $this->_saveItemsBtn->getUniqueID() . "')";
     $js .= ".setHTMLIds('item-list', 'searchPanel', 'total-found-count');";
     $js .= "if(pageJs.init) {pageJs.init();}";
     $js .= "pageJs.getSearchCriteria();";
     //$js .= ".getResults(true, " . $this->pageSize . ")";
     return $js;
 }