From 08bbc433aea48fc7d054240577216570962e73ad Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 4 Nov 2015 23:05:22 +0000 Subject: [PATCH] Calendar display - Make hidden indicators clickable --- calendar/js/app.js | 2 +- calendar/js/et2_widget_daycol.js | 14 +++++++++++--- calendar/templates/default/app.css | 8 ++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index b2aa0a4c97..a74963ee52 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -551,7 +551,7 @@ app.classes.calendar = AppJS.extend( }); // Stop browser from caching style by forcing reflow wrapper[0].offsetHeight; - + wrapper.css({ "transition-duration": "", "transition-delay": "" diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index d54dfaedbb..41ef2c9f86 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -456,6 +456,7 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea this.div.children('.hiddenEventAfter').remove(); var timegrid = this._parent; + var day = this; // elem is jquery div of event function isHidden(elem) { @@ -504,16 +505,23 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResizea if(hidden.hidden === 'top' && $j('.hiddenEventBefore',this.header).length == 0) { indicator = $j('
') - .appendTo(this.header); + .appendTo(this.header) + .on('click', function() { + $j('.calendar_calEvent',day.div).first()[0].scrollIntoView(); + }); } else if(hidden.hidden === 'bottom') - { indicator = $j('.hiddenEventAfter',this.div); if(indicator.length == 0) { indicator = $j('
'); - this.div.append(indicator); + this.div.append(indicator) + .on('click', function() { + $j('.calendar_calEvent',day.div).last()[0].scrollIntoView(false); + // Better re-run this to clean up + day._out_of_view(); + }); } indicator.css('top',timegrid.scrolling.height() + timegrid.scrolling.scrollTop()-indicator.height()); } diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index 5143ed1744..8369f58339 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -263,9 +263,17 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget bottom: -7px; border-top: none; } +.calendar_calDayColHeader .hiddenEventBefore:hover { + bottom: -11px; + border-width: 10px; +} .calendar_calDayCol .hiddenEventAfter { border-bottom: none; } +.calendar_calDayCol .hiddenEventAfter:hover { + margin-top: -5px; + border-width: 10px; +} .calendar_calDayColAllDay {