From 7dd9256e5eac896fb422566376086a0befc79151 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 9 Nov 2021 03:42:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/pages/users/activity_calendar.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/pages') 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'), -- cgit v1.2.1