forked from extern/egroupware
Event display:
- Show description in event body, as much as will fit - Preserve whitespace in event description - Change when event title is shown in header to be based on available space, not grid size - Adjust z-index of overlapping events to reduce covering
This commit is contained in:
parent
bc2e0060da
commit
bddf7ab28b
@ -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('height', height+'%');
|
||||||
columns[c][i].div.css('left', left.toFixed(1)+'%');
|
columns[c][i].div.css('left', left.toFixed(1)+'%');
|
||||||
columns[c][i].div.css('width', width.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);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,11 +239,8 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
|
|
||||||
// Header
|
// Header
|
||||||
var title = !event.is_private ? event['title'] : egw.lang('private');
|
var title = !event.is_private ? event['title'] : egw.lang('private');
|
||||||
var small_height = true;
|
// If there isn't enough height for header + 1 line in the body, it's small
|
||||||
if(this._parent.display_settings)
|
var small_height = this.div.innerHeight() <= this.title.height() * 2;
|
||||||
{
|
|
||||||
small_height = event['end_m']-event['start_m'] < this._parent.display_settings.granularity;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.div.attr('data-title', title);
|
this.div.attr('data-title', title);
|
||||||
this.title.text(small_height ? title : this._get_timespan(event));
|
this.title.text(small_height ? title : this._get_timespan(event));
|
||||||
@ -268,7 +265,9 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.body.html('<span class="calendar_calEventTitle">'+title+'</span>')
|
this.body
|
||||||
|
.html('<span class="calendar_calEventTitle">'+title+'</span>')
|
||||||
|
.append('<p>'+this.options.value.description+'</p>');
|
||||||
}
|
}
|
||||||
this.body
|
this.body
|
||||||
// Set background color to a lighter version of the header color
|
// Set background color to a lighter version of the header color
|
||||||
|
@ -526,6 +526,8 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
|
|||||||
right: 2px;
|
right: 2px;
|
||||||
height: 99%;
|
height: 99%;
|
||||||
|
|
||||||
|
white-space: normal;
|
||||||
|
|
||||||
/* Gradient */
|
/* Gradient */
|
||||||
background-image: -webkit-linear-gradient(0deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.85) 60%);
|
background-image: -webkit-linear-gradient(0deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.85) 60%);
|
||||||
background-image: -moz-linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.85) 60%);
|
background-image: -moz-linear-gradient(90deg, 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;
|
-webkit-background-size: auto auto;
|
||||||
background-size: auto auto;
|
background-size: auto auto;
|
||||||
}
|
}
|
||||||
|
.calendar_calEventBody > p, .calendar_calEventBodySmall > p {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.calendar_calEventBodySmall{
|
.calendar_calEventBodySmall{
|
||||||
font-size: 95%;
|
font-size: 95%;
|
||||||
|
Loading…
Reference in New Issue
Block a user