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
0
Merge Requests
0
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
Léo-Paul Géneau
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
>
<
script
>
import
$
from
'
jquery
'
;
import
{
mapState
,
mapGetters
}
from
'
vuex
'
;
import
{
mapState
,
mapGetters
}
from
'
vuex
'
;
import
ProjectAvatarImage
from
'
~/vue_shared/components/project_avatar/image.vue
'
;
import
ProjectAvatarImage
from
'
~/vue_shared/components/project_avatar/image.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
...
@@ -70,19 +71,31 @@ export default {
...
@@ -70,19 +71,31 @@ export default {
this
.
showTooltip
=
this
.
$refs
.
branchId
.
scrollWidth
>
this
.
$refs
.
branchId
.
offsetWidth
;
this
.
showTooltip
=
this
.
$refs
.
branchId
.
scrollWidth
>
this
.
$refs
.
branchId
.
offsetWidth
;
});
});
},
},
showMergeRequestsDropdown
()
{
loading
()
{
if
(
this
.
showMergeRequestsDropdown
)
{
if
(
!
this
.
loading
)
{
document
.
addEventListener
(
'
click
'
,
this
.
hideMergeRequestDropdown
);
this
.
$nextTick
(()
=>
{
}
else
{
this
.
addDropdownListeners
();
document
.
removeEventListener
(
'
click
'
,
this
.
hideMergeRequestDropdown
);
}
);
}
}
},
},
},
},
mounted
()
{
this
.
addDropdownListeners
();
},
beforeDestroy
()
{
$
(
this
.
$refs
.
mergeRequestDropdown
)
.
off
(
'
show.bs.dropdown
'
)
.
off
(
'
hide.bs.dropdown
'
);
},
methods
:
{
methods
:
{
hideMergeRequestDropdown
(
e
)
{
addDropdownListeners
()
{
if
(
this
.
$refs
.
mergeRequestDropdown
.
contains
(
e
.
target
))
return
;
$
(
this
.
$refs
.
mergeRequestDropdown
)
.
on
(
'
show.bs.dropdown
'
,
()
=>
{
this
.
showMergeRequestsDropdown
=
false
;
this
.
toggleMergeRequestDropdown
();
})
.
on
(
'
hide.bs.dropdown
'
,
()
=>
{
this
.
toggleMergeRequestDropdown
();
});
},
},
toggleMergeRequestDropdown
()
{
toggleMergeRequestDropdown
()
{
this
.
showMergeRequestsDropdown
=
!
this
.
showMergeRequestsDropdown
;
this
.
showMergeRequestsDropdown
=
!
this
.
showMergeRequestsDropdown
;
...
@@ -113,15 +126,12 @@ export default {
...
@@ -113,15 +126,12 @@ export default {
<
template
v-else
>
<
template
v-else
>
<div
<div
class=
"context-header ide-context-header dropdown"
class=
"context-header ide-context-header dropdown"
:class=
"
{
show: showMergeRequestsDropdown
}"
ref=
"mergeRequestDropdown"
ref=
"mergeRequestDropdown"
>
>
<a
<a
href=
"#"
href=
"#"
role=
"button"
role=
"button"
@
click.prevent=
"toggleMergeRequestD
ropdown"
data-toggle=
"d
ropdown"
>
>
<div
<div
v-if=
"currentProject.avatar_url"
v-if=
"currentProject.avatar_url"
...
@@ -178,7 +188,7 @@ export default {
...
@@ -178,7 +188,7 @@ export default {
/>
/>
</a>
</a>
<merge-request-dropdown
<merge-request-dropdown
v-if
=
"showMergeRequestsDropdown"
:show
=
"showMergeRequestsDropdown"
@
hide=
"toggleMergeRequestDropdown"
@
hide=
"toggleMergeRequestDropdown"
/>
/>
</div>
</div>
...
...
app/assets/javascripts/ide/components/merge_requests/dropdown.vue
View file @
34dae228
...
@@ -10,23 +10,27 @@ export default {
...
@@ -10,23 +10,27 @@ export default {
Tab
,
Tab
,
List
,
List
,
},
},
props
:
{
show
:
{
type
:
Boolean
,
required
:
true
,
},
},
computed
:
{
computed
:
{
...
mapGetters
(
'
mergeRequests
'
,
[
'
assignedData
'
,
'
createdData
'
]),
...
mapGetters
(
'
mergeRequests
'
,
[
'
assignedData
'
,
'
createdData
'
]),
createdMergeRequestLength
()
{
createdMergeRequestLength
()
{
return
this
.
createdData
.
mergeRequests
.
length
;
return
this
.
createdData
.
mergeRequests
.
length
;
},
},
},
},
methods
:
{
hideDropdown
()
{
this
.
$emit
(
'
hide
'
);
},
},
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"dropdown-menu ide-merge-requests-dropdown p-0"
>
<div
class=
"dropdown-menu ide-merge-requests-dropdown p-0"
>
<tabs
stop-propagation
>
<tabs
v-if=
"show"
stop-propagation
>
<tab
active
>
<tab
active
>
<template
slot=
"title"
>
<template
slot=
"title"
>
{{
__
(
'
Created by me
'
)
}}
{{
__
(
'
Created by me
'
)
}}
...
@@ -37,7 +41,6 @@ export default {
...
@@ -37,7 +41,6 @@ export default {
<list
<list
type=
"created"
type=
"created"
:empty-text=
"__('You have not created any merge requests')"
:empty-text=
"__('You have not created any merge requests')"
@
hide=
"hideDropdown"
/>
/>
</tab>
</tab>
<tab>
<tab>
...
@@ -50,7 +53,6 @@ export default {
...
@@ -50,7 +53,6 @@ export default {
<list
<list
type=
"assigned"
type=
"assigned"
:empty-text=
"__('You do not have any assigned merge requests')"
:empty-text=
"__('You do not have any assigned merge requests')"
@
hide=
"hideDropdown"
/>
/>
</tab>
</tab>
</tabs>
</tabs>
...
...
app/assets/javascripts/ide/components/merge_requests/item.vue
View file @
34dae228
...
@@ -55,7 +55,7 @@ export default {
...
@@ -55,7 +55,7 @@ export default {
<strong>
<strong>
{{
item
.
title
}}
{{
item
.
title
}}
</strong>
</strong>
<span
class=
"d-block mt-1"
>
<span
class=
"
ide-merge-request-project-path
d-block mt-1"
>
{{
pathWithID
}}
{{
pathWithID
}}
</span>
</span>
</span>
</span>
...
...
app/assets/javascripts/ide/components/merge_requests/list.vue
View file @
34dae228
...
@@ -58,7 +58,6 @@ export default {
...
@@ -58,7 +58,6 @@ export default {
this
.
fetchMergeRequests
({
type
:
this
.
type
,
search
:
this
.
search
});
this
.
fetchMergeRequests
({
type
:
this
.
type
,
search
:
this
.
search
});
},
},
viewMergeRequest
(
item
)
{
viewMergeRequest
(
item
)
{
this
.
$emit
(
'
hide
'
);
this
.
openMergeRequest
({
this
.
openMergeRequest
({
projectPath
:
item
.
projectPathWithNamespace
,
projectPath
:
item
.
projectPathWithNamespace
,
id
:
item
.
iid
,
id
:
item
.
iid
,
...
...
app/assets/stylesheets/pages/repo.scss
View file @
34dae228
...
@@ -1137,7 +1137,7 @@
...
@@ -1137,7 +1137,7 @@
}
}
.ide-merge-requests-dropdown.dropdown-menu
{
.ide-merge-requests-dropdown.dropdown-menu
{
width
:
3
50
px
;
width
:
3
85
px
;
max-height
:
initial
;
max-height
:
initial
;
}
}
}
}
...
@@ -1298,6 +1298,16 @@
...
@@ -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
{
.ide-merge-request-current-icon
{
...
@@ -1312,3 +1322,9 @@
...
@@ -1312,3 +1322,9 @@
min-height
:
230px
;
min-height
:
230px
;
max-height
:
470px
;
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