Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
aaad42dd
Commit
aaad42dd
authored
Jun 06, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use button instead of fake button
parent
8229b545
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
7 deletions
+26
-7
app/assets/javascripts/filtered_search/filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+4
-0
app/assets/stylesheets/framework/nav.scss
app/assets/stylesheets/framework/nav.scss
+18
-3
app/views/shared/issuable/_nav.html.haml
app/views/shared/issuable/_nav.html.haml
+4
-4
No files found.
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
aaad42dd
...
@@ -500,6 +500,10 @@ class FilteredSearchManager {
...
@@ -500,6 +500,10 @@ class FilteredSearchManager {
searchState
(
e
)
{
searchState
(
e
)
{
const
target
=
e
.
currentTarget
;
const
target
=
e
.
currentTarget
;
// remove focus outline after click
target
.
blur
();
// return class name that has a prefix of `state-`
// return class name that has a prefix of `state-`
const
stateClassName
=
[].
find
.
call
(
target
.
classList
,
name
=>
name
.
match
(
/
(
state-
)(\w
+
)
/g
));
const
stateClassName
=
[].
find
.
call
(
target
.
classList
,
name
=>
name
.
match
(
/
(
state-
)(\w
+
)
/g
));
const
state
=
stateClassName
.
replace
(
'
state-
'
,
''
);
const
state
=
stateClassName
.
replace
(
'
state-
'
,
''
);
...
...
app/assets/stylesheets/framework/nav.scss
View file @
aaad42dd
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
display
:
flex
;
display
:
flex
;
a
,
a
,
.
div-btn
{
.
btn-link
{
padding
:
$gl-btn-padding
;
padding
:
$gl-btn-padding
;
padding-bottom
:
11px
;
padding-bottom
:
11px
;
font-size
:
14px
;
font-size
:
14px
;
...
@@ -68,14 +68,29 @@
...
@@ -68,14 +68,29 @@
}
}
}
}
.
div-btn
{
.
btn-link
{
padding-top
:
16px
;
padding-top
:
16px
;
padding-left
:
15px
;
padding-left
:
15px
;
padding-right
:
15px
;
padding-right
:
15px
;
border-left
:
none
;
border-right
:
none
;
border-top
:
none
;
border-radius
:
0
;
&
:hover
,
&
:active
,
&
:focus
{
background-color
:
transparent
;
}
&
:active
{
outline
:
0
;
box-shadow
:
none
;
}
}
}
&
.active
a
,
&
.active
a
,
&
.active
.
div-btn
{
&
.active
.
btn-link
{
border-bottom
:
2px
solid
$link-underline-blue
;
border-bottom
:
2px
solid
$link-underline-blue
;
color
:
$black
;
color
:
$black
;
font-weight
:
600
;
font-weight
:
600
;
...
...
app/views/shared/issuable/_nav.html.haml
View file @
aaad42dd
...
@@ -5,20 +5,20 @@
...
@@ -5,20 +5,20 @@
%ul
.nav-links.issues-state-filters
%ul
.nav-links.issues-state-filters
%li
{
class:
active_when
(
params
[
:state
]
==
'opened'
)
}
>
%li
{
class:
active_when
(
params
[
:state
]
==
'opened'
)
}
>
.div-btn.state-opened
{
id:
'state-opened'
,
title:
"Filter by #{page_context_word} that are currently opened."
,
rol
e:
'button'
}
%button
.btn.btn-link.state-opened
{
id:
'state-opened'
,
title:
"Filter by #{page_context_word} that are currently opened."
,
typ
e:
'button'
}
#{
issuables_state_counter_text
(
type
,
:opened
)
}
#{
issuables_state_counter_text
(
type
,
:opened
)
}
-
if
type
==
:merge_requests
-
if
type
==
:merge_requests
%li
{
class:
active_when
(
params
[
:state
]
==
'merged'
)
}
>
%li
{
class:
active_when
(
params
[
:state
]
==
'merged'
)
}
>
.div-btn.state-merged
{
id:
'state-merged'
,
title:
'Filter by merge requests that are currently merged.'
,
rol
e:
'button'
}
%button
.btn.btn-link.state-merged
{
id:
'state-merged'
,
title:
'Filter by merge requests that are currently merged.'
,
typ
e:
'button'
}
#{
issuables_state_counter_text
(
type
,
:merged
)
}
#{
issuables_state_counter_text
(
type
,
:merged
)
}
-
closed_title
=
'Filter by merge requests that are currently closed and unmerged.'
-
closed_title
=
'Filter by merge requests that are currently closed and unmerged.'
%li
{
class:
active_when
(
params
[
:state
]
==
'closed'
)
}
>
%li
{
class:
active_when
(
params
[
:state
]
==
'closed'
)
}
>
.div-btn.state-closed
{
id:
'state-closed'
,
title:
closed_title
,
rol
e:
'button'
}
%button
.btn.btn-link.state-closed
{
id:
'state-closed'
,
title:
closed_title
,
typ
e:
'button'
}
#{
issuables_state_counter_text
(
type
,
:closed
)
}
#{
issuables_state_counter_text
(
type
,
:closed
)
}
%li
{
class:
active_when
(
params
[
:state
]
==
'all'
)
}
>
%li
{
class:
active_when
(
params
[
:state
]
==
'all'
)
}
>
.div-btn.state-all
{
id:
'state-all'
,
title:
"Show all #{page_context_word}."
,
rol
e:
'button'
}
%button
.btn.btn-link.state-all
{
id:
'state-all'
,
title:
"Show all #{page_context_word}."
,
typ
e:
'button'
}
#{
issuables_state_counter_text
(
type
,
:all
)
}
#{
issuables_state_counter_text
(
type
,
:all
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment