Update event image source to use new auto calendar generator

Transactions
= 2017-09-08 01:56:56 -06:00
parent 781760812b
commit 981215e445
5 changed files with 8667 additions and 4 deletions

8637
Client/package-lock.json generated 100644

File diff suppressed because it is too large Load Diff

View File

@ -4,9 +4,9 @@
"license": "MIT",
"scripts": {
"ng": "ng",
"servehelena":"ng serve -host 192.168.43.144",
"servebutte":"ng serve -host 192.168.2.8",
"servebutteprod":"ng serve -host 192.168.2.8 --prod",
"servehelena": "ng serve -host 192.168.43.144",
"servebutte": "ng serve -host 192.168.2.8",
"servebutteprod": "ng serve -host 192.168.2.8 --prod",
"start": "ng serve",
"build": "ng build",
"test": "ng test",

View File

@ -1,7 +1,7 @@
<div class="wrapper" [@inout]="startFadeIn">
<div class="photo">
<button md-button (click)="toggleState()">
<img src="../../assets/images/event_back.png" />
<img src="{{imgSrc}}" />
</button>
</div><!--
--><div class="info" (click)="toggleState()">

View File

@ -1,6 +1,8 @@
import { Component, AfterContentInit, Input } from '@angular/core';
import { trigger, state, style, transition, animate } from '@angular/animations';
import { MONTHS_FULL } from '../../constants/months';
@Component({
selector: 'event-large-component',
templateUrl: './event-large.component.html',
@ -54,6 +56,14 @@ export class EventLargeComponent implements AfterContentInit {
@Input()
public delayFadeIn: number = 100;
public _imgSrc: string;
public get imgSrc(): string{
var monthNum = this.startDate.getMonth();
var monthName = '';
monthName = MONTHS_FULL[monthNum];
return "/cim/" + monthName + "/" + this.startDate.getDate();
}
constructor(){
console.log(this.title);
}
@ -72,3 +82,4 @@ export class EventLargeComponent implements AfterContentInit {
}
}

View File

@ -11,4 +11,19 @@ export const MONTHS = {
9: "OCT",
10: "NOV",
11: "DEC"
};
export const MONTHS_FULL = {
0: "JANUARY",
1: "FEBRUARY",
2: "MARCH",
3: "APRIL",
4: "MAY",
5: "JUNE",
6: "JULY",
7: "AUGUST",
8: "SEPTEMBER",
9: "OCTOBER",
10: "NOVEMBER",
11: "DECEMBER"
};