Fix all day non-blocking overflow calculation causing false positives

This commit is contained in:
Nathan Gray 2016-04-27 22:23:06 +00:00
parent 91b8995938
commit 40bdd2771d
2 changed files with 5 additions and 4 deletions

View File

@ -569,7 +569,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
}
// Check all day overflow
this.all_day.toggleClass('overflown',
this.all_day[0].scrollHeight - this.all_day.height() > 5
this.all_day[0].scrollHeight - this.all_day.innerHeight() > 5
);
// Check each event
@ -1000,7 +1000,7 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
// Click on the title
if ($j(_ev.target).hasClass('calendar_calAddEvent'))
{
if(!_ev.target.dataset.whole_day)
if(this.header.has(_ev.target).length == 0 && !_ev.target.dataset.whole_day)
{
// Default handler to open a new event at the selected time
var options = {

View File

@ -1708,11 +1708,12 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
delete this.gridHover[0].dataset[id];
}
var node = document.elementFromPoint(x,y);
var $node = $j(node);
// Ignore high level & non-time (grid itself, header parent & week label)
if([this.node, this.gridHeader[0], this._labelContainer[0]].indexOf(node) !== -1 ||
// Day labels
this.gridHeader.has(node).length && !$j(node).hasClass("calendar_calDayColAllDay"))
this.gridHeader.has(node).length && !$node.hasClass("calendar_calDayColAllDay") && !$node.hasClass('calendar_calDayColHeader'))
{
return [];
}
@ -1721,7 +1722,7 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
{
path.push(node);
node.style.display = 'none';
var $node = $j(node);
$node = $j(node);
if($node.hasClass('calendar_calDayColHeader')) {
for(var id in node.dataset) {
this.gridHover[0].dataset[id] = node.dataset[id];