From 4163bd8b30b58968e5c04eb0387114eb5e46e92c Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Wed, 6 Dec 2023 17:18:02 +0100 Subject: [PATCH] =?UTF-8?q?Replace=20=E2=80=9CLocation:=E2=80=9D=20with=20?= =?UTF-8?q?an=20icon=20and=20remove=20the=20=E2=80=9CDescription:=E2=80=9D?= =?UTF-8?q?=20text=20in=20the=20popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to #1299 + #1171 --- www/calendar/app-calendar.less | 5 ++++- www/calendar/inner.js | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/www/calendar/app-calendar.less b/www/calendar/app-calendar.less index e96c15f86..3c40ac5d6 100644 --- a/www/calendar/app-calendar.less +++ b/www/calendar/app-calendar.less @@ -162,9 +162,12 @@ color: @cryptpad_text_col; border-radius: @variables_radius_L; font-weight: normal; - .tui-full-calendar-icon:not(.tui-full-calendar-calendar-dot):not(.tui-full-calendar-dropdown-arrow):not(.tui-full-calendar-ic-checkbox) { + .tui-full-calendar-icon:not(.tui-full-calendar-calendar-dot):not(.tui-full-calendar-dropdown-arrow):not(.tui-full-calendar-ic-checkbox):not(.fa-map-marker) { display: none; } + .tui-full-calendar-icon { + text-align:center; + } .tui-full-calendar-popup-detail-item { a { color: @cryptpad_color_link; diff --git a/www/calendar/inner.js b/www/calendar/inner.js index 447deb0a0..cb71ff1b1 100644 --- a/www/calendar/inner.js +++ b/www/calendar/inner.js @@ -74,7 +74,7 @@ define([ Messages.calendar_rec_change_first = "You moved the first repeating event to different calendar. You can only apply this change to all repeated events."; // XXX New translation key Messages.calendar_rec_change = "You moved a repeating event to different calendar. You can only apply this change to this event or all repeated events."; // XXX New translation key Messages.calendar_desc = "Description"; // XXX maybe rename in `description`? - Messages.calendar_description = "Description:{0}{1}"; // XXX + delete Messages.calendar_location // XXX Remove Messages.calendar_location from translation keys as it is not used anymore? var SaveAs = window.saveAs; var APP = window.APP = { @@ -408,13 +408,13 @@ define([ str = `${str}`; APP.nextLocationUid = uid; } - - return Messages._getKey('calendar_location', [str]); + let location_icon = h('i.fa.fa-map-marker.tui-full-calendar-icon', { 'aria-label': Messages.calendar_loc }, []); + return location_icon.outerHTML + str; }, popupDetailBody: function(schedule) { var str = schedule.body; delete APP.eventBody; - return Messages._getKey('calendar_description', ['
', diffMk.render(str, true)]); + return diffMk.render(str, true); }, popupIsAllDay: function() { return Messages.calendar_allDay; }, titlePlaceholder: function() { return Messages.calendar_title; },