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

43 lines
1.7 KiB
HTML
Raw Normal View History

2017-07-08 04:54:18 +08:00
<form class="navbar-form" role="search" #SearchForm="ngForm">
<div class="input-group">
2017-07-26 03:16:57 +08:00
<input type="text"
2018-05-14 04:59:57 +08:00
class="form-control "
i18n-placeholder
2017-07-26 03:16:57 +08:00
placeholder="Search"
(keyup)="onSearchChange($event)"
(blur)="onFocusLost()"
(focus)="onFocus()"
[(ngModel)]="searchText"
#name="ngModel"
size="30"
2017-07-08 04:54:18 +08:00
ngControl="search"
2017-07-26 03:16:57 +08:00
name="srch-term"
id="srch-term"
autocomplete="off">
2017-07-08 15:43:05 +08:00
2017-07-08 04:54:18 +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', item.text, {type: SearchTypes[item.type]}]">
2016-05-16 01:46:25 +08:00
<span [ngSwitch]="item.type">
<span *ngSwitchCase="SearchTypes.photo" class="oi oi-image"></span>
<span *ngSwitchCase="SearchTypes.video" class="oi oi-video"></span>
2018-05-14 04:59:57 +08: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-16 01:46:25 +08:00
</span>
2017-07-08 04:54:18 +08:00
{{item.preText}}<strong>{{item.highLightText}}</strong>{{item.postText}}
</a>
</div>
</div>
<div class="input-group-btn" style="display: block">
2018-05-14 04:59:57 +08:00
<button class="btn btn-default" type="button" (click)="onSearch()">
<span class="oi oi-magnifying-glass"></span>
2017-07-08 04:54:18 +08:00
</button>
</div>
</div>
</form>