From 5b7e29a39a31b154f61cb8f2dd0c3e96a889cdd8 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 21 Jul 2016 14:01:47 -0600 Subject: [PATCH] Add a preference to control how many lines are allowed for all day non-blocking events before we start hiding some --- calendar/inc/class.calendar_hooks.inc.php | 10 ++++++++++ calendar/js/et2_widget_daycol.js | 1 + 2 files changed, 11 insertions(+) diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index 4467ee3151..b91b88f5ab 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -306,6 +306,16 @@ class calendar_hooks 'xmlrpc' => True, 'admin' => False ), + 'limit_all_day_lines' => array( + 'type' => 'input', + 'size' => 5, + 'label' => 'Limit number of lines for all day events', + 'name' => 'limit_all_day_lines', + 'help' => 'How many lines of all day events should be directly visible. Further lines are available via a mouseover.', + 'xmlrpc' => True, + 'default'=> 3, + 'admin' => False + ), 'planner_show_empty_rows' => array( 'type' => 'select', 'label' => 'Show empty rows in Planner', diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index fe3e33bd87..5f7728c2e1 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -72,6 +72,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte .appendTo(this.header); this.all_day = jQuery(document.createElement('div')) .addClass("calendar_calDayColAllDay") + .css('max-height', (egw.preference('limit_all_day_lines', 'calendar') || 3 ) * 1.4 + 'em') .appendTo(this.header); this.event_wrapper = jQuery(document.createElement('div')) .addClass("event_wrapper")