From 38d350319be0ccaeb53349a47206073fbbcb513f Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Wed, 6 Dec 2023 16:54:55 +0100 Subject: [PATCH 1/4] Uniform background color for fields in dark mode Related to #1299 + #1171 --- www/calendar/app-calendar.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/calendar/app-calendar.less b/www/calendar/app-calendar.less index 232f3467d..e96c15f86 100644 --- a/www/calendar/app-calendar.less +++ b/www/calendar/app-calendar.less @@ -250,7 +250,7 @@ } .CodeMirror { margin-top: 5px; - background: @cp_forms-bg; + background: @cp_forms-bg !important; color: @cryptpad_text_col; border: 1px solid @cp_forms-border; border-radius: @variables_radius; From 4163bd8b30b58968e5c04eb0387114eb5e46e92c Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Wed, 6 Dec 2023 17:18:02 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Replace=20=E2=80=9CLocation:=E2=80=9D=20wit?= =?UTF-8?q?h=20an=20icon=20and=20remove=20the=20=E2=80=9CDescription:?= =?UTF-8?q?=E2=80=9D=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; }, From a24bc397a62cb04711c3abdb3404f224764e9357 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Thu, 7 Dec 2023 18:10:59 +0100 Subject: [PATCH 3/4] Lint compliance --- www/calendar/inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/calendar/inner.js b/www/calendar/inner.js index cb71ff1b1..fbd56ce07 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`? - delete Messages.calendar_location // XXX Remove Messages.calendar_location from translation keys as it is not used anymore? + 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 = { From c11f946379c1cc502aa36db3d655b8450650a053 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Tue, 12 Dec 2023 10:55:45 +0100 Subject: [PATCH 4/4] Code cleanup Remove `XXX` comments related to PRs #1308 and #1312 --- www/calendar/inner.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/www/calendar/inner.js b/www/calendar/inner.js index fbd56ce07..c92b4d966 100644 --- a/www/calendar/inner.js +++ b/www/calendar/inner.js @@ -1012,13 +1012,12 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v makeLeftside(cal, $(leftside)); cal.on('beforeCreateSchedule', function(event) { - event.recurrenceRule = APP.recurrenceRule; // XXX Not sure about the consistency of data structures + event.recurrenceRule = APP.recurrenceRule; newEvent(event, function (err) { if (err) { console.error(err); return void UI.warn(err); } - //cal.createSchedules([schedule]); XXX Remove these occurrences elsewhere }); }); cal.on('beforeUpdateSchedule', function(event) { @@ -1127,7 +1126,6 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v console.error(err); return void UI.warn(err); } - //cal.updateSchedule(old.id, old.calendarId, changes); }); } };