diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 9b018c5256..41b5d48a94 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -259,6 +259,24 @@ EOF; EOF ); + // Attribute tag tooltips + $this->add_ready_script( +<<add_init_script( <<< EOF try diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index bee831efaf..c7f8da3d7c 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -7166,6 +7166,8 @@ class AttributeTagSet extends AttributeDBFieldVoid $sClass = MetaModel::GetAttributeOrigin($this->GetHostClass(), $this->GetCode()); $sAttCode = $this->GetCode(); $sTagCode = $oTag->Get('code'); + $sTagLabel = $oTag->Get('label'); + $sTagDescription = $oTag->Get('description'); $oFilter = DBSearch::FromOQL("SELECT $sClass WHERE $sAttCode MATCHES '$sTagCode'"); $oAppContext = new ApplicationContext(); $sContext = $oAppContext->GetForLink(); @@ -7173,11 +7175,11 @@ class AttributeTagSet extends AttributeDBFieldVoid $sFilter = urlencode($oFilter->serialize()); $sUrl = utils::GetAbsoluteUrlAppRoot()."pages/$sUIPage?operation=search&filter=".$sFilter."&{$sContext}"; - $sHtml .= ''.$oTag->Get('label').''; + $sHtml .= ''.$sTagLabel.''; } else { - $sHtml .= ''.$oTag.''; + $sHtml .= ''.$oTag.''; } } $sHtml .= ''; diff --git a/core/tagsetfield.class.inc.php b/core/tagsetfield.class.inc.php index 55ce3f8e16..8301597098 100644 --- a/core/tagsetfield.class.inc.php +++ b/core/tagsetfield.class.inc.php @@ -65,7 +65,7 @@ abstract class TagSetFieldData extends cmdbAbstractObject "is_null_allowed" => false, "depends_on" => array() ))); - MetaModel::Init_AddAttribute(new AttributeString("description", array( + MetaModel::Init_AddAttribute(new AttributeHTML("description", array( "allowed_values" => null, "sql" => 'description', "default_value" => '', diff --git a/css/light-grey.css b/css/light-grey.css index 53dce8985e..550741d90b 100644 --- a/css/light-grey.css +++ b/css/light-grey.css @@ -2918,7 +2918,12 @@ table.listResults .originColor { .attribute-tagset .attribute-tag { display: inline-block; margin-right: 3px; + margin-bottom: 3px; padding: 4px 6px; + max-width: 120px; + overflow-x: hidden; + text-overflow: ellipsis; + white-space: nowrap; background-color: #fdfdfd; border-radius: 2px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px 1px #f1f1f1; diff --git a/css/light-grey.scss b/css/light-grey.scss index 5fc4c0f713..77a6d54f9c 100644 --- a/css/light-grey.scss +++ b/css/light-grey.scss @@ -3342,7 +3342,12 @@ table.listResults .originColor{ .attribute-tagset .attribute-tag{ display: inline-block; margin-right: 3px; + margin-bottom: 3px; padding: 4px 6px; + max-width: 120px; + overflow-x: hidden; + text-overflow: ellipsis; + white-space: nowrap; background-color: #fdfdfd; border-radius: 2px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15), 0 0 1px 1px rgb(241, 241, 241, 0.7);