2017-07-07 22:54:18 +02:00
|
|
|
<form class="navbar-form" role="search" #SearchForm="ngForm">
|
|
|
|
<div class="input-group">
|
2017-07-25 21:16:57 +02:00
|
|
|
<input type="text"
|
2018-05-13 16:59:57 -04:00
|
|
|
class="form-control "
|
2017-12-24 18:42:25 -05:00
|
|
|
i18n-placeholder
|
2017-07-25 21:16:57 +02:00
|
|
|
placeholder="Search"
|
|
|
|
(keyup)="onSearchChange($event)"
|
|
|
|
(blur)="onFocusLost()"
|
|
|
|
(focus)="onFocus()"
|
|
|
|
[(ngModel)]="searchText"
|
|
|
|
#name="ngModel"
|
|
|
|
size="30"
|
2017-07-07 22:54:18 +02:00
|
|
|
ngControl="search"
|
2017-07-25 21:16:57 +02:00
|
|
|
name="srch-term"
|
|
|
|
id="srch-term"
|
|
|
|
autocomplete="off">
|
2016-05-03 21:04:57 +02:00
|
|
|
|
2017-07-08 09:43:05 +02:00
|
|
|
|
2017-07-07 22:54:18 +02:00
|
|
|
<div class="autocomplete-list" *ngIf="autoCompleteItems.length > 0"
|
|
|
|
(mouseover)="setMouseOverAutoComplete(true)" (mouseout)="setMouseOverAutoComplete(false)">
|
|
|
|
<div class="autocomplete-item" *ngFor="let item of autoCompleteItems">
|
|
|
|
<a [routerLink]="['/search', item.text, {type: SearchTypes[item.type]}]">
|
2016-05-15 19:46:25 +02:00
|
|
|
<span [ngSwitch]="item.type">
|
2018-11-24 14:21:46 +01:00
|
|
|
<span *ngSwitchCase="SearchTypes.photo" class="oi oi-image"></span>
|
2019-02-14 18:25:55 -05:00
|
|
|
<span *ngSwitchCase="SearchTypes.person" class="oi oi-person"></span>
|
2018-11-24 14:21:46 +01:00
|
|
|
<span *ngSwitchCase="SearchTypes.video" class="oi oi-video"></span>
|
2018-05-13 16:59:57 -04:00
|
|
|
<span *ngSwitchCase="SearchTypes.directory" class="oi oi-folder"></span>
|
|
|
|
<span *ngSwitchCase="SearchTypes.keyword" class="oi oi-tag"></span>
|
|
|
|
<span *ngSwitchCase="SearchTypes.position" class="oi oi-map-marker"></span>
|
2016-05-15 19:46:25 +02:00
|
|
|
</span>
|
2017-07-07 22:54:18 +02:00
|
|
|
{{item.preText}}<strong>{{item.highLightText}}</strong>{{item.postText}}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input-group-btn" style="display: block">
|
2018-12-23 16:18:44 +01:00
|
|
|
<button class="btn btn-light" type="button"
|
2018-12-04 21:43:07 +01:00
|
|
|
[routerLink]="['/search', searchText]">
|
2018-05-13 16:59:57 -04:00
|
|
|
<span class="oi oi-magnifying-glass"></span>
|
2017-07-07 22:54:18 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2016-05-03 21:04:57 +02:00
|
|
|
|