diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index 8f3a706fda..70fe279e57 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -692,6 +692,7 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM], columns[c][i].div.css('height', height+'%'); columns[c][i].div.css('left', left.toFixed(1)+'%'); columns[c][i].div.css('width', width.toFixed(1)+'%'); + columns[c][i].div.css('z-index',parseInt(columns[c][i].div.css('z-index'))+c); } } diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index e0896aa05c..65ee69db42 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -239,15 +239,12 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM], // Header var title = !event.is_private ? event['title'] : egw.lang('private'); - var small_height = true; - if(this._parent.display_settings) - { - small_height = event['end_m']-event['start_m'] < this._parent.display_settings.granularity; - } + // If there isn't enough height for header + 1 line in the body, it's small + var small_height = this.div.innerHeight() <= this.title.height() * 2; this.div.attr('data-title', title); this.title.text(small_height ? title : this._get_timespan(event)); - + // Colors - don't make them transparent if there is no color if(jQuery.Color("rgba(0,0,0,0)").toRgbaString() != jQuery.Color(this.div,'background-color').toRgbaString()) { @@ -268,7 +265,9 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM], } else { - this.body.html(''+title+'') + this.body + .html(''+title+'') + .append('

'+this.options.value.description+'

'); } this.body // Set background color to a lighter version of the header color diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index 1242173028..bb93546561 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -525,6 +525,8 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget left: 2px; right: 2px; height: 99%; + + white-space: normal; /* Gradient */ background-image: -webkit-linear-gradient(0deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.85) 60%); @@ -538,6 +540,9 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget -webkit-background-size: auto auto; background-size: auto auto; } +.calendar_calEventBody > p, .calendar_calEventBodySmall > p { + white-space: pre-wrap; +} .calendar_calEventBodySmall{ font-size: 95%;