From: cajus Date: Thu, 29 Oct 2009 10:09:09 +0000 (+0000) Subject: Updated listing for minimum column widths X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=77e0036b7d8345284a8d2ed8562730ff28c8b7c2;p=gosa.git Updated listing for minimum column widths git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14704 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index c917e961a..464f0a0dd 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -557,30 +557,35 @@ class listing { $cols= split("\|", $layout); foreach ($cols as $index => $config) { if ($config != "") { + $res= ""; $components= split(';', $config); - $config= ""; foreach ($components as $part) { if (preg_match("/^r$/", $part)) { - $config.= "text-align:right;"; + $res.= "text-align:right;"; continue; } if (preg_match("/^l$/", $part)) { - $config.= "text-align:left;"; + $res.= "text-align:left;"; continue; } if (preg_match("/^c$/", $part)) { - $config.= "text-align:center;"; + $res.= "text-align:center;"; continue; } if (preg_match("/^[0-9]+(|px|%)$/", $part)) { - $config.= "width:$part;"; + $res.= "width:$part;min-width:$part;"; continue; } } - $result[$index]= " style='$config' "; + // Add minimum width for scalable columns + if (!preg_match('/width:/', $res)){ + $res.= "min-width:200px;"; + } + + $result[$index]= " style='$res' "; } else { - $result[$index]= null; + $result[$index]= " style='min-width:100px'"; } }