diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-09 03:42:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-09 03:42:22 +0000 |
commit | 7dd9256e5eac896fb422566376086a0befc79151 (patch) | |
tree | be65227875ddb0cff4961ae2d97380bbf64dd851 /app/assets/javascripts/pages/users | |
parent | 2295d352f6073101497f9bf4e4981c7ae72706a3 (diff) | |
download | gitlab-ce-7dd9256e5eac896fb422566376086a0befc79151.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages/users')
-rw-r--r-- | app/assets/javascripts/pages/users/activity_calendar.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/assets/javascripts/pages/users/activity_calendar.js b/app/assets/javascripts/pages/users/activity_calendar.js index 0fab4678bc3..7f4e79976bc 100644 --- a/app/assets/javascripts/pages/users/activity_calendar.js +++ b/app/assets/javascripts/pages/users/activity_calendar.js @@ -5,6 +5,7 @@ import { last } from 'lodash'; import createFlash from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { getDayName, getDayDifference } from '~/lib/utils/datetime_utility'; +import { formatDate } from '~/lib/utils/datetime/date_format_utility'; import { n__, s__, __ } from '~/locale'; const d3 = { select }; @@ -294,7 +295,15 @@ export default class ActivityCalendar { }, responseType: 'text', }) - .then(({ data }) => $(this.activitiesContainer).html(data)) + .then(({ data }) => { + $(this.activitiesContainer).html(data); + document + .querySelector(this.activitiesContainer) + .querySelectorAll('.js-localtime') + .forEach((el) => { + el.setAttribute('title', formatDate(el.getAttribute('data-datetime'))); + }); + }) .catch(() => createFlash({ message: __('An error occurred while retrieving calendar activity'), |