Set maximum height/width on global search results class icons

This commit is contained in:
Stephen Abello
2021-03-18 16:13:59 +01:00
parent 547038aae8
commit e23b60c203
3 changed files with 17 additions and 4 deletions

View File

@@ -9,4 +9,5 @@
@import "impact-analysis";
@import "audit";
@import "data-synchro";
@import "datamodel-viewer";
@import "datamodel-viewer";
@import "global-search";

View File

@@ -0,0 +1,12 @@
$ibo-global-search--result--title--image--max-height: 48px !default;
$ibo-global-search--result--title--image--max-width: $ibo-global-search--result--title--image--max-height !default;
$ibo-global-search--result--title--image--margin-right: 8px !default;
.ibo-global-search--result--title{
@extend %ibo-font-ral-nor-150;
>img{
max-height: $ibo-global-search--result--title--image--max-height;
max-width: $ibo-global-search--result--title--image--max-width;
margin-right: $ibo-global-search--result--title--image--margin-right;
}
}

View File

@@ -1687,11 +1687,11 @@ EOF;
$oPage->add("<div class=\"page_header\">\n");
if (array_key_exists($sClassName, $aAccelerators))
{
$oPage->add("<h2>".MetaModel::GetClassIcon($sClassName)."&nbsp;<span class=\"hilite\">".Dict::Format('UI:Search:Count_ObjectsOf_Class_Found', count($aLeafs), Metamodel::GetName($sClassName)).$sEnlargeButton."</h2>\n");
$oPage->add('<h2 class="ibo-global-search--result--title">'.MetaModel::GetClassIcon($sClassName).Dict::Format('UI:Search:Count_ObjectsOf_Class_Found', count($aLeafs), Metamodel::GetName($sClassName)).$sEnlargeButton."</h2>\n");
}
else
{
$oPage->add("<h2>".MetaModel::GetClassIcon($sClassName)."&nbsp;<span class=\"hilite\">".Dict::Format('UI:Search:Count_ObjectsOf_Class_Found', count($aLeafs), Metamodel::GetName($sClassName))."</h2>\n");
$oPage->add('<h2 class="ibo-global-search--result--title">'.MetaModel::GetClassIcon($sClassName).Dict::Format('UI:Search:Count_ObjectsOf_Class_Found', count($aLeafs), Metamodel::GetName($sClassName))."</h2>\n");
}
$oPage->add("</div>\n");
$oLeafsFilter->AddCondition('id', $aLeafs, 'IN');
@@ -1710,7 +1710,7 @@ EOF;
{
$oPage->add("<div class=\"search-class-result search-class-$sClassName\">\n");
$oPage->add("<div class=\"page_header\">\n");
$oPage->add("<h2>".MetaModel::GetClassIcon($sClassName)."&nbsp;<span class=\"hilite\">".Dict::Format('UI:Search:Count_ObjectsOf_Class_Found', 0, Metamodel::GetName($sClassName)).$sEnlargeButton."</h2>\n");
$oPage->add('<h2 class="ibo-global-search--result--title">'.MetaModel::GetClassIcon($sClassName).Dict::Format('UI:Search:Count_ObjectsOf_Class_Found', 0, Metamodel::GetName($sClassName)).$sEnlargeButton."</h2>\n");
$oPage->add("</div>\n");
$oPage->add("</div>\n");
$oPage->p('&nbsp;'); // Some space ?