mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°3123 : Fix create shortcuts and set preferences
This commit is contained in:
@@ -49,6 +49,9 @@ class DataTable extends UIContentBlock
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->AddDeferredBlock(new DataTableConfig($this));
|
||||
$this->aDisplayColumns = [];
|
||||
$this->aOptions = [];
|
||||
$this->aResultColumns = [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -355,6 +355,12 @@ class DataTableFactory
|
||||
$aOptions['bViewLink'] = $bViewLink;
|
||||
$aOptions['sListId'] = $sListId;
|
||||
$aOptions['oClassAliases'] = json_encode($aClassAliases);
|
||||
if (isset($aExtraParams['selected_rows']) && !empty($aExtraParams['selected_rows'])){
|
||||
$aOptions['sSelectedRows'] = json_encode($aExtraParams['selected_rows']);
|
||||
} else {
|
||||
$aOptions['sSelectedRows'] = '[]';
|
||||
}
|
||||
|
||||
|
||||
$oDataTable->SetOptions($aOptions);
|
||||
$oDataTable->SetAjaxUrl(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php");
|
||||
|
||||
@@ -136,10 +136,9 @@ class DataTableSettings implements Serializable
|
||||
if (array_key_exists($sNormalizedFName, $aSortOrder)) {
|
||||
$sSort = $aSortOrder[$sNormalizedFName] ? 'asc' : 'desc';
|
||||
}
|
||||
|
||||
$aColumns[$sAlias]['_key_'] = $oSettings->GetFieldData($sAlias, '_key_', null, true /* bChecked */, $sSort);
|
||||
}
|
||||
foreach ($aList as $sAttCode) {
|
||||
$aColumns[$sAlias]['_key_'] = $oSettings->GetFieldData($sAlias, '_key_', null, true /* bChecked */, "none");
|
||||
foreach ($aList as $sAttCode) {
|
||||
$sSort = 'none';
|
||||
if (array_key_exists($sAttCode, $aSortOrder)) {
|
||||
$sSort = $aSortOrder[$sAttCode] ? 'asc' : 'desc';
|
||||
@@ -324,7 +323,7 @@ class DataTableSettings implements Serializable
|
||||
$sLabel = Dict::Format('UI:ExtKey_AsLink', MetaModel::GetName($this->aClassAliases[$sAlias]));
|
||||
$ret = array(
|
||||
'label' => $sLabel,
|
||||
'checked' => true,
|
||||
'checked' => $bChecked,
|
||||
'disabled' => true,
|
||||
'alias' => $sAlias,
|
||||
'code' => $sAttCode,
|
||||
|
||||
Reference in New Issue
Block a user