|
|
@@ -5761,6 +5761,7 @@ jQuery(document).ready(function(){
|
|
|
|
|
|
public function ajaxData($args) {
|
|
|
$DBG = ('1' == V::get('DBG', '', $_REQUEST));
|
|
|
+ $acl = $this->_acl;
|
|
|
|
|
|
$pageSize = V::get('pageSize', $this->_pageSize, $args, 'int');
|
|
|
$page = V::get('page', 0, $args, 'int');
|
|
|
@@ -5769,9 +5770,6 @@ jQuery(document).ready(function(){
|
|
|
if ($page > 0) {
|
|
|
$page -= 1;
|
|
|
}
|
|
|
- else {
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
$params = array();
|
|
|
$params['limit'] = $pageSize;
|
|
|
@@ -5795,12 +5793,12 @@ jQuery(document).ready(function(){
|
|
|
|
|
|
$this->setFilters($filters);
|
|
|
|
|
|
- $vCols = $this->_acl->getVirtualFieldListByIdZasob();
|
|
|
+ $vCols = $acl->getVirtualFieldListByIdZasob();
|
|
|
if (!empty($vCols)) {
|
|
|
if($DBG){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">vCols (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($vCols);echo'</pre>';}
|
|
|
}
|
|
|
|
|
|
- $visibleCols = $this->_acl->getVisibleFieldList();
|
|
|
+ $visibleCols = $acl->getVisibleFieldList();
|
|
|
if($DBG){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">visibleCols (F.' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($visibleCols);echo'</pre>';}
|
|
|
|
|
|
$jsonData = new stdClass();
|
|
|
@@ -5808,7 +5806,7 @@ jQuery(document).ready(function(){
|
|
|
$jsonData->pageSize = $pageSize;
|
|
|
$jsonData->filters = $filters;
|
|
|
$jsonData->cols = new stdClass();
|
|
|
- $jsonData->uniqueCol = $this->_acl->getPrimaryKeyField();
|
|
|
+ $jsonData->uniqueCol = $acl->getPrimaryKeyField();
|
|
|
$ind = 0;
|
|
|
foreach ($visibleCols as $fieldID => $col) {
|
|
|
$ind++;
|
|
|
@@ -5820,13 +5818,13 @@ jQuery(document).ready(function(){
|
|
|
// Ahmes problems Status colors
|
|
|
$columnConfig->format = '<div class="cell-Status-{0}">{0}</div>';
|
|
|
}
|
|
|
- else if ($this->_acl->isGeomField($col)) {
|
|
|
+ else if ($acl->isGeomField($col)) {
|
|
|
$columnConfig->type = 'geom';
|
|
|
}
|
|
|
if ('' !== ($label = $this->_acl->getFieldLabel($col))) {
|
|
|
$columnConfig->friendly = $label;
|
|
|
}
|
|
|
- $colType = $this->_acl->getFieldType($col);
|
|
|
+ $colType = $acl->getFieldType($col);
|
|
|
if ($colType) {// @see MarkTableAjaxFilterColType
|
|
|
if ($colType['type'] == 'date') {
|
|
|
//$columnConfig->type = 'date';// TODO: require datetimepicker
|
|
|
@@ -5879,19 +5877,19 @@ jQuery(document).ready(function(){
|
|
|
$columnConfig->hidden = true;
|
|
|
}
|
|
|
|
|
|
- $columnConfig->description = $this->_acl->getFieldOpis($col);
|
|
|
+ $columnConfig->description = $acl->getFieldOpis($col);
|
|
|
|
|
|
$jsonData->cols->{$col} = $columnConfig;
|
|
|
}
|
|
|
$jsonData->rows = array();
|
|
|
- $jsonData->total = $this->_acl->getTotal($params);
|
|
|
+ $jsonData->total = $acl->getTotal($params);
|
|
|
if($DBG){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">get_total (F.' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($jsonData->total);echo'</pre>';}
|
|
|
- $items = $this->_acl->getItems($params);
|
|
|
+ $items = $acl->getItems($params);
|
|
|
if($DBG){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">items (F.' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($items);echo'</pre>';}
|
|
|
// TODO: add virtual data by Typespecial
|
|
|
if (!empty($vCols) && !empty($items)) {
|
|
|
foreach ($vCols as $vColID => $vCol) {
|
|
|
- $colType = $this->_acl->getFieldTypeById($vColID);
|
|
|
+ $colType = $acl->getFieldTypeById($vColID);
|
|
|
if ($colType) {
|
|
|
continue;// pomin Typespecial dla realnych komorek w bazie danych
|
|
|
}
|
|
|
@@ -5923,7 +5921,7 @@ jQuery(document).ready(function(){
|
|
|
// TODO: hide items without 'R'
|
|
|
foreach ($visibleCols as $kID => $vCol) {
|
|
|
// TODO: ID default 'R'
|
|
|
- if (!$this->_acl->isAllowed($kID, 'R', $vItem)) {
|
|
|
+ if (!$acl->isAllowed($kID, 'R', $vItem)) {
|
|
|
$vItem->{$vCol} = '*****';
|
|
|
}
|
|
|
|