From c4e24a1e581a19a2808b46c3de1e89c9a678905f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 30 Jun 2009 18:21:15 +0000 Subject: [PATCH] if we have more then 5 cf's to display --> limit header height to 5 lines plus vertical scrollbar --- etemplate/inc/class.nextmatch_widget.inc.php | 11 +++++++++++ etemplate/templates/default/app.css | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index 71e6a1de03..9d301deb67 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -576,6 +576,17 @@ class nextmatch_widget unset($header); } } + // do we have more then 5 cf's to display --> limit header height to 5 lines plus vertical scrollbar + $num = !$allowed ? count($this->cfs) : count($allowed); + if ($num > 5) + { + $vbox = $cell; + $cell = etemplate::empty_cell('box','',array( + 'size' => '0,,0,0', + 'span' => ',cf_header_height_limit', + )); + etemplate::add_child($cell,$vbox); + } return false; // no extra label } diff --git a/etemplate/templates/default/app.css b/etemplate/templates/default/app.css index 988c1b5f20..56dc05bc6f 100644 --- a/etemplate/templates/default/app.css +++ b/etemplate/templates/default/app.css @@ -144,3 +144,12 @@ border-bottom: 4px solid red; border-right: 4px solid red; } + +/** + * class for big (more then 5 lines) custom field nextmatch header + */ +.cf_header_height_limit { + max-height: 6.75em; + overflow: auto; + padding-right: 15px; +} \ No newline at end of file