2017-07-03 19:17:49 +02:00
|
|
|
<div class="col-sm-3 col-md-4 pull-right">
|
2016-05-09 21:43:52 +02:00
|
|
|
<form class="navbar-form" role="search" #SearchForm="ngForm">
|
2016-05-03 21:04:57 +02:00
|
|
|
<div class="input-group">
|
2016-05-09 21:43:52 +02:00
|
|
|
<input type="text" class="form-control" placeholder="Search" (keyup)="onSearchChange($event)"
|
2017-06-10 22:32:56 +02:00
|
|
|
(blur)="onFocusLost()" (focus)="onFocus()" [(ngModel)]="searchText" #name="ngModel"
|
2016-05-10 10:59:12 +02:00
|
|
|
ngControl="search"
|
2016-05-15 19:46:25 +02:00
|
|
|
name="srch-term" id="srch-term" autocomplete="off">
|
2016-05-03 21:04:57 +02:00
|
|
|
|
2016-05-16 11:03:11 +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">
|
2016-12-28 13:30:26 +02:00
|
|
|
<a [routerLink]="['/search', item.text, {type: SearchTypes[item.type]}]">
|
2016-05-15 19:46:25 +02:00
|
|
|
<span [ngSwitch]="item.type">
|
2016-12-27 00:36:38 +02:00
|
|
|
<span *ngSwitchCase="0" class="glyphicon glyphicon-picture"></span>
|
|
|
|
<span *ngSwitchCase="1" class="glyphicon glyphicon-folder-open"></span>
|
|
|
|
<span *ngSwitchCase="2" class="glyphicon glyphicon-tag"></span>
|
|
|
|
<span *ngSwitchCase="3" class="glyphicon glyphicon-map-marker"></span>
|
2016-05-15 19:46:25 +02:00
|
|
|
</span>
|
2016-12-28 13:30:26 +02:00
|
|
|
{{item.preText}}<strong>{{item.highLightText}}</strong>{{item.postText}}
|
2016-05-16 11:03:11 +02:00
|
|
|
</a>
|
2016-05-03 21:04:57 +02:00
|
|
|
</div>
|
2016-05-15 19:46:25 +02:00
|
|
|
</div>
|
2016-05-03 21:04:57 +02:00
|
|
|
|
|
|
|
<div class="input-group-btn" style="display: block">
|
2016-05-09 21:43:52 +02:00
|
|
|
<button class="btn btn-default dropdown-toggle" type="button" (click)="onSearch()"><i
|
|
|
|
class="glyphicon glyphicon-search"></i>
|
2016-05-03 21:04:57 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|