From 4d5f8da0c976aa39682bcce9beb874fca97f2ea6 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 15 Dec 2015 17:07:19 +0000 Subject: [PATCH] Use background color if border color is white --- calendar/js/et2_widget_daycol.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index d832edd420..14a8719671 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -558,13 +558,15 @@ var et2_calendar_daycol = et2_valueWidget.extend([et2_IDetachedDOM], indicator.css('top',timegrid.scrolling.height() + timegrid.scrolling.scrollTop()-indicator.height()); } // Match color to the event - if(indicator !== '' && - // Avoid white, which is hard to see - jQuery.Color(event.div.css('border-top-color')).toString() !== jQuery.Color('white').toString() - ) + if(indicator !== '') { + + // Avoid white, which is hard to see + var color = jQuery.Color(event.div.css('border-top-color')).toString() !== jQuery.Color('white').toString() ? + event.div.css('border-top-color') : event.div.css('background-color'); + // Use border-top-color, Firefox doesn't give a value with border-color - indicator.css('border-color', event.div.css('border-top-color')); + indicator.css('border-color', color); } } }, this, et2_calendar_event);