mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
improving search field design
This commit is contained in:
parent
f099dc6eb0
commit
a9b06912c6
@ -88,6 +88,7 @@ export class AuthenticationMWs {
|
|||||||
(typeof req.body.loginCredential.password === 'undefined')) {
|
(typeof req.body.loginCredential.password === 'undefined')) {
|
||||||
return next(new Error(ErrorCodes.INPUT_ERROR));
|
return next(new Error(ErrorCodes.INPUT_ERROR));
|
||||||
}
|
}
|
||||||
|
//TODO: implement remember me
|
||||||
try {
|
try {
|
||||||
//lets find the user
|
//lets find the user
|
||||||
req.session.user = await ObjectManagerRepository.getInstance().UserManager.findOne({
|
req.session.user = await ObjectManagerRepository.getInstance().UserManager.findOne({
|
||||||
|
@ -36,6 +36,7 @@ import {SlimLoadingBarModule} from "ng2-slim-loading-bar";
|
|||||||
import {GalleryShareComponent} from "./gallery/share/share.gallery.component";
|
import {GalleryShareComponent} from "./gallery/share/share.gallery.component";
|
||||||
import {ShareLoginComponent} from "./sharelogin/share-login.component";
|
import {ShareLoginComponent} from "./sharelogin/share-login.component";
|
||||||
import {ShareService} from "./gallery/share.service";
|
import {ShareService} from "./gallery/share.service";
|
||||||
|
import {TypeaheadModule} from "ngx-bootstrap";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GoogleMapsConfig {
|
export class GoogleMapsConfig {
|
||||||
@ -52,6 +53,7 @@ export class GoogleMapsConfig {
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
HttpModule,
|
HttpModule,
|
||||||
appRoutes,
|
appRoutes,
|
||||||
|
TypeaheadModule.forRoot(),
|
||||||
AgmCoreModule.forRoot(),
|
AgmCoreModule.forRoot(),
|
||||||
SlimLoadingBarModule.forRoot()
|
SlimLoadingBarModule.forRoot()
|
||||||
],
|
],
|
||||||
|
@ -7,6 +7,6 @@ gallery-map {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.directories {
|
.directories {
|
||||||
margin-right: 1px;
|
margin-right: 2px;
|
||||||
margin-left: 1px;
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,46 @@
|
|||||||
.autocomplete-list {
|
.autocomplete-list {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 34px;
|
top: 34px;
|
||||||
background-color:white;
|
background-color: white;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-bottom-left-radius: 4px;
|
border-bottom-left-radius: 4px;
|
||||||
border-bottom-right-radius: 4px;
|
border-bottom-right-radius: 4px;
|
||||||
padding-left: 3px;
|
padding-left: 0;
|
||||||
padding-right: 3px;
|
padding-right: 0;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
||||||
|
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete-item{
|
.autocomplete-item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding-left: 3px;
|
padding-top: 2px;
|
||||||
padding-right: 3px;
|
padding-bottom: 2px;
|
||||||
border-radius: 2px;
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.autocomplete-item a {
|
||||||
|
color: #333;
|
||||||
|
padding: 0 20px;
|
||||||
|
line-height: 1.42857143;
|
||||||
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete-item:hover {
|
.autocomplete-item:hover {
|
||||||
background-color: #eaeaea;
|
background-color: #337ab7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.autocomplete-item:hover a {
|
||||||
|
color: #FFF;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#srch-term {
|
#srch-term {
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-width: 0;
|
border-bottom-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
form {
|
form {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
ngControl="search"
|
ngControl="search"
|
||||||
name="srch-term" id="srch-term" autocomplete="off">
|
name="srch-term" id="srch-term" autocomplete="off">
|
||||||
|
|
||||||
|
|
||||||
<div class="autocomplete-list" *ngIf="autoCompleteItems.length > 0"
|
<div class="autocomplete-list" *ngIf="autoCompleteItems.length > 0"
|
||||||
(mouseover)="setMouseOverAutoComplete(true)" (mouseout)="setMouseOverAutoComplete(false)">
|
(mouseover)="setMouseOverAutoComplete(true)" (mouseout)="setMouseOverAutoComplete(false)">
|
||||||
<div class="autocomplete-item" *ngFor="let item of autoCompleteItems">
|
<div class="autocomplete-item" *ngFor="let item of autoCompleteItems">
|
||||||
|
@ -116,6 +116,7 @@ export class GallerySearchComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private showSuggestions(suggestions: Array<AutoCompleteItem>, searchText: string) {
|
private showSuggestions(suggestions: Array<AutoCompleteItem>, searchText: string) {
|
||||||
|
console.log(suggestions);
|
||||||
this.emptyAutoComplete();
|
this.emptyAutoComplete();
|
||||||
suggestions.forEach((item: AutoCompleteItem) => {
|
suggestions.forEach((item: AutoCompleteItem) => {
|
||||||
let renderItem = new AutoCompleteRenderItem(item.text, searchText, item.type);
|
let renderItem = new AutoCompleteRenderItem(item.text, searchText, item.type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user