public function tableAjax(App_Grid_Filter $filter, array $list = null) { $req = Zend_Controller_Front::getInstance()->getRequest(); $this->_request = $req; $filter->setRequest($req); $ui = $filter->getUiName(); $this->_modelName = $filter->getModelName(); $tableConfig = $this->getTableConfig($this->_modelName, $ui); $this->_columnConfig = $tableConfig['fields']; $this->_modelConfig = $this->getModelConfig($this->_modelName); //print_r($this->_columnConfig); $widths = $filter->getRowWidths(); $titles = $filter->getheaderTitles(); //print_r($titles); $tWidth = $filter->getTableWidth(); if ($list == null) { $list = $filter->getList(); } $this->_filter = $filter; $view = $this->view; if (!$filter->isDisableHeader()) { // $view->headLink()->appendStylesheet('/scripts/jq-ingrid/css/ingrid.css'); // $view->headScript()->appendFile('/scripts/jq-ingrid/js/jquery.ingrid.js'); // $view->headScript()->appendFile('/scripts/jq-ingrid/js/jquery.cookie.js'); //$view->headScript()->appendScript($this->_getScript()); } $gridwidth = $filter->getGridWidth(); $table = '<div id="issues-preview-table"><table style="width:' . $gridwidth . '" class="extensions listing" cellpadding="0" cellspacing="0">'; //if( !$filter->isDisableHeader() ){ $table .= $this->_getHeader($widths, $titles); //} if (is_array($list)) { $table .= $this->_getRows($list, $widths); } else { $table .= $this->_getBlankRows(count($titles)); } //if( !$filter->isDisableHeader() ){ // $table .= $this->_getFooter(count($titles)); //} $table .= '</table>'; $table .= '</div>'; $table .= $this->_genPagination(); //$table .= '</div>'; //if (! $filter->isDisableScript ()) { //$table .='<script type="text/javascript">'; $this->_genScript(); //$table .= '</script> '; //} return $table; }
function redertable(App_Grid_Filter $filter, array $list = null) { if ($this->_processController == '') { $req = Zend_Controller_Front::getInstance()->getRequest(); $this->_processController = $req->getControllerName(); } //if(trim($this->_gridid) ==''){ //} //print_r($this->_columnConfig); $widths = $filter->getRowWidths(); $titles = $filter->getheaderTitles(); $tWidth = $filter->getTableWidth(); $view = $this->view; if (!$filter->isDisableHeader()) { // $view->headLink()->appendStylesheet('/scripts/jq-ingrid/css/ingrid.css'); // $view->headScript()->appendFile('/scripts/jq-ingrid/js/jquery.ingrid.js'); // $view->headScript()->appendFile('/scripts/jq-ingrid/js/jquery.cookie.js'); //$view->headScript()->appendScript($this->_getScript()); } $gridwidth = $filter->getGridWidth(); // SETTING $this->_enabledScollbar = false; $table = "<div class='table-actionbar-container hide-on-print' align='right' id='tablePane_{$this->getGridId()}' ><div class='table-actionbar-inner'>"; foreach ($this->_butonOnActionBarList as $id => $options) { $table .= $this->renderButtonOnActionBar($id, $options); } $appconfigurl = $this->view->url(array('action' => 'grid-config', 'module' => 'appconfig', 'controller' => 'model-setting', 'model' => $this->_modelName, 'uiName' => $this->filter()->getUiName()), true); if (App_Env::isAdmin() and APPLICATION_ENV == 'development') { $table .= "<a id='ModelConfigButton' name='ModelConfigButton' onclick=\"openWindows('{$appconfigurl}','appconfig')\" title='click to config page' class='btn btn-default btn-xs config-page-button'><i class='glyphicon glyphicon-wrench'></i></a>"; } $table .= '</div></div>'; $innerTableVisibirity = 'display'; //$table .= '<div id="issues-preview-table" align="left" >'; if ($this->_enabledScollbar == true) { $table .= "<div class='table-header-container hide-on-print ' > "; //if($this->_enabledScollbar ==true){ // $table.="<div id='tableHeadContianer' style='height: 20%; overflow-y: scroll;overflow-x: hidden;padding-right:2px;'>"; $table .= "<table border='0' style='width:{$gridwidth}' class=' extensions listing table-head default' cellpadding='0' cellspacing='0' >"; $table .= $this->_getHeader($widths, $titles); $table .= "</table>"; $table .= '</div>'; $tableBobyContainerStyleClass = 'table-body-scoll-container'; } //$table.='<form id="'.$this->_formid.'" >'; if (1) { if (!isset($tableBobyContainerStyleClass)) { $tableBobyContainerStyleClass = 'table-container'; } $table .= "<div class='{$tableBobyContainerStyleClass} div-table-body ' >"; // $innerTableVisibirity = 'display'; //}else{ //$table.='<form id="'.$this->_formid.'" >'; //$innerTableVisibirity = 'display'; //} $table .= '<form id="' . $this->_formid . '" class="webgridform" >'; $table .= "<table id='{$this->_gridid}' style='width:{$gridwidth}' class='table table-bordered table-hover tableBodyContianer listing {$this->_tablebodyClass}'>"; if ($this->_enabledScollbar != true) { $table .= $this->_getHeader($widths, $titles); } if (is_array($list)) { $table .= $this->_getRows($list, $widths); } else { $table .= $this->_getBlankRows(count($titles)); } if ($this->_enabledScollbar == true) { $table .= $this->_getHeaderAtFooter($widths, $titles); } //if( !$filter->isDisableHeader() ){ // $table .= $this->_getFooter(count($titles)); //} $table .= '</table>'; $table .= '</form>'; //if($this->_enabledScollbar ==true){ //$table .= '</div>'; //} $table .= '</div>'; } //$table .= '</form>'; //echo $this->_enabledPagination ; if ($this->_enabledPagination == true) { $table .= "<div class='table-pagination-container hide-on-print'>"; $table .= $this->_genPagination(); $table .= "</div>"; } //$table .= '</div>'; //if (! $filter->isDisableScript ()) { //$table .='<script type="text/javascript">'; $this->addDefaultScript(); //$table .= '</script> '; //} return $table; }