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
Jérome Perrin
gitlab-ce
Commits
a958a046
Commit
a958a046
authored
Aug 11, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix contributions calendar month label truncation
parent
f7b64a46
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/users/calendar.js
app/assets/javascripts/users/calendar.js
+15
-1
No files found.
CHANGELOG
View file @
a958a046
...
@@ -55,6 +55,7 @@ v 8.12.0 (unreleased)
...
@@ -55,6 +55,7 @@ v 8.12.0 (unreleased)
- Ability to manage project issues, snippets, wiki, merge requests and builds access level
- Ability to manage project issues, snippets, wiki, merge requests and builds access level
- Remove inconsistent font weight for sidebar's labels (ClemMakesApps)
- Remove inconsistent font weight for sidebar's labels (ClemMakesApps)
- Align add button on repository view (ClemMakesApps)
- Align add button on repository view (ClemMakesApps)
- Fix contributions calendar month label truncation (ClemMakesApps)
- Added tests for diff notes
- Added tests for diff notes
- Add a button to download latest successful artifacts for branches and tags !5142
- Add a button to download latest successful artifacts for branches and tags !5142
- Remove redundant pipeline tooltips (ClemMakesApps)
- Remove redundant pipeline tooltips (ClemMakesApps)
...
...
app/assets/javascripts/users/calendar.js
View file @
a958a046
...
@@ -52,8 +52,22 @@
...
@@ -52,8 +52,22 @@
this
.
initTooltips
();
this
.
initTooltips
();
}
}
// Add extra padding for the last month label if it is also the last column
Calendar
.
prototype
.
getExtraWidthPadding
=
function
(
group
)
{
var
extraWidthPadding
=
0
;
var
lastColMonth
=
this
.
timestampsTmp
[
group
-
1
][
0
].
date
.
getMonth
();
var
secondLastColMonth
=
this
.
timestampsTmp
[
group
-
2
][
0
].
date
.
getMonth
();
if
(
lastColMonth
!=
secondLastColMonth
)
{
extraWidthPadding
=
3
;
}
return
extraWidthPadding
;
}
Calendar
.
prototype
.
renderSvg
=
function
(
group
)
{
Calendar
.
prototype
.
renderSvg
=
function
(
group
)
{
return
this
.
svg
=
d3
.
select
(
'
.js-contrib-calendar
'
).
append
(
'
svg
'
).
attr
(
'
width
'
,
(
group
+
1
)
*
this
.
daySizeWithSpace
).
attr
(
'
height
'
,
167
).
attr
(
'
class
'
,
'
contrib-calendar
'
);
var
width
=
(
group
+
1
)
*
this
.
daySizeWithSpace
+
this
.
getExtraWidthPadding
(
group
);
return
this
.
svg
=
d3
.
select
(
'
.js-contrib-calendar
'
).
append
(
'
svg
'
).
attr
(
'
width
'
,
width
).
attr
(
'
height
'
,
167
).
attr
(
'
class
'
,
'
contrib-calendar
'
);
};
};
Calendar
.
prototype
.
renderDays
=
function
()
{
Calendar
.
prototype
.
renderDays
=
function
()
{
...
...
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