From 5fa1b335c614309cc962f551a27730799b3c5687 Mon Sep 17 00:00:00 2001 From: nixa <4dmitr@gmail.com> Date: Mon, 16 May 2016 17:42:01 +0300 Subject: [PATCH] calendar component fix per new styles --- .../pages/dashboard/calendar/calendar.component.ts | 14 ++++++++------ src/app/pages/dashboard/calendar/calendar.scss | 2 +- .../components/baCard/baCardBlur.directive.ts | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/app/pages/dashboard/calendar/calendar.component.ts b/src/app/pages/dashboard/calendar/calendar.component.ts index 3aa48fe0..a3e5209a 100644 --- a/src/app/pages/dashboard/calendar/calendar.component.ts +++ b/src/app/pages/dashboard/calendar/calendar.component.ts @@ -1,7 +1,7 @@ import {Component, ViewEncapsulation} from '@angular/core'; import './calendar.loader.ts'; -import {layoutColors} from "../../../theme/theme.constants"; +import {BaThemeConfigProvider} from '../../../theme'; @Component({ selector: 'calendar', @@ -11,13 +11,15 @@ import {layoutColors} from "../../../theme/theme.constants"; }) export class Calendar { + constructor(private _baConfig:BaThemeConfigProvider) { + } ngAfterViewInit() { this._initCalendar(); } _initCalendar() { - let palette = layoutColors.bgColorPalette; + let dashboardColors = this._baConfig.get().colors.dashboard; let $element = $('#calendar').fullCalendar({ header: { @@ -47,23 +49,23 @@ export class Calendar { { title: 'All Day Event', start: '2016-03-01', - color: palette.silverTree + color: dashboardColors.silverTree }, { title: 'Long Event', start: '2016-03-07', end: '2016-03-10', - color: palette.blueStone + color: dashboardColors.blueStone }, { title: 'Dinner', start: '2016-03-14T20:00:00', - color: palette.surfieGreen + color: dashboardColors.surfieGreen }, { title: 'Birthday Party', start: '2016-04-01T07:00:00', - color: palette.gossipDark + color: dashboardColors.gossip } ] }); diff --git a/src/app/pages/dashboard/calendar/calendar.scss b/src/app/pages/dashboard/calendar/calendar.scss index 105989f6..a113a2fb 100644 --- a/src/app/pages/dashboard/calendar/calendar.scss +++ b/src/app/pages/dashboard/calendar/calendar.scss @@ -723,7 +723,7 @@ a.fc-more { height: auto!important; } -.calendar-panel.panel .panel-body{ +.calendar-panel.card .card-body{ padding: 0; } diff --git a/src/app/theme/components/baCard/baCardBlur.directive.ts b/src/app/theme/components/baCard/baCardBlur.directive.ts index 1ac509f8..d70ac10f 100644 --- a/src/app/theme/components/baCard/baCardBlur.directive.ts +++ b/src/app/theme/components/baCard/baCardBlur.directive.ts @@ -14,7 +14,7 @@ export class BaCardBlur { private _bodyBgSize:BgMetrics; - constructor(private _baThemeConfigProvider:BaThemeConfigProvider, private _baCardBlurHelper:BaCardBlurHelper, private _el:ElementRef) { + constructor(private _baConfig:BaThemeConfigProvider, private _baCardBlurHelper:BaCardBlurHelper, private _el:ElementRef) { if (this._isEnabled()) { this._getBodyImageSizesOnBgLoad(); this._recalculateCardStylesOnBgLoad(); @@ -52,6 +52,6 @@ export class BaCardBlur { } private _isEnabled() { - return this._baThemeConfigProvider.get().theme.blur; + return this._baConfig.get().theme.blur; } }