From dd300e075c0523eaebf8ba071ed8c11bf1933e46 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 12 Mar 2020 14:07:00 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02735=20-=20Fix=20dashlet=20edition=20in?= =?UTF-8?q?=20the=20Designer=20(property=20form=20ID=20was=20not=20matchin?= =?UTF-8?q?g=20dashlet's)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/dashboard.class.inc.php | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index d8a5c95ba..4625d9907 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -539,7 +539,7 @@ EOF $oPage->add('
'.htmlentities(Dict::S($this->sTitle), ENT_QUOTES, 'UTF-8', false).'
'); /** @var \DashboardLayoutMultiCol $oLayout */ - $oLayout = new $this->sLayoutClass; + $oLayout = new $this->sLayoutClass(); foreach($this->aCells as $iCellIdx => $aDashlets) { @@ -591,19 +591,25 @@ EOF // Toolbox/palette to edit the properties of each dashlet $oPage->add('
'.Dict::S('UI:DashboardEdit:DashletProperties').'
'); + /** @var \DashboardLayoutMultiCol $oLayout */ + $oLayout = new $this->sLayoutClass(); + $oPage->add('
'); - 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('