Merge branch 'feature-calendar-description' into staging

This commit is contained in:
yflory 2023-12-13 15:38:47 +01:00
commit d51bd92aa6
2 changed files with 10 additions and 9 deletions

View File

@ -162,9 +162,12 @@
color: @cryptpad_text_col; color: @cryptpad_text_col;
border-radius: @variables_radius_L; border-radius: @variables_radius_L;
font-weight: normal; 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; display: none;
} }
.tui-full-calendar-icon {
text-align:center;
}
.tui-full-calendar-popup-detail-item { .tui-full-calendar-popup-detail-item {
a { a {
color: @cryptpad_color_link; color: @cryptpad_color_link;
@ -250,7 +253,7 @@
} }
.CodeMirror { .CodeMirror {
margin-top: 5px; margin-top: 5px;
background: @cp_forms-bg; background: @cp_forms-bg !important;
color: @cryptpad_text_col; color: @cryptpad_text_col;
border: 1px solid @cp_forms-border; border: 1px solid @cp_forms-border;
border-radius: @variables_radius; border-radius: @variables_radius;

View File

@ -76,7 +76,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_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_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_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 SaveAs = window.saveAs;
var APP = window.APP = { var APP = window.APP = {
@ -413,13 +413,13 @@ define([
str = `<a href="${l}" id="${uid}">${str}</a>`; str = `<a href="${l}" id="${uid}">${str}</a>`;
APP.nextLocationUid = uid; APP.nextLocationUid = uid;
} }
let location_icon = h('i.fa.fa-map-marker.tui-full-calendar-icon', { 'aria-label': Messages.calendar_loc }, []);
return Messages._getKey('calendar_location', [str]); return location_icon.outerHTML + str;
}, },
popupDetailBody: function(schedule) { popupDetailBody: function(schedule) {
var str = schedule.body; var str = schedule.body;
delete APP.eventBody; delete APP.eventBody;
return Messages._getKey('calendar_description', ['<br />', diffMk.render(str, true)]); return diffMk.render(str, true);
}, },
popupIsAllDay: function() { return Messages.calendar_allDay; }, popupIsAllDay: function() { return Messages.calendar_allDay; },
titlePlaceholder: function() { return Messages.calendar_title; }, titlePlaceholder: function() { return Messages.calendar_title; },
@ -1017,13 +1017,12 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v
makeLeftside(cal, $(leftside)); makeLeftside(cal, $(leftside));
cal.on('beforeCreateSchedule', function(event) { 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) { newEvent(event, function (err) {
if (err) { if (err) {
console.error(err); console.error(err);
return void UI.warn(err); return void UI.warn(err);
} }
//cal.createSchedules([schedule]); XXX Remove these occurrences elsewhere
}); });
}); });
cal.on('beforeUpdateSchedule', function(event) { cal.on('beforeUpdateSchedule', function(event) {
@ -1132,7 +1131,6 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v
console.error(err); console.error(err);
return void UI.warn(err); return void UI.warn(err);
} }
//cal.updateSchedule(old.id, old.calendarId, changes);
}); });
} }
}; };