1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/gallery/search/search.gallery.component.html

32 lines
1.7 KiB
HTML
Raw Normal View History

<div class="col-sm-4 col-md-5 pull-right">
2016-05-10 03:43:52 +08:00
<form class="navbar-form" role="search" #SearchForm="ngForm">
<div class="input-group">
2016-05-10 03:43:52 +08:00
<input type="text" class="form-control" placeholder="Search" (keyup)="onSearchChange($event)"
2016-12-27 06:36:38 +08:00
(blur)="onFocusLost($event)" (focus)="onFocus($evnet)" [(ngModel)]="searchText" #name="ngModel"
ngControl="search"
2016-05-16 01:46:25 +08:00
name="srch-term" id="srch-term" autocomplete="off">
2016-05-16 17:03:11 +08: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',{searchText: item.text, type: SearchTypes[item.type]}]">
2016-05-16 01:46:25 +08:00
<span [ngSwitch]="item.type">
2016-12-27 06:36:38 +08: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-16 01:46:25 +08:00
</span>
{{item.preText}}<strong>{{item.highLightText}}</strong>{{item.postText}}
2016-05-16 17:03:11 +08:00
</a>
</div>
2016-05-16 01:46:25 +08:00
</div>
<div class="input-group-btn" style="display: block">
2016-05-10 03:43:52 +08:00
<button class="btn btn-default dropdown-toggle" type="button" (click)="onSearch()"><i
class="glyphicon glyphicon-search"></i>
</button>
</div>
</div>
</form>
</div>