Elastic: Fix calendar printing and other css issues

This commit is contained in:
Aleksander Machniak 2018-04-03 12:24:31 +02:00
parent cbd1d83c3d
commit 4dd6eb5893
4 changed files with 114 additions and 18 deletions

View file

@ -6,7 +6,7 @@
* @licstart The following is the entire license notice for the
* JavaScript code in this file.
*
* Copyright (C) 2011, Kolab Systems AG <contact@kolabsys.com>
* Copyright (C) 2011-2018, Kolab Systems AG <contact@kolabsys.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@ -34,11 +34,11 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
{
return String(str).replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
};
var rc_loading;
var showdesc = true;
var settings = $.extend(rcmail.env.calendar_settings, rcmail.env.libcal_settings);
// create list of event sources AKA calendars
var src, event_sources = [];
var add_url = (rcmail.env.search ? '&q='+escape(rcmail.env.search) : '');
@ -52,9 +52,11 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
id: id
}, rcmail.env.calendars[id]);
source.color = '#' + source.color.replace(/^#/, '');
event_sources.push(source);
}
var viewdate = new Date();
if (rcmail.env.date)
viewdate.setTime(rcmail.env.date * 1000);

View file

@ -13,6 +13,7 @@
<div id="calendar" data-view-selector="calendar-view-selector"></div>
</div>
<roundcube:object name="plugin.calendar_list" activeonly="true" id="calendarlist" class="hidden" />
<roundcube:object name="plugin.calendar_css" printmode="true" />
<roundcube:include file="includes/footer.html" />

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="#f0f3f4" d="M569.354 231.631C512.969 135.949 407.81 72 288 72 168.14 72 63.004 135.994 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.031 376.051 168.19 440 288 440c119.86 0 224.996-63.994 281.354-159.631a47.997 47.997 0 0 0 0-48.738zM288 392c-75.162 0-136-60.827-136-136 0-75.162 60.826-136 136-136 75.162 0 136 60.826 136 136 0 75.162-60.826 136-136 136zm104-136c0 57.438-46.562 104-104 104s-104-46.562-104-104c0-17.708 4.431-34.379 12.236-48.973l-.001.032c0 23.651 19.173 42.823 42.824 42.823s42.824-19.173 42.824-42.823c0-23.651-19.173-42.824-42.824-42.824l-.032.001C253.621 156.431 270.292 152 288 152c57.438 0 104 46.562 104 104z"/></svg>

After

Width:  |  Height:  |  Size: 717 B

View file

@ -72,6 +72,7 @@ a.button.today:before {
.count {
right: 5.5em;
font-style: normal;
}
}
}
@ -165,6 +166,10 @@ fieldset.categories .input-group {
font-size: .9rem;
background-color: @color-black-shade-bg;
table {
margin: 0;
}
td a {
font-size: .9rem !important;
}
@ -176,6 +181,11 @@ fieldset.categories .input-group {
}
}
body.quickview-active .fc-content {
background: url('images/eye.svg') center no-repeat;
background-size: 50%;
}
// Fullcalendar styles
@color-calendar-border: @color-layout-border;
@ -222,7 +232,7 @@ fieldset.categories .input-group {
.fc-header-title {
h2 {
font-size: 1.5rem;
font-size: 1.25rem;
font-weight: bold;
}
}
@ -262,12 +272,13 @@ fieldset.categories .input-group {
// borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/)
.fc-state-highlight { // <td> today cell, TODO: add .fc-today to <th>
background: tint(@color-main, 90%);
background: fadeout(@color-main, 92%);
}
/*
.fc-state-default {
border: 1px solid;
background-color: #f5f5f5;
background-color: #f4f4f4;
}
.fc-state-hover,
@ -277,7 +288,6 @@ fieldset.categories .input-group {
color: #333333;
background-color: #e6e6e6;
}
.fc-state-hover {
color: #333333;
text-decoration: none;
@ -288,13 +298,11 @@ fieldset.categories .input-group {
background-color: #cccccc;
outline: 0;
}
*/
.fc-state-disabled {
cursor: default;
background-image: none;
opacity: 0.65;
}
*/
// Global Event Styles
@ -316,10 +324,6 @@ fieldset.categories .input-group {
font-size: .85em;
cursor: default;
&:focus {
outline: 2px solid ActiveBorder;
}
.fc-rtl & {
text-align: right;
}
@ -395,6 +399,7 @@ fieldset.categories .input-group {
tr.fc-last th,
tr.fc-last td {
border-bottom-width: 1px;
color: @color-black-shade-text;
}
tbody tr.fc-first td,
@ -431,6 +436,7 @@ fieldset.categories .input-group {
.fc-day-number {
float: right;
padding: 0 2px;
font-size: .9rem;
}
.fc-other-month .fc-day-number {
@ -487,6 +493,7 @@ fieldset.categories .input-group {
font-weight: normal;
font-size: .9rem;
border-left: 0;
color: @color-black-shade-text;
}
.fc-week-number {
@ -718,6 +725,74 @@ fieldset.categories .input-group {
}
}
.fc-event-hori.fc-type-freebusy,
.fc-event-vert.fc-type-freebusy {
opacity: 0.6;
.fc-event-title {
position: absolute;
top: -5000px;
}
}
.fc-event-row.fc-type-freebusy td {
color: #999;
}
.fc-event-vert.fc-invitation-needs-action,
.fc-event-hori.fc-invitation-needs-action {
border: 1px dashed #5757c7 !important;
}
.fc-event-vert.fc-invitation-tentative,
.fc-event-hori.fc-invitation-tentative {
border: 1px dashed #eb8900 !important;
}
.fc-event-vert.fc-invitation-declined,
.fc-event-hori.fc-invitation-declined {
border: 1px dashed #c00 !important;
}
.fc-event-vert.fc-event-ns-other.fc-invitation-declined,
.fc-event-hori.fc-event-ns-other.fc-invitation-declined {
opacity: 0.7;
}
.fc-event-ns-other.fc-invitation-declined .fc-event-title {
text-decoration: line-through;
}
.fc-event-vert.fc-invitation-tentative .fc-event-bg {
background: url(data:image/gif;base64,R0lGODlhCAAIAPABAOuJAP///yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff;
}
.fc-event-vert.fc-invitation-needs-action .fc-event-bg {
background: url(data:image/gif;base64,R0lGODlhCAAIAPABAFdXx////yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff;
}
.fc-event-vert.fc-invitation-declined .fc-event-bg {
background: url(data:image/gif;base64,R0lGODlhCAAIAPABAMwAAP///yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff;
}
.fc-view-table tr.fc-invitation-tentative td,
.fc-view-table tr.fc-invitation-declined td,
.fc-view-table tr.fc-invitation-needs-action td {
color: #888;
}
.fc-view-table tr.fc-invitation-tentative td.fc-event-title,
.fc-view-table tr.fc-invitation-declined td.fc-event-title,
.fc-view-table tr.fc-invitation-needs-action td.fc-event-title {
font-weight: normal;
}
.fc-needs-action,
.fc-declined,
.cal-event-status-cancelled {
opacity: 0.6;
}
.fc-icon-alarms,
.fc-icon-sensitive,
.fc-icon-recurring {
@ -745,6 +820,14 @@ fieldset.categories .input-group {
content: @fa-var-lock;
}
.fc-event-temp {
opacity: 0.4;
}
.fc-sat, .fc-sun {
background-color: fadeout(@color-black-shade-text, 97%);
}
// remove redundant borders
.fc-first tbody .fc-day-header,
.fc-first .fc-day-header.fc-first,
@ -776,6 +859,7 @@ fieldset.categories .input-group {
}
}
.ui-resizable-handle,
.fc-agenda-gutter,
.fc-header-left,
.fc-header-right {
@ -786,9 +870,12 @@ fieldset.categories .input-group {
overflow: visible;
}
.fc-event-skin,
.fc-event-inner .fc-event-skin {
color: black;
.fc-list-section td,
.fc-event {
color: black !important;
}
.fc-event:not(.fc-event-row) .fc-event-skin {
background-color: #fff !important;
}
@ -883,11 +970,16 @@ fieldset.categories .input-group {
font-style: italic;
}
.fc-day {
font-size: 90%;
}
.fc-view-month .fc-event-hori .fc-event-inner {
background: #fff !important;
}
// add back borders removed in non-print view
.fc-first .fc-day-header.fc-first,
.fc-agenda .fc-agenda-axis,
.fc-first .fc-day-header,
.fc-week .fc-first {