N°2598 - When refreshing a list, loosing page and order - change of dashboard refresh mecanism

This commit is contained in:
acognet
2021-02-15 16:54:46 +01:00
parent 4c23f1f32b
commit dbe747ea23
27 changed files with 422 additions and 346 deletions

View File

@@ -122,6 +122,9 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
$iCellIdx = 0;
$iNbRows = ceil(count($aCells) / $this->iNbCols);
//Js given by each dashlet to reload
$sJSReload = "";
for ($iRows = 0; $iRows < $iNbRows; $iRows++) {
$oDashboardRow = new DashboardRow();
$oDashboardLayout->AddDashboardRow($oDashboardRow);
@@ -148,8 +151,11 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
}
$iCellIdx++;
}
$sJSReload .= $oDashboardRow->GetJSRefresh()."\n";
}
$oPage->add_script("function updateDashboard".$aExtraParams['dashboard_div_id']."(){".$sJSReload."}");
if ($bEditMode) // Add one row for extensibility
{
$oDashboardRow = new DashboardRow();