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
34dae228
Commit
34dae228
authored
Jun 06, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed spacing
removed need for custom dropdown stuff
parent
64360f4f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
25 deletions
+52
-25
app/assets/javascripts/ide/components/ide_side_bar.vue
app/assets/javascripts/ide/components/ide_side_bar.vue
+24
-14
app/assets/javascripts/ide/components/merge_requests/dropdown.vue
...ts/javascripts/ide/components/merge_requests/dropdown.vue
+10
-8
app/assets/javascripts/ide/components/merge_requests/item.vue
...assets/javascripts/ide/components/merge_requests/item.vue
+1
-1
app/assets/javascripts/ide/components/merge_requests/list.vue
...assets/javascripts/ide/components/merge_requests/list.vue
+0
-1
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+17
-1
No files found.
app/assets/javascripts/ide/components/ide_side_bar.vue
View file @
34dae228
<
script
>
import
$
from
'
jquery
'
;
import
{
mapState
,
mapGetters
}
from
'
vuex
'
;
import
ProjectAvatarImage
from
'
~/vue_shared/components/project_avatar/image.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
...
...
@@ -70,19 +71,31 @@ export default {
this
.
showTooltip
=
this
.
$refs
.
branchId
.
scrollWidth
>
this
.
$refs
.
branchId
.
offsetWidth
;
});
},
showMergeRequestsDropdown
()
{
if
(
this
.
showMergeRequestsDropdown
)
{
document
.
addEventListener
(
'
click
'
,
this
.
hideMergeRequestDropdown
);
}
else
{
document
.
removeEventListener
(
'
click
'
,
this
.
hideMergeRequestDropdown
);
loading
()
{
if
(
!
this
.
loading
)
{
this
.
$nextTick
(()
=>
{
this
.
addDropdownListeners
();
}
);
}
},
},
mounted
()
{
this
.
addDropdownListeners
();
},
beforeDestroy
()
{
$
(
this
.
$refs
.
mergeRequestDropdown
)
.
off
(
'
show.bs.dropdown
'
)
.
off
(
'
hide.bs.dropdown
'
);
},
methods
:
{
hideMergeRequestDropdown
(
e
)
{
if
(
this
.
$refs
.
mergeRequestDropdown
.
contains
(
e
.
target
))
return
;
this
.
showMergeRequestsDropdown
=
false
;
addDropdownListeners
()
{
$
(
this
.
$refs
.
mergeRequestDropdown
)
.
on
(
'
show.bs.dropdown
'
,
()
=>
{
this
.
toggleMergeRequestDropdown
();
})
.
on
(
'
hide.bs.dropdown
'
,
()
=>
{
this
.
toggleMergeRequestDropdown
();
});
},
toggleMergeRequestDropdown
()
{
this
.
showMergeRequestsDropdown
=
!
this
.
showMergeRequestsDropdown
;
...
...
@@ -113,15 +126,12 @@ export default {
<
template
v-else
>
<div
class=
"context-header ide-context-header dropdown"
:class=
"
{
show: showMergeRequestsDropdown
}"
ref=
"mergeRequestDropdown"
>
<a
href=
"#"
role=
"button"
@
click.prevent=
"toggleMergeRequestD
ropdown"
data-toggle=
"d
ropdown"
>
<div
v-if=
"currentProject.avatar_url"
...
...
@@ -178,7 +188,7 @@ export default {
/>
</a>
<merge-request-dropdown
v-if
=
"showMergeRequestsDropdown"
:show
=
"showMergeRequestsDropdown"
@
hide=
"toggleMergeRequestDropdown"
/>
</div>
...
...
app/assets/javascripts/ide/components/merge_requests/dropdown.vue
View file @
34dae228
...
...
@@ -10,23 +10,27 @@ export default {
Tab
,
List
,
},
props
:
{
show
:
{
type
:
Boolean
,
required
:
true
,
},
},
computed
:
{
...
mapGetters
(
'
mergeRequests
'
,
[
'
assignedData
'
,
'
createdData
'
]),
createdMergeRequestLength
()
{
return
this
.
createdData
.
mergeRequests
.
length
;
},
},
methods
:
{
hideDropdown
()
{
this
.
$emit
(
'
hide
'
);
},
},
};
</
script
>
<
template
>
<div
class=
"dropdown-menu ide-merge-requests-dropdown p-0"
>
<tabs
stop-propagation
>
<tabs
v-if=
"show"
stop-propagation
>
<tab
active
>
<template
slot=
"title"
>
{{
__
(
'
Created by me
'
)
}}
...
...
@@ -37,7 +41,6 @@ export default {
<list
type=
"created"
:empty-text=
"__('You have not created any merge requests')"
@
hide=
"hideDropdown"
/>
</tab>
<tab>
...
...
@@ -50,7 +53,6 @@ export default {
<list
type=
"assigned"
:empty-text=
"__('You do not have any assigned merge requests')"
@
hide=
"hideDropdown"
/>
</tab>
</tabs>
...
...
app/assets/javascripts/ide/components/merge_requests/item.vue
View file @
34dae228
...
...
@@ -55,7 +55,7 @@ export default {
<strong>
{{
item
.
title
}}
</strong>
<span
class=
"d-block mt-1"
>
<span
class=
"
ide-merge-request-project-path
d-block mt-1"
>
{{
pathWithID
}}
</span>
</span>
...
...
app/assets/javascripts/ide/components/merge_requests/list.vue
View file @
34dae228
...
...
@@ -58,7 +58,6 @@ export default {
this
.
fetchMergeRequests
({
type
:
this
.
type
,
search
:
this
.
search
});
},
viewMergeRequest
(
item
)
{
this
.
$emit
(
'
hide
'
);
this
.
openMergeRequest
({
projectPath
:
item
.
projectPathWithNamespace
,
id
:
item
.
iid
,
...
...
app/assets/stylesheets/pages/repo.scss
View file @
34dae228
...
...
@@ -1137,7 +1137,7 @@
}
.ide-merge-requests-dropdown.dropdown-menu
{
width
:
3
50
px
;
width
:
3
85
px
;
max-height
:
initial
;
}
}
...
...
@@ -1298,6 +1298,16 @@
}
}
}
.dropdown-input
{
padding-left
:
$gl-padding
;
padding-right
:
$gl-padding
;
}
.btn-link
{
padding-top
:
$gl-padding
;
padding-bottom
:
$gl-padding
;
}
}
.ide-merge-request-current-icon
{
...
...
@@ -1312,3 +1322,9 @@
min-height
:
230px
;
max-height
:
470px
;
}
.ide-merge-request-project-path
{
font-size
:
12px
;
line-height
:
16px
;
color
:
$gl-text-color-secondary
;
}
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