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
iv
gitlab-ce
Commits
59e51e3c
Commit
59e51e3c
authored
Mar 21, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug where participants would not work correctly on merge requests
Also fixed alignment bug with can't merge badge
parent
b9fb48bc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
31 deletions
+30
-31
app/assets/javascripts/issuable_context.js.coffee
app/assets/javascripts/issuable_context.js.coffee
+26
-2
app/assets/javascripts/issue.js.coffee
app/assets/javascripts/issue.js.coffee
+0
-25
app/views/shared/issuable/_participants.html.haml
app/views/shared/issuable/_participants.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+3
-3
No files found.
app/assets/javascripts/issuable_context.js.coffee
View file @
59e51e3c
#= require jquery.waitforimages
class
@
IssuableContext
class
@
IssuableContext
constructor
:
->
constructor
:
->
@
initParticipants
()
new
UsersSelect
()
new
UsersSelect
()
$
(
'select.select2'
).
select2
({
width
:
'resolve'
,
dropdownAutoWidth
:
true
})
$
(
'select.select2'
).
select2
({
width
:
'resolve'
,
dropdownAutoWidth
:
true
})
...
@@ -17,3 +17,27 @@ class @IssuableContext
...
@@ -17,3 +17,27 @@ class @IssuableContext
block
.
find
(
'.js-select2'
).
select2
(
"open"
)
block
.
find
(
'.js-select2'
).
select2
(
"open"
)
$
(
".right-sidebar"
).
niceScroll
()
$
(
".right-sidebar"
).
niceScroll
()
initParticipants
:
->
_this
=
@
$
(
document
).
on
"click"
,
".js-participants-more"
,
@
toggleHiddenParticipants
$
(
".js-participants-author"
).
each
(
i
)
->
if
i
>=
_this
.
PARTICIPANTS_ROW_COUNT
$
(
@
)
.
addClass
"js-participants-hidden"
.
hide
()
toggleHiddenParticipants
:
(
e
)
->
e
.
preventDefault
()
currentText
=
$
(
this
).
text
().
trim
()
lessText
=
$
(
this
).
data
(
"less-text"
)
originalText
=
$
(
this
).
data
(
"original-text"
)
if
currentText
is
originalText
$
(
this
).
text
(
lessText
)
else
$
(
this
).
text
(
originalText
)
$
(
".js-participants-hidden"
).
toggle
()
app/assets/javascripts/issue.js.coffee
View file @
59e51e3c
...
@@ -7,7 +7,6 @@ class @Issue
...
@@ -7,7 +7,6 @@ class @Issue
# Prevent duplicate event bindings
# Prevent duplicate event bindings
@
disableTaskList
()
@
disableTaskList
()
@
fixAffixScroll
()
@
fixAffixScroll
()
@
initParticipants
()
if
$
(
'a.btn-close'
).
length
if
$
(
'a.btn-close'
).
length
@
initTaskList
()
@
initTaskList
()
@
initIssueBtnEventListeners
()
@
initIssueBtnEventListeners
()
...
@@ -85,27 +84,3 @@ class @Issue
...
@@ -85,27 +84,3 @@ class @Issue
type
:
'PATCH'
type
:
'PATCH'
url
:
$
(
'form.js-issuable-update'
).
attr
(
'action'
)
url
:
$
(
'form.js-issuable-update'
).
attr
(
'action'
)
data
:
patchData
data
:
patchData
initParticipants
:
->
_this
=
@
$
(
document
).
on
"click"
,
".js-participants-more"
,
@
toggleHiddenParticipants
$
(
".js-participants-author"
).
each
(
i
)
->
if
i
>=
_this
.
PARTICIPANTS_ROW_COUNT
$
(
@
)
.
addClass
"js-participants-hidden"
.
hide
()
toggleHiddenParticipants
:
(
e
)
->
e
.
preventDefault
()
currentText
=
$
(
this
).
text
().
trim
()
lessText
=
$
(
this
).
data
(
"less-text"
)
originalText
=
$
(
this
).
data
(
"original-text"
)
if
currentText
is
originalText
$
(
this
).
text
(
lessText
)
else
$
(
this
).
text
(
originalText
)
$
(
".js-participants-hidden"
).
toggle
()
app/views/shared/issuable/_participants.html.haml
View file @
59e51e3c
...
@@ -17,4 +17,4 @@
...
@@ -17,4 +17,4 @@
%a
.js-participants-more
{
href:
"#"
,
data:
{
original_text:
"+ #{participants_size - 7} more"
,
less_text:
"- show less"
}}
%a
.js-participants-more
{
href:
"#"
,
data:
{
original_text:
"+ #{participants_size - 7} more"
,
less_text:
"- show less"
}}
+
#{
participants_extra
}
more
+
#{
participants_extra
}
more
:javascript
:javascript
Issu
e
.
prototype
.
PARTICIPANTS_ROW_COUNT
=
#{
participants_row
}
;
Issu
ableContext
.
prototype
.
PARTICIPANTS_ROW_COUNT
=
#{
participants_row
}
;
app/views/shared/issuable/_sidebar.html.haml
View file @
59e51e3c
...
@@ -33,11 +33,11 @@
...
@@ -33,11 +33,11 @@
.value.bold.hide-collapsed
.value.bold.hide-collapsed
-
if
issuable
.
assignee
-
if
issuable
.
assignee
=
link_to_member
(
@project
,
issuable
.
assignee
,
size:
32
)
do
=
link_to_member
(
@project
,
issuable
.
assignee
,
size:
32
)
do
%span
.username
=
issuable
.
assignee
.
to_reference
-
if
issuable
.
instance_of?
(
MergeRequest
)
&&
!
issuable
.
can_be_merged_by?
(
issuable
.
assignee
)
-
if
issuable
.
instance_of?
(
MergeRequest
)
&&
!
issuable
.
can_be_merged_by?
(
issuable
.
assignee
)
%a
.pull-right.cannot-be-merged
{
href:
'#'
,
data:
{
toggle:
'tooltip'
},
title:
'Not allowed to merge'
}
%span
.pull-right.cannot-be-merged
{
data:
{
toggle:
'tooltip'
,
placement:
'left'
},
title:
'Not allowed to merge'
}
=
icon
(
'exclamation-triangle'
)
=
icon
(
'exclamation-triangle'
)
%span
.username
=
issuable
.
assignee
.
to_reference
-
else
-
else
.light
None
.light
None
...
...
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