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
a7102fb7
Commit
a7102fb7
authored
Aug 03, 2017
by
Winnie Hellmann
Committed by
Annabel Dunstone Gray
Aug 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make dropdown style on project page consistent
parent
27d34789
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
3 deletions
+55
-3
app/assets/javascripts/project.js
app/assets/javascripts/project.js
+7
-2
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+45
-0
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+2
-0
app/views/shared/_clone_panel.html.haml
app/views/shared/_clone_panel.html.haml
+1
-1
No files found.
app/assets/javascripts/project.js
View file @
a7102fb7
...
...
@@ -10,14 +10,19 @@ import Cookies from 'js-cookie';
const
$projectCloneField
=
$
(
'
#project_clone
'
);
const
$cloneBtnText
=
$
(
'
a.clone-dropdown-btn span
'
);
const
selectedCloneOption
=
$cloneBtnText
.
text
().
trim
();
if
(
selectedCloneOption
.
length
>
0
)
{
$
(
`a:contains('
${
selectedCloneOption
}
')`
,
$cloneOptions
).
addClass
(
'
is-active
'
);
}
$
(
'
a
'
,
$cloneOptions
).
on
(
'
click
'
,
(
e
)
=>
{
const
$this
=
$
(
e
.
currentTarget
);
const
url
=
$this
.
attr
(
'
href
'
);
e
.
preventDefault
();
$
(
'
.
active
'
,
$cloneOptions
).
not
(
$this
).
removeClass
(
'
active
'
);
$this
.
toggleClass
(
'
active
'
);
$
(
'
.
is-active
'
,
$cloneOptions
).
not
(
$this
).
removeClass
(
'
is-
active
'
);
$this
.
toggleClass
(
'
is-
active
'
);
$projectCloneField
.
val
(
url
);
$cloneBtnText
.
text
(
$this
.
text
());
...
...
app/assets/stylesheets/framework/dropdowns.scss
View file @
a7102fb7
...
...
@@ -722,3 +722,48 @@
@include
set-invisible
;
overflow
:
hidden
;
}
// TODO: change global style and remove mixin
@mixin
new-style-dropdown
{
.dropdown-menu
{
li
{
padding
:
0
1px
;
&
.dropdown-header
{
padding
:
8px
16px
;
}
a
{
border-radius
:
0
;
padding
:
8px
16px
;
&
.is-focused
,
&
:hover
,
&
:active
,
&
:focus
{
background-color
:
$gray-darker
;
}
&
.is-active
{
font-weight
:
inherit
;
&
:
:
before
{
top
:
16px
;
}
}
}
}
&
.dropdown-menu-selectable
{
li
{
a
{
padding
:
8px
40px
;
&.
is-active
:
:
before
{
left
:
16px
;
}
}
}
}
}
}
app/assets/stylesheets/pages/projects.scss
View file @
a7102fb7
...
...
@@ -282,6 +282,8 @@
}
.project-repo-buttons
{
@include
new-style-dropdown
;
.project-action-button
.dropdown-menu
{
max-height
:
250px
;
overflow-y
:
auto
;
...
...
app/views/shared/_clone_panel.html.haml
View file @
a7102fb7
...
...
@@ -11,7 +11,7 @@
%span
=
default_clone_protocol
.
upcase
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-right.clone-options-dropdown
%ul
.dropdown-menu.dropdown-menu-
selectable.dropdown-menu-
right.clone-options-dropdown
%li
=
ssh_clone_button
(
project
)
%li
...
...
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