From 7068d7827b1625ebdf985841b55b5243c01fd4ec Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Wed, 28 Aug 2013 16:04:54 +0300 Subject: The colon in the calendar event caption is now also hideable. Fixes #12460 Change-Id: Idc81c3cc614bc59c2a93615bd5ac5cac9b72f752 --- .../client/ui/calendar/schedule/DateCellDayEvent.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java index b69d2a4fe7..39de122694 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java @@ -185,10 +185,15 @@ public class DateCellDayEvent extends FocusableHTML implements * If false, event is so small that caption must be in time-row */ private void updateCaptions(boolean bigMode) { - String separator = bigMode ? "
" : ": "; - caption.setInnerHTML("" + calendarEvent.getTimeAsText() - + "" + separator - + Util.escapeHTML(calendarEvent.getCaption())); + String innerHtml; + String escapedCaption = Util.escapeHTML(calendarEvent.getCaption()); + String timeAsText = calendarEvent.getTimeAsText(); + if (bigMode) { + innerHtml = "" + timeAsText + "
" + escapedCaption; + } else { + innerHtml = "" + timeAsText + ": " + escapedCaption; + } + caption.setInnerHTML(innerHtml); eventContent.setInnerHTML(""); } -- cgit v1.2.3