Add a preference to control how many lines are allowed for all day non-blocking events before we start hiding some

This commit is contained in:
nathangray 2016-07-21 14:01:47 -06:00
parent 7181b4eab4
commit 5b7e29a39a
2 changed files with 11 additions and 0 deletions

View File

@ -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',

View File

@ -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")