diff --git a/core/displayablegraph.class.inc.php b/core/displayablegraph.class.inc.php index b87bfd25f..a7801078c 100644 --- a/core/displayablegraph.class.inc.php +++ b/core/displayablegraph.class.inc.php @@ -1421,13 +1421,14 @@ class DisplayableGraph extends SimpleGraph * @param int $iObjKey * @param string $sContextKey * @param array $aContextParams + * @param bool $bLazyLoading since 2.7.7 3.0.1 * * @throws \CoreException * @throws \DictExceptionMissingString */ - function Display(WebPage $oP, $aResults, $sRelation, ApplicationContext $oAppContext, $aExcludedObjects, $sObjClass, $iObjKey, $sContextKey, $aContextParams = array(), bool $sLazyLoading = false) + function Display(WebPage $oP, $aResults, $sRelation, ApplicationContext $oAppContext, $aExcludedObjects, $sObjClass, $iObjKey, $sContextKey, $aContextParams = array(), bool $bLazyLoading = false) { - list($aExcludedByClass, $aAdditionalContexts) = $this->DisplayFiltering($sContextKey, $aContextParams, $aExcludedObjects, $oP, $aResults, $sLazyLoading); + list($aExcludedByClass, $aAdditionalContexts) = $this->DisplayFiltering($sContextKey, $aContextParams, $aExcludedObjects, $oP, $aResults, $bLazyLoading); $iGroupingThreshold = utils::ReadParam('g', 5); @@ -1508,10 +1509,12 @@ class DisplayableGraph extends SimpleGraph // Export as Attachment requires GD (for building the PDF) AND a valid objclass/objkey couple unset($aParams['export_as_attachment']); } - if ($oP->IsPrintableVersion() || !$sLazyLoading) { + if ($oP->IsPrintableVersion() || !$bLazyLoading) { $oP->add_ready_script(" $('#$sId').simple_graph(".json_encode($aParams).");"); } else { $oP->add_script("function Load(){var aExcluded = []; $('input[name^=excluded]').each( function() {if (!$(this).prop('checked')) { aExcluded.push($(this).val()); }} ); var params= $.extend(".json_encode($aParams).", {excluded_classes: aExcluded}); $('#$sId').simple_graph(params);}"); + $oP->add_ready_script("$('#impacted_objects_lists').html('".utils::TextToHtml(Dict::S('Relation:impacts/NoFilteredData'))."');$('#impacted_groups').html('".utils::TextToHtml(Dict::S('Relation:impacts/NoFilteredData'))."');"); + } } catch(Exception $e) @@ -1551,6 +1554,7 @@ EOF * @param array $aExcludedObjects * @param \WebPage $oP * @param array $aResults + * @param bool $bLazyLoading * * @return array * @throws \CoreException @@ -1590,7 +1594,7 @@ EOF $("#ReloadMovieBtn").button().button("disable"); EOF ); - if ($sLazyLoading) { + if ($bLazyLoading) { $oP->add_ready_script("$('#ReloadMovieBtn').button('enable');"); } else { $oP->add_ready_script("$('#dh_flash').addClass('closed');"); @@ -1614,7 +1618,7 @@ EOF $idx++; } $oUiHtmlBlock->AddHtml(""); - if ($sLazyLoading) { + if ($bLazyLoading) { $sOnCLick = "Load(); $('#ReloadMovieBtn').attr('onclick','DoReload()');$('#ReloadMovieBtn').html('".Dict::S('UI:Button:Refresh')."');"; $oUiHtmlBlock->AddHtml(""); } else { diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/de.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/de.dict.itop-config-mgmt.php index 5812de6ef..4a6fe87e6 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/de.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/de.dict.itop-config-mgmt.php @@ -32,6 +32,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', array( 'Relation:depends on/Description' => 'Elemente, von denen dieses Element abhängt.', 'Relation:depends on/DownStream' => 'Hängt ab von ...', 'Relation:depends on/UpStream' => 'Wirkt auf ...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/es_cr.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/es_cr.dict.itop-config-mgmt.php index e3f3944db..387b8b4c1 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/es_cr.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/es_cr.dict.itop-config-mgmt.php @@ -36,6 +36,8 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array( 'Relation:depends on/Description' => 'Elementos de los cuales depende', 'Relation:depends on/DownStream' => 'Depende de...', 'Relation:depends on/UpStream' => 'Impactos...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/hu.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/hu.dict.itop-config-mgmt.php index e7fe025b4..03948b68c 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/hu.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/hu.dict.itop-config-mgmt.php @@ -29,6 +29,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array( 'Relation:depends on/Description' => 'Konfigurációs elemtől függnek', 'Relation:depends on/DownStream' => 'Függőségek', 'Relation:depends on/UpStream' => 'Hatások', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/it.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/it.dict.itop-config-mgmt.php index cd147da45..d0de9f1db 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/it.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/it.dict.itop-config-mgmt.php @@ -29,6 +29,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array( 'Relation:depends on/Description' => 'Elementi di questo elemento dipende da', 'Relation:depends on/DownStream' => 'Dipende da...', 'Relation:depends on/UpStream' => 'Impatto...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/ja.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/ja.dict.itop-config-mgmt.php index 991ace7b7..9b4e93c7f 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/ja.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/ja.dict.itop-config-mgmt.php @@ -29,6 +29,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', array( 'Relation:depends on/Description' => 'この要素が依存している要素', 'Relation:depends on/DownStream' => '依存...', 'Relation:depends on/UpStream' => 'インパクト...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/nl.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/nl.dict.itop-config-mgmt.php index d5d22ed58..f6662efe8 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/nl.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/nl.dict.itop-config-mgmt.php @@ -41,6 +41,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'Relation:depends on/Description' => 'Elementen waarvan dit object afhankelijk van is', 'Relation:depends on/DownStream' => 'Is afhankelijk van...', 'Relation:depends on/UpStream' => 'Impact op...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/pt_br.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/pt_br.dict.itop-config-mgmt.php index 559281798..b82b0c1d1 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/pt_br.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/pt_br.dict.itop-config-mgmt.php @@ -35,6 +35,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array( 'Relation:depends on/Description' => 'Elementos estes, que dependem deste elemento', 'Relation:depends on/DownStream' => 'Depende de...', 'Relation:depends on/UpStream' => 'Impactos...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/ru.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/ru.dict.itop-config-mgmt.php index 55cbc8d25..cb7e9daab 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/ru.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/ru.dict.itop-config-mgmt.php @@ -22,6 +22,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', array( 'Relation:depends on/Description' => 'Элементы, от которых зависит', 'Relation:depends on/DownStream' => 'Зависит от...', 'Relation:depends on/UpStream' => 'Влияет на...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/sk.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/sk.dict.itop-config-mgmt.php index ddf37ffe3..a2a7691ab 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/sk.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/sk.dict.itop-config-mgmt.php @@ -34,6 +34,8 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array( 'Relation:depends on/Description' => 'Prvky, od ktorých závisí tento prvok', 'Relation:depends on/DownStream' => 'Depends on...~~', 'Relation:depends on/UpStream' => 'Impacts...~~', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/tr.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/tr.dict.itop-config-mgmt.php index b5c3cac66..02736e099 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/tr.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/tr.dict.itop-config-mgmt.php @@ -36,6 +36,8 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array( 'Relation:depends on/Description' => 'Bu kaleme bağımlı olan kalemler', 'Relation:depends on/DownStream' => 'Bağımlı olanlar...', 'Relation:depends on/UpStream' => 'Etkiledikleri...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/datamodels/2.x/itop-config-mgmt/dictionaries/zh_cn.dict.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/dictionaries/zh_cn.dict.itop-config-mgmt.php index e5a92ad74..eb9177d51 100644 --- a/datamodels/2.x/itop-config-mgmt/dictionaries/zh_cn.dict.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/dictionaries/zh_cn.dict.itop-config-mgmt.php @@ -34,6 +34,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array( 'Relation:depends on/Description' => '该元素依赖的元素...', 'Relation:depends on/DownStream' => '依赖于...', 'Relation:depends on/UpStream' => '影响...', + 'Relation:impacts/LoadData' => 'Load data~~', + 'Relation:impacts/NoFilteredData' => 'please select objects in Graphical view tag~~', )); diff --git a/pages/UI.php b/pages/UI.php index 77847b8a7..1ff6188c5 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -1779,7 +1779,7 @@ EOF $oP->SetCurrentTabContainer('Navigator'); $sFirstTab = MetaModel::GetConfig()->Get('impact_analysis_first_tab'); - $sLazyLoading = MetaModel::GetConfig()->Get('impact_analysis_lazy_loading'); + $bLazyLoading = MetaModel::GetConfig()->Get('impact_analysis_lazy_loading'); $sContextKey = "itop-config-mgmt/relation_context/$sClass/$sRelation/$sDirection"; // Check if the current object supports Attachments, similar to AttachmentPlugin::IsTargetObject @@ -1800,13 +1800,13 @@ EOF { DisplayNavigatorListTab($oP, $aResults, $sRelation, $sDirection, $oObj); $oP->SetCurrentTab('UI:RelationshipGraph'); - $oDisplayGraph->Display($oP, $aResults, $sRelation, $oAppContext, array(), $sClassForAttachment, $iIdForAttachment, $sContextKey, array('this' => $oObj),$sLazyLoading); + $oDisplayGraph->Display($oP, $aResults, $sRelation, $oAppContext, array(), $sClassForAttachment, $iIdForAttachment, $sContextKey, array('this' => $oObj),$bLazyLoading); DisplayNavigatorGroupTab($oP); } else { $oP->SetCurrentTab('UI:RelationshipGraph'); - $oDisplayGraph->Display($oP, $aResults, $sRelation, $oAppContext, array(), $sClassForAttachment, $iIdForAttachment, $sContextKey, array('this' => $oObj),$sLazyLoading); + $oDisplayGraph->Display($oP, $aResults, $sRelation, $oAppContext, array(), $sClassForAttachment, $iIdForAttachment, $sContextKey, array('this' => $oObj),$bLazyLoading); DisplayNavigatorListTab($oP, $aResults, $sRelation, $sDirection, $oObj); DisplayNavigatorGroupTab($oP); } diff --git a/setup/modelfactory.class.inc.php b/setup/modelfactory.class.inc.php index d84962a91..b165222cf 100644 --- a/setup/modelfactory.class.inc.php +++ b/setup/modelfactory.class.inc.php @@ -2312,7 +2312,7 @@ EOF; * * @param MFElement $oNewNode The replacement * - * @since 2.7.7 3.0.1 3.1.0 N°3129 rename method (from `ReplaceWith` to `MFReplaceWith`) to avoid collision with parent `\DOMElement::replaceWith` method (different method modifier and parameters : + * @since 2.7.7 3.0.1 3.1.0 N°3129 rename method (from `ReplaceWith` to `ReplaceWithSingleNode`) to avoid collision with parent `\DOMElement::replaceWith` method (different method modifier and parameters : * throws fatal error in PHP 8.0) */ protected function ReplaceWithSingleNode($oNewNode)