From 77e0036b7d8345284a8d2ed8562730ff28c8b7c2 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 29 Oct 2009 10:09:09 +0000 Subject: [PATCH] Updated listing for minimum column widths git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14704 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_listing.inc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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'"; } } -- 2.30.2