diff --git a/calendar/resources/content/dayView.js b/calendar/resources/content/dayView.js index 522fdc9989e..0a02db2660c 100644 --- a/calendar/resources/content/dayView.js +++ b/calendar/resources/content/dayView.js @@ -401,8 +401,6 @@ DayView.prototype.createEventBoxInternal = function(itemOccurrence, startDate, e var eventSlotWidth = Math.round( ( hourWidth - kDayViewHourLeftStart ) / 1 /*calendarEventDisplay.totalSlotCount */); - var eventLocation = calEvent.location; - //calculate event dimensions var eventTop = startHourTreeItem.boxObject.y - startHourTreeItem.parentNode.boxObject.y + @@ -414,12 +412,14 @@ DayView.prototype.createEventBoxInternal = function(itemOccurrence, startDate, e // create title label, location label and description description :) var eventTitleLabel = document.createElement( "label" ); eventTitleLabel.setAttribute( "class", "day-view-event-title-label-class" ); + + var eventLocation = calEvent.getProperty("LOCATION"); if (eventLocation) eventTitleLabel.setAttribute( "value", calEvent.title + " (" + eventLocation + ")" ); else eventTitleLabel.setAttribute( "value", calEvent.title ); - var desc = calEvent.getProperty("description"); + var desc = calEvent.getProperty("DESCRIPTION"); if (!desc) desc = "" var eventText = document.createTextNode(desc); diff --git a/calendar/resources/content/weekView.js b/calendar/resources/content/weekView.js index 2f1a6c9feab..32fc853efeb 100644 --- a/calendar/resources/content/weekView.js +++ b/calendar/resources/content/weekView.js @@ -425,18 +425,20 @@ dump(this.displayEndDate+"\n"); eventBox.setAttribute("tooltip", "eventTooltip"); // Event box text (title, location and description) - if (calEvent.title || calEvent.getProperty("location")) { + var locationText = calEvent.getProperty("LOCATION"); + if (calEvent.title || locationText) { var titleText = ( (calEvent.title || "") + - (calEvent.getProperty("location") ? " ("+calEvent.getProperty("location")+")" : "") ); + (locationText ? " ("+locationText+")" : "") ); var titleElement = document.createElement( "label" ); titleElement.setAttribute( "class", "week-view-event-title-label-class" ); titleElement.appendChild( document.createTextNode( titleText )); eventBox.appendChild( titleElement ); } - if (calEvent.getProperty("description")) { + var descriptionText = calEvent.getProperty("DESCRIPTION"); + if (descriptionText) { var descriptionElement = document.createElement( "description" ); descriptionElement.setAttribute( "class", "week-view-event-description-class" ); - descriptionElement.appendChild( document.createTextNode( calEvent.getProperty("description") )); + descriptionElement.appendChild(document.createTextNode(descriptionText)); eventBox.appendChild( descriptionElement ); }