From df5b63de0064bf2ded20373ac240a85e96960513 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 31 Oct 2010 13:52:37 +0000 Subject: [PATCH] display selection boxes that contain only one element as text --- lam/lib/html.inc | 19 +++++++++++++++++++ lam/style/500_layout.css | 8 ++++++++ 2 files changed, 27 insertions(+) diff --git a/lam/lib/html.inc b/lam/lib/html.inc index 495fb465..ef0e5070 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -740,6 +740,11 @@ class htmlSelect extends htmlElement { if ($this->width != '') { $style = ' style="width: ' . $this->width . '"'; } + // hide select boxes that contain less than 2 elements + if (sizeof($this->elements) < 2) { + echo ''; + if ($this->hasDescriptiveElements) { + $keys = array_keys($this->elements); + echo $keys[0]; + } + else { + echo $this->elements[0]; + } + } + else if (sizeof($this->elements) == 0) { + echo ''; + } if ($this->multiSelect) { return array($this->name => 'multiselect'); } diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index 0be17517..55c4ac01 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -148,6 +148,10 @@ tr.highlight { background-image: url(../graphics/tools.png) !important; } +.upButton { + background-image: url(../graphics/up.gif) !important; +} + .smallPadding span { padding: 0.1em 0.4em !important; } @@ -172,6 +176,10 @@ tr.highlight { color: black; } +.hidden { + display: none; +} + /** * table style for delete.php *