Fix week view with multiple users (non-consolidated) still had some space where the user could click on the day header, which was recogized as a header click instead of an all day non-blocking click

This commit is contained in:
nathangray 2016-07-25 11:22:32 -06:00
parent 00eacc6791
commit 92c8493eb8
2 changed files with 18 additions and 4 deletions

View File

@ -1086,11 +1086,16 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
{ {
// Click on the header, but not the title. That's an all-day non-blocking // Click on the header, but not the title. That's an all-day non-blocking
var end = this.date.getFullYear() + '-' + (this.date.getUTCMonth()+1) + '-' + this.date.getUTCDate() + 'T23:59'; var end = this.date.getFullYear() + '-' + (this.date.getUTCMonth()+1) + '-' + this.date.getUTCDate() + 'T23:59';
this.egw().open(null, 'calendar', 'add', { var options = {
start: this.date.toJSON(), start: this.date.toJSON(),
end: end, end: end,
non_blocking: true non_blocking: true
} , '_blank'); }
if (this.options.owner != app.calendar.state.owner)
{
options.owner = this.options.owner;
}
this.egw().open(null, 'calendar', 'add', options, '_blank');
return false; return false;
} }
} }

View File

@ -1864,6 +1864,8 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
*/ */
_mouse_down: function(event) _mouse_down: function(event)
{ {
if(event.which !== 1) return;
var start = jQuery.extend({},this.gridHover[0].dataset); var start = jQuery.extend({},this.gridHover[0].dataset);
if(start.date) if(start.date)
{ {
@ -1993,6 +1995,10 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
for(var id in this.gridHover[0].dataset) { for(var id in this.gridHover[0].dataset) {
delete this.gridHover[0].dataset[id]; delete this.gridHover[0].dataset[id];
} }
if(this.options.granularity == 0)
{
this.gridHover.css('height','');
}
while(node && node != this.node && node.tagName != 'BODY' && path.length < 10) while(node && node != this.node && node.tagName != 'BODY' && path.length < 10)
{ {
path.push(node); path.push(node);
@ -2006,7 +2012,10 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
position: 'absolute', position: 'absolute',
top: '', top: '',
bottom: '0px', bottom: '0px',
height: $node.css('padding-bottom') // Use 100% height if we're hiding the day labels to avoid
// any remaining space from the hidden labels
height: $node.height() > parseInt($node.css('line-height')) ?
$node.css('padding-bottom') : '100%'
}); });
day = node; day = node;
this.gridHover this.gridHover