Skip to content

Commit ce66b77

Browse files
committed
Fix #151
1 parent aac647a commit ce66b77

File tree

4 files changed

+66
-65
lines changed

4 files changed

+66
-65
lines changed

src/server-start.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// require('babel-register');
2-
// require('babel-polyfill');
1+
require('babel-register');
2+
require('babel-polyfill');
33
require('./web-api');
Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,87 @@
11
<div class="header-full" [ngClass]="{'heading' : isOnQuestionsPage, 'header' : !isOnQuestionsPage, 'stop-detail-header' : isOnStopDetailPage, 'categories-header' : isOnCategoriesPage, 'location-header' : isOnLocationPage }">
22
<div class="heading-content" [ngClass]="{'stop-detail-header-content' : !isOnQuestionsPage}">
33
<div class="header-top">
4-
<a class="backbutton" (click)="goBack()">
5-
<svg class="back-svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
6-
x="0px" y="0px" width="14.3px" height="24px" viewBox="0 0 14.3 24" style="enable-background:new 0 0 14.3 24;" xml:space="preserve">
7-
<defs>
8-
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
9-
<stop offset="0%" style="stop-color:#00C6FF;stop-opacity:1" />
10-
<stop offset="100%" style="stop-color:#0072FF;stop-opacity:1" />
11-
</linearGradient>
12-
</defs>
13-
<g>
14-
<path d="M13.9,0.5C13.6,0.2,13.2,0,12.8,0c-0.4,0-0.7,0.1-1,0.4L0.5,10.9C0.2,11.2,0,11.6,0,12c0,0.4,0.2,0.8,0.5,1.1l11.3,10.5
15-
c0.6,0.6,1.5,0.5,2.1-0.1c0.6-0.6,0.5-1.5-0.1-2.1L3.6,12l10.2-9.5C14.4,2,14.4,1.1,13.9,0.5z" fill=url(#grad1)/>
16-
</g>
17-
</svg>
18-
Back
19-
</a>
4+
<a class="backbutton" (click)="goBack()">
5+
<svg class="back-svg" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
6+
x="0px" y="0px" width="14.3px" height="24px" viewBox="0 0 14.3 24" style="enable-background:new 0 0 14.3 24;" xml:space="preserve">
7+
<defs>
8+
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
9+
<stop offset="0%" style="stop-color:#00C6FF;stop-opacity:1" />
10+
<stop offset="100%" style="stop-color:#0072FF;stop-opacity:1" />
11+
</linearGradient>
12+
</defs>
13+
<g>
14+
<path d="M13.9,0.5C13.6,0.2,13.2,0,12.8,0c-0.4,0-0.7,0.1-1,0.4L0.5,10.9C0.2,11.2,0,11.6,0,12c0,0.4,0.2,0.8,0.5,1.1l11.3,10.5
15+
c0.6,0.6,1.5,0.5,2.1-0.1c0.6-0.6,0.5-1.5-0.1-2.1L3.6,12l10.2-9.5C14.4,2,14.4,1.1,13.9,0.5z"
16+
fill=url(#grad1)/>
17+
</g>
18+
</svg>
19+
Back
20+
</a>
2021

21-
<ng-container *ngIf="isOnQuestionsPage">
22-
<button class="done-button" [disabled]="doneBtnDisabled" (click)="doneCallback()">Done</button>
23-
</ng-container>
22+
<ng-container *ngIf="isOnQuestionsPage">
23+
<button class="done-button" [disabled]="doneBtnDisabled" (click)="doneCallback()">Done</button>
24+
</ng-container>
2425

25-
<ng-container *ngIf="isOnStopDetailPage">
26-
<div class="stop-detail-photo">
27-
<input type='file' name="file" id="file" class="input-file" accept="image/*" (change)="readURL($event);" />
28-
<label for="file">
29-
<figure>
30-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
31-
x="0px" y="0px" width="28px" height="24.48px" viewBox="0 0 95.1 76.5" style="enable-background:new 0 0 95.1 76.5;"
32-
xml:space="preserve">
33-
<defs>
34-
</defs>
35-
<g>
36-
<path d="M47.5,21.1c-12,0-21.8,9.8-21.8,21.8s9.8,21.9,21.8,21.9S69.3,55,69.3,43S59.5,21.1,47.5,21.1z M47.5,58.6
26+
<ng-container *ngIf="isOnStopDetailPage">
27+
<div class="stop-detail-photo">
28+
<input type='file' name="file" id="file" class="input-file" accept="image/*" (change)="uploadCallback($event);" />
29+
<label for="file">
30+
<figure>
31+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
32+
x="0px" y="0px" width="28px" height="24.48px" viewBox="0 0 95.1 76.5" style="enable-background:new 0 0 95.1 76.5;"
33+
xml:space="preserve">
34+
<defs>
35+
</defs>
36+
<g>
37+
<path d="M47.5,21.1c-12,0-21.8,9.8-21.8,21.8s9.8,21.9,21.8,21.9S69.3,55,69.3,43S59.5,21.1,47.5,21.1z M47.5,58.6
3738
c-8.6,0-15.6-7-15.6-15.6s7-15.6,15.6-15.6s15.6,7,15.6,15.6S56.1,58.6,47.5,58.6z" />
38-
<path d="M83.9,11.9H71.5l-2.3-5.2C67.5,2.6,63.5,0,59,0H36c-4.5,0-8.4,2.6-10.2,6.7l-2.3,5.2H11.1C5,11.9,0,16.9,0,23v42.4
39+
<path d="M83.9,11.9H71.5l-2.3-5.2C67.5,2.6,63.5,0,59,0H36c-4.5,0-8.4,2.6-10.2,6.7l-2.3,5.2H11.1C5,11.9,0,16.9,0,23v42.4
3940
c0,6.1,5,11.1,11.1,11.1H84c6.1,0,11.1-5,11.1-11.1V23C95,16.9,90,11.9,83.9,11.9z M88.8,65.4c0,2.7-2.2,4.9-4.9,4.9H11.1
4041
c-2.7,0-4.9-2.2-4.9-4.9V23c0-2.7,2.2-4.9,4.9-4.9h14.5c1.2,0,2.4-0.7,2.8-1.9l3.1-7.1c0.8-1.8,2.5-3,4.5-3h23.1c2,0,3.7,1.2,4.5,3
4142
l3.1,7.1c0.5,1.1,1.6,1.9,2.8,1.9H84c2.7,0,4.9,2.2,4.9,4.9L88.8,65.4L88.8,65.4z" />
42-
<circle cx="78.4" cy="28.1" r="4.6" />
43-
</g>
44-
</svg>
45-
46-
</figure>
47-
</label>
48-
</div>
49-
50-
</ng-container>
51-
43+
<circle cx="78.4" cy="28.1" r="4.6" />
44+
</g>
45+
</svg>
46+
47+
</figure>
48+
</label>
49+
</div>
50+
51+
</ng-container>
52+
5253
</div>
53-
5454

55-
55+
56+
5657
<ng-container *ngIf="isOnQuestionsPage">
5758
<h1 class="section-title">Accessibility</h1>
5859
<h2 class="section-sub-title">Physical</h2>
5960
</ng-container>
6061

6162
<ng-container *ngIf="isOnStopDetailPage">
62-
<h1 class="section-title">{{stopName}}</h1>
63-
<h2 class="section-sub-title">ID : {{stopId}}</h2>
63+
<h1 class="section-title">{{stopName}}</h1>
64+
<h2 class="section-sub-title">ID : {{stopId}}</h2>
6465
</ng-container>
6566

6667
<ng-container *ngIf="isOnHistoriesPage && !historyDate">
67-
<h1 class="section-title">History of {{stopName}}</h1>
68-
<h2 class="section-sub-title">ID : {{stopId}}</h2>
68+
<h1 class="section-title">History of {{stopName}}</h1>
69+
<h2 class="section-sub-title">ID : {{stopId}}</h2>
6970
</ng-container>
7071

7172
<ng-container *ngIf="historyDate">
72-
<h1 class="section-title">History of {{stopName}}</h1>
73-
<h2 class="section-sub-title">on {{ historyDate | date: 'EE dd MMMM yyyy'}}</h2>
74-
</ng-container>
75-
73+
<h1 class="section-title">History of {{stopName}}</h1>
74+
<h2 class="section-sub-title">on {{ historyDate | date: 'EE dd MMMM yyyy'}}</h2>
75+
</ng-container>
76+
7677
<ng-container *ngIf="isOnCategoriesPage && !isOnQuestionsPage">
77-
<h1 class="section-title">Categories</h1>
78-
<h2 class="section-sub-title">Choose a category</h2>
79-
</ng-container>
80-
78+
<h1 class="section-title">Categories</h1>
79+
<h2 class="section-sub-title">Choose a category</h2>
80+
</ng-container>
81+
8182
<ng-container *ngIf="isOnLocationPage">
82-
<h1 class="section-title">{{stopName}}</h1>
83-
<h2 class="section-sub-title">Id:{{stopId}}</h2>
84-
</ng-container>
83+
<h1 class="section-title">{{stopName}}</h1>
84+
<h2 class="section-sub-title">Id:{{stopId}}</h2>
85+
</ng-container>
8586
<ng-content></ng-content>
8687
</div>

src/web-app/app/shared/components/navbar/navbar.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export class NavbarComponent implements OnInit {
1111
@Input() stopId;
1212
@Input() stopName;
1313
@Input() historyDate;
14-
@Input() doneBtnDisabled:boolean;
15-
14+
@Input() doneBtnDisabled: boolean;
15+
1616
@Input('goBack') goBackCallback: Function;
1717
@Input('done') doneCallback: Function;
18-
18+
@Input('upload') uploadCallback: Function;
1919

2020
isOnHistoriesPage: boolean;
2121
isOnStopDetailPage: boolean;

src/web-app/app/stops/detail/stop-detail.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div *ngIf="stop">
2-
<app-navbar [stopName]="stop.alpha['nl']" [stopId]="stop.id"> </app-navbar>
2+
<app-navbar [stopName]="stop.alpha['nl']" [stopId]="stop.id" [upload]="readURL.bind(this)"> </app-navbar>
33
<!--
44
<div class="header">
55
<div class="header-content">

0 commit comments

Comments
 (0)