Varius calendar fixes and cleanups

This commit is contained in:
Aleksander Machniak 2019-01-11 13:59:29 +01:00
parent d45f3439b9
commit fb0c3436a3
3 changed files with 22 additions and 28 deletions

View file

@ -82,25 +82,32 @@ function rcube_calendar_ui(settings)
firstDay : settings.first_day,
firstHour : settings.first_hour,
slotMinutes : 60/settings.timeslots,
businessHours: {
start: settings.work_start + ':00',
end: settings.work_end + ':00'
},
views: {
/*
basic: {
timeFormat: settings.time_format,
},
year: {
columnFormat: settings.date_agenda,
titleFormat: settings.dates_long,
titleFormat: settings.dates_long
},
*/
month: {
columnFormat: 'ddd', // Mon
titleFormat: 'MMMM YYYY',
eventLimit: 6
},
week: {
columnFormat: 'ddd ' + settings.date_short, // Mon 9/7
titleFormat: settings.dates_long,
titleFormat: settings.dates_long
},
day: {
columnFormat: 'dddd ' + settings.date_short, // Monday 9/7
titleFormat: 'dddd ' + settings.date_long,
titleFormat: 'dddd ' + settings.date_long
}
},
timeFormat: settings.time_format,
@ -127,6 +134,9 @@ function rcube_calendar_ui(settings)
next: 'right-single-arrow'
},
theme: false,
eventLimitText: function(num) {
return rcmail.gettext('andnmore', 'calendar').replace('$nr', num);
},
/*
listTexts: {
until: rcmail.gettext('until', 'calendar'),
@ -141,7 +151,7 @@ function rcube_calendar_ui(settings)
week: rcmail.gettext('weekofyear', 'calendar')
},
*/
currentTimeIndicator: settings.time_indicator,
nowIndicator: settings.time_indicator,
// event rendering
eventRender: function(event, element, view) {
if (view.name != 'list' && view.name != 'table') {
@ -166,11 +176,6 @@ function rcube_calendar_ui(settings)
element.attr('aria-label', event.title + ', ' + me.event_date_text(event, true));
},
// render element indicating more (invisible) events
overflowRender: function(data, element) {
element.html(rcmail.gettext('andnmore', 'calendar').replace('$nr', data.count))
.click(function(e){ me.fisheye_view(data.date); });
},
// callback when a specific event is clicked
eventClick: function(event, ev, view) {
if (!event.temp && (!event.className || event.className.indexOf('fc-type-freebusy') < 0))

View file

@ -139,12 +139,6 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
if (event.description && showdesc) {
cont.after('<div class="fc-event-description">' + Q(event.description) + '</div>');
}
/* TODO: create icons black on white
if (event.recurrence)
element.find('.fc-event-time').append('<i class="fc-icon-recurring"></i>');
if (event.alarms)
element.find('.fc-event-time').append('<i class="fc-icon-alarms"></i>');
*/
}
if (view.name == 'table' && event.description && showdesc) {
var cols = element.children().css('border', 0).length;

View file

@ -1615,7 +1615,6 @@ a.dropdown-link:after {
#resourcesearchbox {
width: 100%;
height: 26px;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
@ -1633,7 +1632,6 @@ a.dropdown-link:after {
}
/* fullcalendar style overrides */
.calendarmain .fc-body {
@ -1796,9 +1794,6 @@ a.dropdown-link:after {
.fc-event.fc-type-freebusy,
.fc-event.fc-type-freebusy {
opacity: 0.60;
-moz-box-shadow: inset 0px 1px 0 0px #888;
-webkit-box-shadow: inset 0px 1px 0 0px #888;
-o-box-shadow: inset 0px 1px 0 0px #888;
box-shadow: inset 0px 1px 0 0px #888;
}
@ -1840,6 +1835,7 @@ a.dropdown-link:after {
opacity: 1;
background: unset;
margin-top: 14px;
cursor: pointer;
}
.fc-event.fc-invitation-tentative .fc-bg {
@ -1923,7 +1919,7 @@ a.dropdown-link:after {
font-size: 90%;
}
.fc-more-link {
.fc-more {
color: #999;
padding-top: 1px;
cursor: pointer;
@ -1937,7 +1933,7 @@ a.dropdown-link:after {
background-color: rgba(198,198,198, 0.08);
}
.calendarmain .fc-state-highlight {
.calendarmain .fc-unthemed td.fc-today {
background-color: rgba(233,198,14, 0.12);
}
@ -2051,11 +2047,6 @@ a.dropdown-link:after {
.fc-event-temp {
opacity: 0.4;
filter: alpha(opacity=40); /* IE8 */
}
.fc-unthemed td.fc-today {
background: rgb(243, 226, 140, 0.2);
}
.fc-axis {
@ -2063,6 +2054,10 @@ a.dropdown-link:after {
padding: 0 3px !important;
}
.fc-time-grid .fc-now-indicator {
border-top: 2px solid #3ec400;
}
/* Settings section */
fieldset #calendarcategories div {