Skip to content

Commit

Permalink
chore: updates regarding review
Browse files Browse the repository at this point in the history
use correct color scheme for views
use blue scheme from existing demos
apply fallback color if none specified when toggling daylight
remove default.scss
apply currentColor to links within cal-event-title
  • Loading branch information
etwillbefine committed Mar 25, 2018
1 parent 100f939 commit 6095060
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
3 changes: 1 addition & 2 deletions demos/demo-modules/exclude-days/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export class DemoComponent {
{
start: new Date('2016-01-01'),
end: new Date('2016-01-09'),
title: 'Multiple weeks event',
color: colors.blue
title: 'Multiple weeks event'
}
];

Expand Down
1 change: 0 additions & 1 deletion src/angular-calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
@import './modules/week/calendar-week-view';
@import './modules/day/calendar-day-view';
@import './modules/common/calendar-tooltip';
@import './defaults';
6 changes: 0 additions & 6 deletions src/defaults.scss

This file was deleted.

8 changes: 7 additions & 1 deletion src/modules/day/calendar-day-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,20 @@
}

.cal-event {
border: solid 1px;
padding: 5px;
font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 100%;
box-sizing: border-box;
background-color: #D1E8FF;
border: 1px solid #1e90ff;
color: #1e90ff;
}

.cal-event-title:link {
color: currentColor;
}

.cal-draggable {
Expand Down
3 changes: 2 additions & 1 deletion src/modules/month/calendar-month-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ export class CalendarMonthViewComponent
toggleDayHighlight(event: CalendarEvent, isHighlighted: boolean): void {
this.view.days.forEach(day => {
if (isHighlighted && day.events.indexOf(event) > -1) {
day.backgroundColor = event.color.secondary;
day.backgroundColor =
(event.color && event.color.secondary) || '#D1E8FF';
} else {
delete day.backgroundColor;
}
Expand Down
7 changes: 3 additions & 4 deletions src/modules/month/calendar-month-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
border-radius: 50%;
display: inline-block;
margin: 2px;
background-color: #1e90ff;
border-color: #D1E8FF;
color: #fff;
}

.cal-day-cell.cal-in-month.cal-has-events {
Expand Down Expand Up @@ -136,10 +139,6 @@
top: 2px;
}

.cal-event-title {
color: white;
}

.cal-out-month {
.cal-day-badge,
.cal-event {
Expand Down
7 changes: 7 additions & 0 deletions src/modules/week/calendar-week-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
margin-right: 2px;
height: 30px;
line-height: 30px;
background-color: #D1E8FF;
border: 1px solid #1e90ff;
color: #1e90ff;
}

.cal-event-title:link {
color: currentColor;
}

.cal-draggable {
Expand Down

0 comments on commit 6095060

Please sign in to comment.