sogo/UI/WebServerResources/scss/views/SchedulerUI.scss
2015-10-15 10:50:24 -04:00

353 lines
7.4 KiB
SCSS

/// SchedulerUI.scss -*- Mode: scss; indent-tabs-mode: nil; basic-offset: 2 -*-
$hours_margin: 50px;
$scrollbar_width: 16px;
/**
* Affected templates:
* - SchedulerUI/UIxCalDayView.wox
* - SchedulerUI/UIxCalWeekView.wox
* - SchedulerUI/UIxCalDayTable.wox
* - SchedulerUI/UIxCalMonthView.wox
* - SchedulerUI/UIxCalMulticolumnDayView.wox
*/
[ui-view=calendars] {
// Decrease with of middle column (list of events and tasks)
$listView-width: grid-step(5) !global;
$detailView-width: grid-step(11) !global;
.view-list {
min-width: ($listView-width - ($pitch * 2));
@include at(md){
@include flex-col(md, 6, 1, 1);
min-width: ($pitch * 3);
}
@include from(lg) {
@include flex-col(lg, 5, 1, 0);
}
// The color chip is smaller; adjust the "selected" icon accordingly
.sg-avatar-selected {
&:before {
margin-left: -($bl);
}
&.md-avatar:first-child {
margin-right: 0;
}
}
}
.view-detail {
@include at(md) {
@include flex-col(md, 10);
}
@include from(lg) {
@include flex-col(lg, 11, 1, 1);
}
}
// The calendar view container
.calendarView {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
}
// The days labels appear in the toolbar
md-toolbar {
&.daysView, &.monthView {
background-color: #fff;
overflow: hidden;
z-index: $z-index-toolbar - 1;
.days {
margin-left: $hours_margin;
margin-right: $scrollbar_width; // scrollbar
&.dayLabels {
.day {
padding-left: 1%;
}
}
}
}
&[sg-view$=dayview] {
.dayLabels {
.day {
display: flex;
align-items: center;
}
}
}
// &.monthView {
// > div {
// margin-right: $scrollbar_width;
// }
// }
}
// The all-day events appear in the shrinkable toolbar, bellow the days labels
.allDaysView {
border-bottom: 1px solid sg-color($sogoPaper, 300);
max-height: $sg-font-size-4 * 6;
.sg-event {
margin: 2%; // See sgCalendarDayBlock.directive.js
line-height: initial;
position: relative;
}
.gradient, .text {
position: relative;
}
}
// Days row
.days {
display: flex;
flex-direction: row;
align-items: stretch;
.day {
flex-grow: 1;
flex-basis: 0;
border-left: 1px solid sg-color($sogoPaper, 300);
.clickableHourCell {
height: 40px;
border-bottom: 1px solid sg-color($sogoPaper, 300);
}
}
}
// Header of month tiles
.sg-calendar-tile-header {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: $sg-font-size-2;
padding: 4px;
min-height: $sg-font-size-2 + 8px;
text-align: right;
//font-weight: $sg-font-light;
overflow: hidden;
}
// The left column of hours
.hours {
color: sg-color($sogoBlue, 700);
display: inline-block;
float: left;
clear: left;
font-weight: $sg-font-light;
height: auto;
left: 0;
position: relative;
top: 0;
width: $hours_margin;
.hour {
border-bottom: 1px solid sg-color($sogoPaper, 300);
text-align: right;
height: 40px;
left: 0;
padding: 2px;
position: relative;
right: 0;
top: 0;
}
}
// A container for a day-long (column) of hour cells
.hourCells {
position: relative;
}
// The outer event container
.sg-event {
font-size: $sg-font-size-2;
&, md-icon {
//color: #fff !important; // Overwrite dynamic CSS theme
}
.material-icons {
font-size: $sg-font-size-2;
}
}
// Events from editable calendars are draggable
.sg-draggable {
cursor: move;
}
.sg-event {
border-radius: 3px;
position: absolute;
left: 0;
right: 0;
opacity: 0.9; // When events from a same calendar overlap, it creates a border to help distinguish the events
overflow: hidden;
$i: 0;
@while $i < 96 { // number of 15-minutes blocks in a day
&.starts#{$i} { top: 10px * $i; }
&.lasts#{$i} { height: 10px * $i; }
$i: $i + 1;
}
.eventInside {
overflow: hidden;
}
}
// Multicolumn day cell that contains the calendar name
.multicolumnDay {
color: $colorGrey900;
font-size: $subhead-font-size-base;
font-weight: $sg-font-light;
overflow: hidden;
max-height: $subhead-font-size-base * 3;
padding-left: 2px;
margin-right: 2px;
}
.monthView {
.dayLabels {
// Cells of week days of all the same width
flex: 1 1 0;
text-align: center;
}
md-grid-tile {
// Border of month day cell
border-right: 1px solid $colorGrey100;
border-bottom: 1px solid $colorGrey100;
overflow: auto;
// Cells of another month
&.dayOfAnotherMonth {
background-color: $colorGrey50;
.sg-calendar-tile-header,
.sg-calendar-tile-header > span {
color: $colorGrey300 !important;
}
}
&.dayOfToday {
.sg-calendar-tile-header {
> span {
// Circle today's date
border-radius: 50%;
color: #fff;
display: inline-block;
font-weight: 600;
margin-right: auto;
margin-left: 1px;
min-width: $sg-font-size-2 + 4px;
min-height: $sg-font-size-2 + 4px;
line-height: $sg-font-size-2 + 4px;
text-align: center;
}
}
}
}
md-content {
background-color: transparent; // See the grid tile background color
}
.sg-event {
position: relative;
border-radius: 1px;
overflow: hidden;
padding: 2%;
margin: 2%;
text-overflow: ellipsis;
white-space: nowrap;
span { // hours
font-weight: $sg-font-light;
}
}
}
.minutes15, .minutes30, .minutes45 {
display: block;
height: 25%;
}
.minutes30 {
border-bottom: 1px dotted sg-color($sogoPaper, 300);
}
.gradient, .text {
position: absolute;
top: 1px;
left: 4px;
right: 2px;
bottom: 1px;
overflow: hidden;
}
.gradient > IMG {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
min-height: 15px; /* for 15-minute events */
width: 100%;
}
}
/* Attendees Editor */
.attendees {
overflow: hidden;
overflow-x: auto;
md-content {
display: table-row;
}
md-list {
display: table-cell;
vertical-align: top;
padding-top: 0;
&.day {
min-width: 408px;
md-list-item {
//padding: 0;
align-items: stretch;
}
}
}
md-list-item {
padding-left: 0;
&:hover {
background-color: initial;
}
// img {
// margin-right: $mg/4;
// }
}
.md-tile-left {
height: initial;
min-height: 48px;
width: initial;
padding: 4px;
}
.hours {
font-size: 9px;
}
.hour {
display: flex;
border-left: 1px solid sg-color($sogoPaper, 100);
min-width: 16px;
min-height: 16px;
flex-wrap: nowrap;
flex-grow: 0;
flex-basis: 17px; // hour's width + hour's border
align-items: stretch;
}
.quarter {
min-width: 4px;
display: flex;
align-items: stretch;
.busy {
margin: 8px 0;
min-width: 4px;
background-color: sg-color($sogoPaper, 600);
}
&.event {
background-color: sg-color($sogoBlue, 300);
}
}
}