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
Boxiang Sun
gitlab-ce
Commits
17b43cd4
Commit
17b43cd4
authored
Jul 27, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve eqeqeq, newline-per-chained-call, no-unused-vars, and no-else-return eslint violations
parent
c4718a5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
app/assets/javascripts/users/activity_calendar.js
app/assets/javascripts/users/activity_calendar.js
+11
-10
No files found.
app/assets/javascripts/users/activity_calendar.js
View file @
17b43cd4
/* eslint-disable no-var, vars-on-top,
eqeqeq, newline-per-chained-call, one-var, one-var-declaration-per-line, no-unused-vars, no-else-return
, max-len, class-methods-use-this */
/* eslint-disable no-var, vars-on-top,
one-var, one-var-declaration-per-line
, max-len, class-methods-use-this */
import
d3
from
'
d3
'
;
...
...
@@ -70,7 +70,7 @@ export default class ActivityCalendar {
var
lastColMonth
=
this
.
timestampsTmp
[
group
-
1
][
0
].
date
.
getMonth
();
var
secondLastColMonth
=
this
.
timestampsTmp
[
group
-
2
][
0
].
date
.
getMonth
();
if
(
lastColMonth
!=
secondLastColMonth
)
{
if
(
lastColMonth
!=
=
secondLastColMonth
)
{
extraWidthPadding
=
3
;
}
...
...
@@ -79,7 +79,11 @@ export default class ActivityCalendar {
renderSvg
(
group
)
{
var
width
=
((
group
+
1
)
*
this
.
daySizeWithSpace
)
+
this
.
getExtraWidthPadding
(
group
);
this
.
svg
=
d3
.
select
(
'
.js-contrib-calendar
'
).
append
(
'
svg
'
).
attr
(
'
width
'
,
width
).
attr
(
'
height
'
,
167
).
attr
(
'
class
'
,
'
contrib-calendar
'
);
this
.
svg
=
d3
.
select
(
'
.js-contrib-calendar
'
)
.
append
(
'
svg
'
)
.
attr
(
'
width
'
,
width
)
.
attr
(
'
height
'
,
167
)
.
attr
(
'
class
'
,
'
contrib-calendar
'
);
}
renderDays
()
{
...
...
@@ -119,13 +123,10 @@ export default class ActivityCalendar {
dateText
=
date
.
format
(
'
mmm d, yyyy
'
);
return
`
${
contribText
}
<br />
${
gl
.
utils
.
getDayName
(
date
)}
${
dateText
}
`
;
})
.
attr
(
'
class
'
,
'
user-contrib-cell js-tooltip
'
).
attr
(
'
fill
'
,
(
stamp
)
=>
{
if
(
stamp
.
count
!==
0
)
{
return
this
.
color
(
Math
.
min
(
stamp
.
count
,
40
));
}
else
{
return
'
#ededed
'
;
}
})
.
attr
(
'
class
'
,
'
user-contrib-cell js-tooltip
'
)
.
attr
(
'
fill
'
,
stamp
=>
(
stamp
.
count
!==
0
?
this
.
color
(
Math
.
min
(
stamp
.
count
,
40
))
:
'
#ededed
'
))
.
attr
(
'
data-container
'
,
'
body
'
)
.
on
(
'
click
'
,
this
.
clickDay
);
}
...
...
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