diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 7d51ed88..f5ecab70 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -389,7 +389,7 @@ Module.register("calendar", { var descCell = document.createElement("td"); descCell.className = "location"; descCell.colSpan = "2"; - descCell.innerHTML = this.titleTransform(event.location); + descCell.innerHTML = this.locationTitleShorten(event.location); locationRow.appendChild(descCell); wrapper.appendChild(locationRow); @@ -736,6 +736,19 @@ Module.register("calendar", { return title; }, + /* + * locationTitleShorten(title) + * Shortens the event location title based on config.maxTitleLength and config.wrapEvents + * + * argument title string - the event location title to shorten + * + * return string - The shortened title. + */ + locationTitleShorten: function (title) { + title = this.shorten(title, this.config.maxTitleLength, this.config.wrapEvents, this.config.maxTitleLines); + return title; + }, + /* broadcastEvents() * Broadcasts the events to all other modules for reuse. * The all events available in one array, sorted on startdate.