In single week view, only show the date labels once

This commit is contained in:
Nathan Gray 2016-01-22 00:22:08 +00:00
parent c4923848ef
commit ac4bef3c47
3 changed files with 36 additions and 9 deletions

View File

@ -543,6 +543,7 @@ app.classes.calendar = AppJS.extend(
parent = widget._parent;
var idx = sortedArr.indexOf(widget.options.owner);
children.splice(idx,0,widget);
widget.resize();
},this,et2_calendar_timegrid);
}
parent._children.sort(function(a,b) {
@ -1999,6 +2000,9 @@ app.classes.calendar = AppJS.extend(
// We'll modify this one, so it needs to be a new object
var date = new Date(state.state.first);
// Hide all but the first day header
$j(grid.getDOMNode()).toggleClass('hideDayColHeader',state.state.view == 'week');
// Determine the different end date & varying values
switch(state.state.view)
{

View File

@ -1690,15 +1690,12 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
if(!widget.disabled) widget.set_granularity(0);
},this, et2_calendar_timegrid);
}
if(this.options.height+"px" !== this.div.css('height'))
{
this.div.css('height', this.options.height);
this.div.css('height', this.options.height);
// Re-do time grid
if(!this.update_timer) this._drawTimes();
// Just re-did everything, no need to do more
return;
// Re-do time grid
if(!this.update_timer)
{
this._drawTimes();
}
// Try to resize width, though animations cause problems

View File

@ -203,6 +203,27 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
right: 0px;
position: absolute;
}
/*
Show the day headers for single week view only once.
Hide subsequent headers in week view with non-consolidated owners
*/
#calendar-view_view.hideDayColHeader tr:not(:first-of-type) .calendar_calGridHeader .calendar_calDayColHeader
{
min-height: 0.5em;
}
#calendar-view_view.hideDayColHeader tr:not(:first-of-type) .calendar_calGridHeader .calendar_calDayColHeader > div[data-date] {
display:none;
}
#calendar-view_view.hideDayColHeader tr:not(:first-of-type) .calendar_calGridHeader > ul > li {
white-space:nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
#calendar-view_view.hideDayColHeader tr:not(:first-of-type) .calendar_calGridHeader > ul > li:hover {
overflow: visible;
}
/* single row in the time-line you dont need to set a bgcolor, but you can
*/
.calendar_calTimeRow {
@ -367,6 +388,11 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
width: 58px;
text-align: center;
}
.calendar_calGridHeader > ul {
position: absolute;
width: 55px;
}
.calendar_TimeGridNoLabel > .calendar_calGridHeader > ul {
display: none;
}
@ -423,7 +449,7 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
z-index: 29;
border-bottom: 1px solid silver;
border-top: 1px solid silver;
min-height: 2ex;
min-height: 1ex;
flex: 0 0 auto;
}
#calendar-view_view tbody.ui-sortable {