Pārlūkot izejas kodu

Fix the display width of case logs. Make sure that the field wraps even in case of very long strings inside the field.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1202 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 gadi atpakaļ
vecāks
revīzija
85efa625a3
2 mainītis faili ar 10 papildinājumiem un 2 dzēšanām
  1. 5 2
      core/ormcaselog.class.inc.php
  2. 5 0
      css/light-grey.css

+ 5 - 2
core/ormcaselog.class.inc.php

@@ -55,7 +55,7 @@ class ormCaseLog {
 	
 	public function GetAsHTML(WebPage $oP = null, $bEditMode = false, $aTransfoHandler = null)
 	{
-		$sHtml = '';
+		$sHtml = '<table style="width:100%;table-layout:fixed"><tr><td>'; // Use table-layout:fixed to force the with to be independent from the actual content
 		$iPos = 0;
 		for($index=count($this->m_aIndex)-1 ; $index >= 0 ; $index--)
 		{
@@ -99,7 +99,9 @@ class ormCaseLog {
 
 			if (count($this->m_aIndex) == 0)
 			{
-				$sHtml .= "<div>$sTextEntry</div>\n";
+				$sHtml .= '<div class="caselog_entry open">';
+				$sHtml .= $sTextEntry;
+				$sHtml .= '</div>';
 			}
 			else
 			{
@@ -121,6 +123,7 @@ class ormCaseLog {
 				$sHtml .= '</div>';
 			}
 		}
+		$sHtml .= '</td></tr></table>';
 		return $sHtml;
 	}
 	

+ 5 - 0
css/light-grey.css

@@ -1025,6 +1025,11 @@ span.form_validation {
 	border-bottom:1px #999 solid;
 	margin-left:0;
 	margin-right:0;
+ 	white-space: pre-wrap; /* css-3 */
+    white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
+    white-space: -pre-wrap; /* Opera 4-6 */
+    white-space: -o-pre-wrap; /* Opera 7 */
+    word-wrap: break-word; /* Internet Explorer 5.5+, CSS3 */
 }
 table.details {
   border-collapse: collapse;