Commit 1b893ca8 authored by Curtis Adam's avatar Curtis Adam

Moved the building navigation into its own toolbar

parent a53e7a63
<div class="full-height nav-clear">
<div
class="alert alert-danger position-fixed m-3 shadow-sm map-toolbar"
*ngIf="mapRendererService.error.length > 0">
class="alert alert-danger position-fixed m-3 shadow-sm map-toolbar"
*ngIf="mapRendererService.error.length > 0">
{{mapRendererService.error}}
<button type="button" (click)="mapRendererService.error = ''" class="close ml-3">
<span>&times;</span>
......@@ -10,8 +10,7 @@
</div>
<div class="position-fixed map-toolbar">
<div
class="shadow-sm border-bottom rounded bg-white ml-3 mt-3 d-inline-block clickable">
<div class="shadow-sm border-bottom rounded bg-white ml-3 mt-3 d-inline-block clickable">
<div class="full-width p-2"
*ngIf="mapRendererService.error.length === 0">
<div class="row">
......@@ -20,13 +19,19 @@
<button class="btn btn-outline-primary btn-sm" id="poi-category-dropdown-button" ngbDropdownToggle>
<i class="fas fa-map-marker-alt"></i>&nbsp;POIs
</button>
<div ngbDropdownMenu aria-labelledby="poi-category-dropdown-button" class="poi-category-dropdown shadow" (click)="$event.stopPropagation()">
<button class="btn btn-outline-primary btn-sm" id="toggle-all-pois" (click)="togglePOIs()"><i class="fas fa-map-marker-alt"></i>&nbsp;Toggle all</button>
<div ngbDropdownMenu aria-labelledby="poi-category-dropdown-button" class="poi-category-dropdown shadow"
(click)="$event.stopPropagation()">
<button class="btn btn-outline-primary btn-sm" id="toggle-all-pois" (click)="togglePOIs()"><i
class="fas fa-map-marker-alt"></i>&nbsp;Toggle all
</button>
<hr class="dropdown-divider">
<ng-container *ngFor="let category of getCategories(); let i = index">
<div class="form-check dropdown-item cursorpointer" (click)="updatePOICategory(category.getID())">
<input class="form-check-input cursorpointer" type="checkbox" id="poi-category-{{i}}" [checked]="poiCategoryDisabled(category.getID())">
<label class="form-check-label cursorpointer" for="poi-category-{{i}}">&nbsp;<img alt="{{category.name}}" src="{{getCategoryIcon(category.icon)}}">&nbsp;{{category.name}}</label>
<input class="form-check-input cursorpointer" type="checkbox" id="poi-category-{{i}}"
[checked]="poiCategoryDisabled(category.getID())">
<label class="form-check-label cursorpointer" for="poi-category-{{i}}">&nbsp;<img
alt="{{category.name}}" src="{{getCategoryIcon(category.icon)}}">&nbsp;{{category.name}}
</label>
</div>
</ng-container>
</div>
......@@ -39,7 +44,7 @@
Go to THM
</button>
</div>
<div class="col" >
<div class="col">
<button class="btn btn-outline-primary btn-sm"
(click)="toggleSearch()">
<span class="fas fa-search">
......@@ -47,9 +52,15 @@
</button>
</div>
<div class="col" *ngIf="this.mapRendererService.searchToggled" style="display:inline;">
<input type="text" autofocus placeholder="Search POI" (keypress) = "this.searchPoi($event)" />
<input type="text" autofocus placeholder="Search POI" (keypress)="this.searchPoi($event)"/>
</div>
<div class="col" *ngIf="this.mapRendererService.isBuildingClicked()">
</div>
</div>
</div>
<div class="shadow-sm border-bottom rounded bg-white ml-3 mt-3 d-inline-block clickable float-right" *ngIf="this.mapRendererService.isBuildingClicked()">
<div class="full-width p-2" *ngIf="mapRendererService.error.length === 0">
<div class="row">
<div class="col">
<button class="btn btn-outline-primary btn-sm"
(click)="leaveBuilding()">
<span class="fa fa-sign-out-alt mr-1">
......@@ -57,7 +68,7 @@
Leave building
</button>
</div>
<div class="col" *ngIf="this.mapRendererService.isBuildingClicked()">
<div class="col">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<ng-container *ngFor="let level of mapRendererService.selectedBuilding.levels; let i = index">
<label class="btn btn-sm btn-outline-primary level"
......@@ -66,15 +77,13 @@
</label>
</ng-container>
</div>
</div>
</div>
</div>
</div>
<br>
<div
class="shadow-sm border-bottom rounded d-inline-block bg-white ml-3 mt-3 map-toolbar p-2 clickable"
*ngIf="start || end">
<div class="shadow-sm border-bottom rounded d-inline-block bg-white ml-3 mt-3 map-toolbar p-2 clickable"
*ngIf="start || end">
<table>
<tr>
<td>
......@@ -89,7 +98,8 @@
<td *ngIf="end && start">
<span *ngIf="routingState == RoutingState.Finding" class="grey-font">Calculating route...</span>
<div *ngIf="routingState == RoutingState.Found">
<span class="green-font"><span class="bold">{{route.duration}}</span> sec</span> <span class="grey-font"> ({{route.distance}} m)</span>
<span class="green-font"><span class="bold">{{route.duration}}</span> sec</span> <span class="grey-font"> ({{route.distance}}
m)</span>
</div>
</td>
<td>
......@@ -103,16 +113,18 @@
</div>
<context-menu>
<ng-template *ngIf="noItemHovered() && noItemCut() && authService.isLoggedIn()" contextMenuItem (execute)="addPoi()">Add
{{poiModelDefinition.titleSingular}} here
</ng-template>
<ng-template *ngIf="noItemHovered() && noItemCut() && authService.isLoggedIn()" contextMenuItem (execute)="addPoi()">
Add
{{poiModelDefinition.titleSingular}} here
</ng-template>
<ng-template *ngIf="canCutPoi() && authService.isLoggedIn()" contextMenuItem (execute)="cutPoi()">Cut
{{poiModelDefinition.titleSingular}}
</ng-template>
<ng-template *ngIf="canPastePoi() && authService.isLoggedIn()" contextMenuItem (execute)="pastePoi()">Paste
{{poiModelDefinition.titleSingular}}
</ng-template>
<ng-template *ngIf="!noItemCut() && authService.isLoggedIn()" contextMenuItem (execute)="resetCutPaste()">Cancel Cut & Paste
<ng-template *ngIf="!noItemCut() && authService.isLoggedIn()" contextMenuItem (execute)="resetCutPaste()">Cancel Cut &
Paste
</ng-template>
<ng-template *ngIf="authService.isLoggedIn()" contextMenuItem divider="true"></ng-template>
<ng-template contextMenuItem (execute)="setRoutingFromHere()">Route from here</ng-template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment