From 6aa0a4a47fbd1a52a12ed30b4417b9a43f26cce9 Mon Sep 17 00:00:00 2001 From: Kristof Rado Date: Fri, 29 May 2020 23:50:01 +0200 Subject: [PATCH] Renamed function --- modules/default/calendar/calendar.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 3a23978f..07fd40ab 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -244,7 +244,7 @@ Module.register("calendar", { } } - titleWrapper.innerHTML = this.titleTransform(event.title) + repeatingCountTitle; + titleWrapper.innerHTML = this.truncateTitle(event.title) + repeatingCountTitle; var titleClass = this.titleClassForUrl(event.url); @@ -396,7 +396,7 @@ Module.register("calendar", { var descCell = document.createElement("td"); descCell.className = "location"; descCell.colSpan = "2"; - descCell.innerHTML = this.titleTransform(event.location); + descCell.innerHTML = this.truncateTitle(event.location); locationRow.appendChild(descCell); wrapper.appendChild(locationRow); @@ -719,8 +719,8 @@ Module.register("calendar", { return string.charAt(0).toUpperCase() + string.slice(1); }, - /* titleTransform(title) - * Transforms the title of an event for usage. + /* truncateTitle(title) + * Transforms the title of an event and the location for usage. * Replaces parts of the text as defined in config.titleReplace. * Shortens title based on config.maxTitleLength and config.wrapEvents * @@ -728,7 +728,7 @@ Module.register("calendar", { * * return string - The transformed title. */ - titleTransform: function (title) { + truncateTitle: function (title) { for (var needle in this.config.titleReplace) { var replacement = this.config.titleReplace[needle];