');
- foreach($this->aCells as $aCell)
+ foreach($this->aCells as $iCellIdx => $aCell)
{
/** @var \Dashlet $oDashlet */
foreach($aCell as $oDashlet)
{
+
+ $aDashletCoordinates = $oLayout->GetDashletCoordinates($iCellIdx);
$sId = $oDashlet->GetID();
+ $sFinalId = static::GetDashletUniqueId($this->bCustomized, $this->GetSanitizedId(), $aDashletCoordinates[1], $aDashletCoordinates[0], $sId);
if ($oDashlet->IsVisible())
{
- $oPage->add('
');
+ $oPage->add('
');
$oForm = $oDashlet->GetForm();
$this->SetFormParams($oForm, $aExtraParams);
- $oForm->RenderAsPropertySheet($oPage, false, '.itop-dashboard');
+ $oForm->RenderAsPropertySheet($oPage, false, '.itop-dashboard');
$oPage->add('
');
}
}
@@ -674,7 +680,7 @@ EOF
protected function PrepareDashletForRendering(Dashlet $oDashlet, $aCoordinates, $aExtraParams = array())
{
$sDashletIdOrig = $oDashlet->GetID();
- $sDashboardSanitizedId = utils::Sanitize($this->GetId(), '', 'element_identifier');
+ $sDashboardSanitizedId = $this->GetSanitizedId();
$sDashletIdNew = static::GetDashletUniqueId($this->GetCustomFlag(), $sDashboardSanitizedId, $aCoordinates[1], $aCoordinates[0], $sDashletIdOrig);
$oDashlet->SetID($sDashletIdNew);
}
@@ -740,6 +746,17 @@ EOF
{
return $this->sId;
}
+
+ /**
+ * Return a sanitize ID for usages in XML/HTML attributes
+ *
+ * @return string
+ * @since 2.7.0
+ */
+ public function GetSanitizedId()
+ {
+ return utils::Sanitize($this->GetId(), '', 'element_identifier');
+ }
}
/**