e14414ed56
- more contrasted primary palette; - white toolbars for list and detail views; - modules navigation always visible; - wrapped detail views into a md-card; - moved preferences button to the sidenav; - moved the sidenav toggle button to the top toolbar; - new "flip" visual effect when looking at the raw source of cards and messages.
573 lines
12 KiB
SCSS
573 lines
12 KiB
SCSS
/// SchedulerUI.scss -*- Mode: scss; indent-tabs-mode: nil; basic-offset: 2 -*-
|
|
$hours_margin: 50px;
|
|
$block_margin: 2%; // See sgCalendarDayBlock.directive.js
|
|
$block_radius: 3px;
|
|
|
|
/**
|
|
* Affected templates:
|
|
* - SchedulerUI/UIxCalDayView.wox
|
|
* - SchedulerUI/UIxCalWeekView.wox
|
|
* - SchedulerUI/UIxCalDayTable.wox
|
|
* - SchedulerUI/UIxCalMonthView.wox
|
|
* - SchedulerUI/UIxCalMulticolumnDayView.wox
|
|
*/
|
|
|
|
[ui-view=calendars] {
|
|
|
|
// Decrease width of middle column (list of events and tasks)
|
|
$listView-width: grid-step(4) !global;
|
|
$detailView-width: grid-step(10) !global;
|
|
|
|
.view-list {
|
|
min-width: ($listView-width - ($pitch * 2));
|
|
@include at(sm) {
|
|
@include flex-col(sm, 6, 1, 1);
|
|
min-width: ($pitch * 3);
|
|
}
|
|
@include from(md) {
|
|
@include flex-col(md, 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(sm) {
|
|
@include flex-col(sm, 10);
|
|
}
|
|
@include from(md) {
|
|
flex: 1 1 auto;
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
// 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;
|
|
overflow-y: scroll;
|
|
&.dayLabels {
|
|
.day {
|
|
padding-left: 1%;
|
|
div {
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
&[sg-view$=dayview] {
|
|
.dayLabels {
|
|
.day {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
}
|
|
}
|
|
&.monthView {
|
|
> div {
|
|
overflow-y: scroll;
|
|
}
|
|
}
|
|
}
|
|
|
|
// 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;
|
|
|
|
.day {
|
|
position: relative;
|
|
}
|
|
|
|
.sg-event {
|
|
margin: $block_margin;
|
|
line-height: initial;
|
|
position: relative;
|
|
|
|
&--ghost {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
border-radius: 0;
|
|
padding-left: $block_margin;
|
|
padding-right: $block_margin;
|
|
&--first {
|
|
margin-left: $block_margin;
|
|
padding-left: 0;
|
|
border-top-left-radius: $block_radius;
|
|
border-bottom-left-radius: $block_radius;
|
|
}
|
|
&--last {
|
|
margin-right: $block_margin;
|
|
padding-right: 0;
|
|
border-top-right-radius: $block_radius;
|
|
border-bottom-right-radius: $block_radius;
|
|
}
|
|
}
|
|
}
|
|
|
|
.text {
|
|
position: static;
|
|
padding: 3px 1%;
|
|
}
|
|
}
|
|
|
|
md-card {
|
|
// All views wrap a md-card
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
}
|
|
|
|
md-content[sg-calendar-scroll-view] {
|
|
overflow-y: scroll;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
// 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);
|
|
user-select: none;
|
|
&.outOfDay {
|
|
background-color: $colorGrey50;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Header of month tiles
|
|
.sg-calendar-tile-header {
|
|
font-size: $sg-font-size-2;
|
|
min-height: $sg-font-size-2 + 8px;
|
|
overflow: hidden;
|
|
padding: 4px;
|
|
text-align: right;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
//font-weight: $sg-font-light;
|
|
}
|
|
|
|
// 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;
|
|
}
|
|
|
|
// Events from editable calendars are draggable
|
|
.sg-draggable-calendar-block,
|
|
.sg-event--ghost {
|
|
cursor: move;
|
|
}
|
|
|
|
// The outer event container
|
|
.sg-event {
|
|
font-size: $sg-font-size-2;
|
|
font-weight: $sg-font-medium;
|
|
border-radius: $block_radius;
|
|
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
|
|
user-select: none;
|
|
transition: $swift-linear;
|
|
$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;
|
|
}
|
|
|
|
&--notransition {
|
|
transition: none;
|
|
}
|
|
|
|
&--ghost {
|
|
opacity: 1;
|
|
left: $block_margin;
|
|
right: $block_margin;
|
|
}
|
|
|
|
&--dragging {
|
|
background-image: repeating-linear-gradient(-45deg,
|
|
rgba(255,255,255,0.2),
|
|
rgba(255,255,255,0.2) 2px,
|
|
transparent 2px,
|
|
transparent 4px );
|
|
opacity: 0.5;
|
|
}
|
|
|
|
&.lasts1 {
|
|
.text {
|
|
top: 0px;
|
|
bottom: 0px;
|
|
}
|
|
}
|
|
|
|
.eventInside {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.material-icons {
|
|
font-size: $sg-font-size-2;
|
|
}
|
|
|
|
.icons md-icon {
|
|
float: right;
|
|
}
|
|
|
|
.secondary { // location in days view, hours in month view
|
|
font-weight: $sg-font-light;
|
|
}
|
|
|
|
.sg-category {
|
|
&:first-child {
|
|
border-top-right-radius: $block_radius;
|
|
border-bottom-right-radius: $block_radius;
|
|
}
|
|
}
|
|
|
|
// Event DnD drag grips
|
|
|
|
&:hover {
|
|
.dragGrip {
|
|
&-top, &-bottom {
|
|
display: block;
|
|
cursor: ns-resize;
|
|
}
|
|
&-left, &-right {
|
|
display: block;
|
|
cursor: ew-resize;
|
|
}
|
|
}
|
|
}
|
|
|
|
.dragGrip {
|
|
&-top, &-bottom, &-left, &-right {
|
|
display: none;
|
|
position: absolute;
|
|
}
|
|
|
|
&-top, &-bottom {
|
|
left: 1px;
|
|
right: 1px;
|
|
height: 8px;
|
|
line-height: 8px;
|
|
}
|
|
|
|
&-top {
|
|
top: 0;
|
|
.dragGrip {
|
|
right: 0;
|
|
top: -3px;
|
|
}
|
|
}
|
|
|
|
&-bottom {
|
|
bottom: 0;
|
|
.dragGrip {
|
|
bottom: -3px;
|
|
}
|
|
}
|
|
|
|
&-left, &-right {
|
|
top: 1px;
|
|
bottom: 1px;
|
|
width: 8px;
|
|
line-height: 8px;
|
|
}
|
|
|
|
&-left {
|
|
left: -$block_margin;
|
|
.dragGrip {
|
|
bottom: 0;
|
|
left: -1px;
|
|
}
|
|
}
|
|
|
|
&-right {
|
|
right: -$block_margin;
|
|
.dragGrip {
|
|
right: -1px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.dragGrip {
|
|
background-color: white;
|
|
border-radius: 50%;
|
|
border-style: solid;
|
|
border-width: 1px;
|
|
display: inline-block;
|
|
height: 8px;
|
|
position: absolute;
|
|
width: 8px;
|
|
}
|
|
|
|
// Event DnD ghost start/end hours
|
|
|
|
.ghostStartHour,
|
|
.ghostEndHour {
|
|
position: absolute;
|
|
width: 100%;
|
|
vertical-align: baseline;
|
|
height: 14px;
|
|
left: 0px;
|
|
color: #222;
|
|
text-align: center;
|
|
}
|
|
|
|
.ghostStartHour {
|
|
top: -14px;
|
|
}
|
|
|
|
.ghostEndHour {
|
|
bottom: -14px;
|
|
}
|
|
}
|
|
|
|
// 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;
|
|
}
|
|
|
|
// Styles specific to the month view
|
|
.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;
|
|
user-select: none;
|
|
// 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
|
|
height: 100%; // Fix a scrolling issue when dragging blocks
|
|
overflow: hidden;
|
|
overflow-y: auto;
|
|
}
|
|
.sg-event {
|
|
position: relative;
|
|
padding: 3px 1%;
|
|
margin: $block_margin;
|
|
overflow: hidden;
|
|
&--ghost {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
border-radius: 0;
|
|
padding-left: $block_margin;
|
|
padding-right: $block_margin;
|
|
&--first {
|
|
margin-left: $block_margin;
|
|
padding-left: 0;
|
|
border-top-left-radius: $block_radius;
|
|
border-bottom-left-radius: $block_radius;
|
|
}
|
|
&--last {
|
|
margin-right: $block_margin;
|
|
padding-right: 0;
|
|
border-top-right-radius: $block_radius;
|
|
border-bottom-right-radius: $block_radius;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.minutes15, .minutes30, .minutes45 {
|
|
display: block;
|
|
height: 25%;
|
|
}
|
|
|
|
.minutes30 {
|
|
border-bottom: 1px dotted sg-color($sogoPaper, 300);
|
|
}
|
|
|
|
.text {
|
|
position: absolute;
|
|
top: 3px;
|
|
left: 1%;
|
|
right: 1%;
|
|
bottom: 3px;
|
|
margin: 0 2px;
|
|
overflow: hidden;
|
|
line-height: $sg-font-size-2;
|
|
}
|
|
|
|
.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;
|
|
padding-right: 0;
|
|
&:hover {
|
|
background-color: initial;
|
|
}
|
|
// img {
|
|
// margin-right: $mg/4;
|
|
// }
|
|
> .md-avatar {
|
|
// Overwrite default margin to gain some space and match 48px
|
|
margin-top: $baseline-grid/2;
|
|
margin-bottom: $baseline-grid/2;
|
|
}
|
|
}
|
|
.md-tile-left {
|
|
// Use in the top-left empty cell, which is in the first item of the attendees list
|
|
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);
|
|
}
|
|
}
|
|
} |