diff options
author | Jonatan Kronqvist <jonatan@vaadin.com> | 2013-08-28 16:04:54 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-09-02 11:15:05 +0000 |
commit | 7068d7827b1625ebdf985841b55b5243c01fd4ec (patch) | |
tree | 4fe0bc9fcb60fa9b565b76c3453cc86a64e8e9e5 /client | |
parent | a24d391349354579a83ab2f6b50e9552fbe2566a (diff) | |
download | vaadin-framework-7068d7827b1625ebdf985841b55b5243c01fd4ec.tar.gz vaadin-framework-7068d7827b1625ebdf985841b55b5243c01fd4ec.zip |
The colon in the calendar event caption is now also hideable. Fixes #12460
Change-Id: Idc81c3cc614bc59c2a93615bd5ac5cac9b72f752
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java | 13 |
1 files changed, 9 insertions, 4 deletions
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 ? "<br />" : ": "; - caption.setInnerHTML("<span>" + calendarEvent.getTimeAsText() - + "</span>" + separator - + Util.escapeHTML(calendarEvent.getCaption())); + String innerHtml; + String escapedCaption = Util.escapeHTML(calendarEvent.getCaption()); + String timeAsText = calendarEvent.getTimeAsText(); + if (bigMode) { + innerHtml = "<span>" + timeAsText + "</span><br />" + escapedCaption; + } else { + innerHtml = "<span>" + timeAsText + "<span>:</span></span> " + escapedCaption; + } + caption.setInnerHTML(innerHtml); eventContent.setInnerHTML(""); } |