BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d2848f9d
Unverified
Commit
d2848f9d
authored
Oct 23, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CSS in load more participants
parent
3f9022cf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
issuable_context.js
app/assets/javascripts/issuable_context.js
+9
-10
_participants.html.haml
app/views/shared/issuable/_participants.html.haml
+1
-1
No files found.
app/assets/javascripts/issuable_context.js
View file @
d2848f9d
...
...
@@ -51,20 +51,19 @@ const PARTICIPANTS_ROW_COUNT = 7;
}
IssuableContext
.
prototype
.
initParticipants
=
function
()
{
$
(
document
).
on
(
"click"
,
".js-participants-more"
,
this
.
toggleHiddenParticipants
);
return
$
(
".js-participants-author"
).
each
(
function
(
i
)
{
$
(
document
).
on
(
'click'
,
'.js-participants-more'
,
this
.
toggleHiddenParticipants
);
return
$
(
'.js-participants-author'
).
each
(
function
(
i
)
{
if
(
i
>=
PARTICIPANTS_ROW_COUNT
)
{
return
$
(
this
).
addClass
(
"js-participants-hidden"
).
hide
();
return
$
(
this
).
addClass
(
'js-participants-hidden'
).
hide
();
}
});
};
IssuableContext
.
prototype
.
toggleHiddenParticipants
=
function
(
e
)
{
var
currentText
,
lessText
,
originalText
;
e
.
preventDefault
();
currentText
=
$
(
this
).
text
().
trim
();
lessText
=
$
(
this
).
data
(
"less-text"
);
originalText
=
$
(
this
).
data
(
"original-text"
);
IssuableContext
.
prototype
.
toggleHiddenParticipants
=
function
()
{
const
currentText
=
$
(
this
).
text
().
trim
();
const
lessText
=
$
(
this
).
data
(
'less-text'
);
const
originalText
=
$
(
this
).
data
(
'original-text'
);
if
(
currentText
===
originalText
)
{
$
(
this
).
text
(
lessText
);
...
...
@@ -73,7 +72,7 @@ const PARTICIPANTS_ROW_COUNT = 7;
$
(
this
).
text
(
originalText
);
}
$
(
".js-participants-hidden"
).
toggle
();
$
(
'.js-participants-hidden'
).
toggle
();
};
return
IssuableContext
;
...
...
app/views/shared/issuable/_participants.html.haml
View file @
d2848f9d
...
...
@@ -14,5 +14,5 @@
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
,
lazy_load:
true
)
-
if
participants_extra
>
0
.hide-collapsed.participants-more
%
a
.js-participants-more
{
href:
"#"
,
data:
{
original_text:
"+ #{participants_size - 7} more"
,
less_text:
"- show less"
}
}
%
button
.btn-transparent.btn-blank.js-participants-more
{
data:
{
original_text:
"+ #{participants_size - 7} more"
,
less_text:
"- show less"
,
type:
'button'
}
}
+
#{
participants_extra
}
more
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