diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index a9df7b23d..490ac95ef 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -1,5 +1,5 @@ add(''); foreach($aCols as $sColIndex => $aFieldsets) { - $oPage->add('
'); + $oPage->add(''); //$aDetails[$sTab][$sColIndex] = array(); $sLabel = ''; $sPreviousLabel = ''; @@ -745,7 +749,8 @@ EOF // Checking how the field should be rendered // Note: For view mode, this is done in cmdbAbstractObject::GetFieldAsHtml() - if(in_array($oAttDef->GetEditClass(), array('Text', 'HTML', 'CaseLog', 'CustomFields'))) + // Note 2: Shouldn't this be a property of the AttDef instead an array that we have to maintain? + if(in_array($oAttDef->GetEditClass(), array('Text', 'HTML', 'CaseLog', 'CustomFields', 'OQLExpression'))) { $val['layout'] = 'large'; } @@ -2157,6 +2162,31 @@ EOF $sHTMLValue = "
{$sValidationSpan}{$sReloadSpan}"; $aEventsList[] ='keyup'; $aEventsList[] ='change'; + + // Adding tooltip so we can read the whole value when its very long (eg. URL) + if(!empty($sDisplayValue)) + { + $oPage->add_ready_script( +<<GetEditClass(), array('Text', 'HTML', 'CaseLog', 'CustomFields'))) + // Note 2: Shouldn't this be a AttDef property instead of an array to maintain? + if(in_array($oAttDef->GetEditClass(), array('Text', 'HTML', 'CaseLog', 'CustomFields', 'OQLExpression'))) { $retVal['layout'] = 'large'; } diff --git a/css/light-grey.css b/css/light-grey.css index 02e106335..5618b374b 100644 --- a/css/light-grey.css +++ b/css/light-grey.css @@ -1167,7 +1167,7 @@ span.form_validation { } /* Helper classes for object details display. */ .one-col-details { - min-width: 300px; + min-width: 400px; max-width: 600px; } .n-cols-details { @@ -1380,7 +1380,7 @@ fieldset .details > .field_container { /* On a single column, field labels can take more width but they are limited so it doesn't feel weird when all labels are short */ } .one-col-details .details .field_container.field_small div.field_label { - width: 145px; + width: 160px; } /* This is extracted from the ".details > .field_container ..." because of the fullscreen option (element is moved at the end of the body */ .field_input_text { diff --git a/css/light-grey.scss b/css/light-grey.scss index 78ce31528..ecc5f101e 100644 --- a/css/light-grey.scss +++ b/css/light-grey.scss @@ -1266,7 +1266,7 @@ span.form_validation { /* Helper classes for object details display. */ .one-col-details { - min-width: 300px; + min-width: 400px; max-width: 600px; } .n-cols-details { @@ -1536,7 +1536,7 @@ fieldset .details>.field_container { .one-col-details .details .field_container.field_small { div.field_label { /* On a single column, field labels can take more width but they are limited so it doesn't feel weird when all labels are short */ - width: 145px; + width: 160px; } } /* This is extracted from the ".details > .field_container ..." because of the fullscreen option (element is moved at the end of the body */