|
|
@@ -23,7 +23,7 @@ class TableAjax extends ViewAjax {
|
|
|
public $_pageSizes = array();
|
|
|
public $_filterInit = null;
|
|
|
public $_forceFilterInit = null;
|
|
|
- public $showProcesInitFiltr = false;
|
|
|
+ public $showProcesInitFiltr = null;
|
|
|
public $useUserTableFilter = false;
|
|
|
public $syncUrl = null;
|
|
|
|
|
|
@@ -234,11 +234,6 @@ class TableAjax extends ViewAjax {
|
|
|
return $rowFunctions;
|
|
|
}
|
|
|
|
|
|
- private function getProcesInitSelected() {
|
|
|
- $userAcl = User::getAcl();
|
|
|
- return $userAcl->getPermsFiltrProcesId();
|
|
|
- }
|
|
|
-
|
|
|
public function allowTreeView() {
|
|
|
if ($this->_tbl == 'CRM_LISTA_ZASOBOW') return true;
|
|
|
if ($this->_tbl == 'CRM_PROCES') return true;
|
|
|
@@ -450,7 +445,7 @@ class TableAjax extends ViewAjax {
|
|
|
$clsName = __CLASS__;
|
|
|
UI::inlineJS(__FILE__ . '.procesInitFiltr.js', [
|
|
|
'JS_FUNCTION_NAME' => $jsToogleFiltrProcesuFunctionName,
|
|
|
- 'URL_GET_PROCES_INIT_FILTR' => "index-ajax.php?_zasobID={$this->_zasobID}&_cls={$clsName}&_hash={$this->_htmlID}&_task=PROCES_INIT_FILTR",
|
|
|
+ 'URL_GET_PROCES_INIT_FILTR' => $this->showProcesInitFiltr,
|
|
|
'ID_ZASOB' => $this->_zasobID,
|
|
|
]);
|
|
|
?>
|
|
|
@@ -4044,10 +4039,6 @@ function hidePopover() {
|
|
|
$this->sendAjaxResponseJson('ajaxTheGeomSave', $_REQUEST);
|
|
|
break;
|
|
|
}
|
|
|
- case 'PROCES_INIT_FILTR': {
|
|
|
- $this->sendAjaxResponseJson('ajaxProcesInitFiltr', $_REQUEST);
|
|
|
- break;
|
|
|
- }
|
|
|
default:
|
|
|
$this->sendAjaxResponseJson('ajaxData', $_REQUEST);
|
|
|
}
|
|
|
@@ -5919,28 +5910,4 @@ jQuery(document).ready(function(){
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
- private function ajaxProcesInitFiltr($args) {// ajax task 'PROCES_INIT_FILTR'
|
|
|
- $response = new stdClass();
|
|
|
-
|
|
|
- $pInitList = array();// [proces_init_id] => label (DESC)
|
|
|
- $userAcl = User::getAcl();
|
|
|
- $pInitList = $userAcl->getTableProcesInitList($this->_zasobID);
|
|
|
-
|
|
|
- DBG::log($pInitList, 'array', "\$pInitList");
|
|
|
- if (!empty($pInitList)) {
|
|
|
- $procesIds = array_keys($pInitList);
|
|
|
- $mapTree = ACL::getProcesInitMapTreeOnlyIds($procesIds);
|
|
|
- DBG::log($mapTree, 'array', "\$mapTree");
|
|
|
- DBG::log($pInitList, 'array', "\$pInitList");
|
|
|
- $pInitListSelected = $this->getProcesInitSelected();
|
|
|
- $response->pInitData = new stdClass();
|
|
|
- $response->pInitData->pInitList = $pInitList;
|
|
|
- $response->pInitData->mapTree = $mapTree;
|
|
|
- $response->pInitData->pInitListSelected = $pInitListSelected;
|
|
|
- }
|
|
|
- $response->type = 'success';
|
|
|
-
|
|
|
- return $response;
|
|
|
- }
|
|
|
-
|
|
|
}
|