N°3551 - Migrate module to new UIBlock system : Customer Survey

This commit is contained in:
acognet
2021-06-17 09:25:20 +02:00
parent c413ac989e
commit 13f6f6ebe6
10 changed files with 128 additions and 22 deletions

View File

@@ -168,4 +168,19 @@ class DataTable extends UIContentBlock
return "$('#".$this->sId."').DataTable().clearPipeline();
$('#".$this->sId."').DataTable().ajax.reload(null, false);";
}
public function GetDisabledSelect(): array
{
$aExtraParams = $this->aAjaxData['extra_params'];
if(isset($aExtraParams['selection_enabled']) ){
$aListDisabled = [];
foreach( $aExtraParams['selection_enabled'] as $sKey=>$bValue){
if ($bValue == false) {
$aListDisabled[] = $sKey;
}
}
return $aListDisabled;
}
return [];
}
}

View File

@@ -884,6 +884,8 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
'selected_rows', /** array list of Ids already selected when displaying the datatable */
'display_aliases', /** string comma separated list of class aliases to display */
'list_id', /** string list outer id */
'selection_enabled', /** list of id in witch select is allowed, if not exists all lines are selectable */
'id_for_select', /**give definition of id for select checkbox*/
];
}
}