Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
e3dfd032
Verified
Commit
e3dfd032
authored
5 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #9906 autocous search header
parent
8b316b87
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frontend/app/header/header-right.component.html
+3
-3
3 additions, 3 deletions
src/frontend/app/header/header-right.component.html
src/frontend/app/header/header-right.component.ts
+12
-2
12 additions, 2 deletions
src/frontend/app/header/header-right.component.ts
with
15 additions
and
5 deletions
src/frontend/app/header/header-right.component.html
+
3
−
3
View file @
e3dfd032
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<input
type=
"hidden"
name=
"meta[]"
value=
"baskets_clause#baskets_clause#select_simple"
>
<input
type=
"hidden"
name=
"meta[]"
value=
"baskets_clause#baskets_clause#select_simple"
>
<input
type=
"hidden"
name=
"meta[]"
value=
"welcome#welcome#welcome"
>
<input
type=
"hidden"
name=
"meta[]"
value=
"welcome#welcome#welcome"
>
<input
type=
"hidden"
name=
"baskets_clause"
value=
"true"
>
<input
type=
"hidden"
name=
"baskets_clause"
value=
"true"
>
<mat-form-field
id=
"searchInput"
floatLabel=
"never"
style=
"width:100%;margin-top: -18px;margin-left:-5px;"
>
<mat-form-field
floatLabel=
"never"
style=
"width:100%;margin-top: -18px;margin-left:-5px;"
>
<input
matInput
type=
"text"
(blur)=
"hideSearch = !hideSearch"
name=
"welcome"
placeholder=
"{{lang.searchMails}}"
>
<input
#searchInput
="
matInput
"
matInput
type=
"text"
(blur)=
"hideSearch = !hideSearch"
name=
"welcome"
title=
"{{lang.searchMails}}"
placeholder=
"{{lang.searchMails}}"
>
<button
mat-icon-button
matSuffix
*ngIf=
"!mobileMode"
style=
"opacity:0.5;"
>
<button
mat-icon-button
matSuffix
*ngIf=
"!mobileMode"
style=
"opacity:0.5;"
>
<mat-icon
class=
"fa fa-search"
style=
"font-size:22px;"
></mat-icon>
<mat-icon
class=
"fa fa-search"
style=
"font-size:22px;"
></mat-icon>
</button>
</button>
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<input
#searchHome
type=
"submit"
name=
"submit"
value=
""
style=
"display:none"
>
<input
#searchHome
type=
"submit"
name=
"submit"
value=
""
style=
"display:none"
>
</form>
</form>
<button
(click)=
"
hide
Search
= !hideSearch
"
mat-icon-button
*ngIf=
"!mobileMode && hideSearch"
style=
"opacity:0.5;"
>
<button
(click)=
"
show
Search
Input()
"
mat-icon-button
*ngIf=
"!mobileMode && hideSearch"
style=
"opacity:0.5;"
>
<mat-icon
class=
"fa fa-search"
style=
"font-size:22px;"
></mat-icon>
<mat-icon
class=
"fa fa-search"
style=
"font-size:22px;"
></mat-icon>
</button>
</button>
...
...
This diff is collapsed.
Click to expand it.
src/frontend/app/header/header-right.component.ts
+
12
−
2
View file @
e3dfd032
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'
@angular/core
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
LANG
}
from
'
../translate.component
'
;
import
{
LANG
}
from
'
../translate.component
'
;
import
{
HeaderService
}
from
'
../../service/header.service
'
;
import
{
HeaderService
}
from
'
../../service/header.service
'
;
import
{
MatDialog
,
MatDialogRef
}
from
'
@angular/material
'
;
import
{
MatDialog
,
MatDialogRef
,
MatInput
}
from
'
@angular/material
'
;
import
{
IndexingGroupModalComponent
}
from
'
../menu/menu-shortcut.component
'
;
import
{
IndexingGroupModalComponent
}
from
'
../menu/menu-shortcut.component
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
Router
}
from
'
@angular/router
'
;
declare
function
$j
(
selector
:
any
):
any
;
declare
var
angularGlobals
:
any
;
declare
var
angularGlobals
:
any
;
@
Component
({
@
Component
({
...
@@ -23,6 +24,8 @@ export class HeaderRightComponent implements OnInit {
...
@@ -23,6 +24,8 @@ export class HeaderRightComponent implements OnInit {
hideSearch
:
boolean
=
true
;
hideSearch
:
boolean
=
true
;
@
ViewChild
(
'
searchInput
'
)
searchInput
:
MatInput
;
constructor
(
public
http
:
HttpClient
,
private
router
:
Router
,
public
headerService
:
HeaderService
,
public
dialog
:
MatDialog
)
{
constructor
(
public
http
:
HttpClient
,
private
router
:
Router
,
public
headerService
:
HeaderService
,
public
dialog
:
MatDialog
)
{
this
.
mobileMode
=
angularGlobals
.
mobileMode
;
this
.
mobileMode
=
angularGlobals
.
mobileMode
;
}
}
...
@@ -39,4 +42,11 @@ export class HeaderRightComponent implements OnInit {
...
@@ -39,4 +42,11 @@ export class HeaderRightComponent implements OnInit {
location
.
href
=
shortcut
.
servicepage
;
location
.
href
=
shortcut
.
servicepage
;
}
}
}
}
showSearchInput
()
{
this
.
hideSearch
=
!
this
.
hideSearch
;
setTimeout
(()
=>
{
this
.
searchInput
.
focus
();
},
200
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment