summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2016-09-13 21:43:25 -0500
committerClement Ho <ClemMakesApps@gmail.com>2016-09-16 14:38:59 -0500
commita147b43dcce7da64512efed392041c37ef45851c (patch)
tree65bc121dbcc8e5c7fe3d3add1dbbcbc00859a407 /app
parent1c2aa4f879bdcbfca6c2dd5e52ec486f9995801b (diff)
downloadgitlab-ce-a147b43dcce7da64512efed392041c37ef45851c.tar.gz
Replace contributions calendar timezone payload with dates
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/users/calendar.js2
-rw-r--r--app/controllers/users_controller.rb2
-rw-r--r--app/views/users/calendar.html.haml4
3 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/users/calendar.js b/app/assets/javascripts/users/calendar.js
index b8da7c4f297..3bd4c3c066f 100644
--- a/app/assets/javascripts/users/calendar.js
+++ b/app/assets/javascripts/users/calendar.js
@@ -29,7 +29,7 @@
date.setDate(date.getDate() + i);
var day = date.getDay();
- var count = timestamps[date.getTime() * 0.001];
+ var count = timestamps[dateFormat(date, 'yyyy-mm-dd')];
// Create a new group array if this is the first day of the week
// or if is first object
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index a99632454d9..a4bedb3bfe6 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -73,7 +73,7 @@ class UsersController < ApplicationController
def calendar
calendar = contributions_calendar
- @timestamps = calendar.timestamps
+ @activity_dates = calendar.activity_dates
render 'calendar', layout: false
end
diff --git a/app/views/users/calendar.html.haml b/app/views/users/calendar.html.haml
index 77f2ddefb1e..09ff8a76d27 100644
--- a/app/views/users/calendar.html.haml
+++ b/app/views/users/calendar.html.haml
@@ -4,6 +4,6 @@
Summary of issues, merge requests, and push events
:javascript
new Calendar(
- #{@timestamps.to_json},
+ #{@activity_dates.to_json},
'#{user_calendar_activities_path}'
- );
+ ); \ No newline at end of file