Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /app/assets/javascripts/groups
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/assets/javascripts/groups')
-rw-r--r--app/assets/javascripts/groups/components/invite_members_banner.vue26
1 files changed, 10 insertions, 16 deletions
diff --git a/app/assets/javascripts/groups/components/invite_members_banner.vue b/app/assets/javascripts/groups/components/invite_members_banner.vue
index 747cea6a46e..402d9a07c53 100644
--- a/app/assets/javascripts/groups/components/invite_members_banner.vue
+++ b/app/assets/javascripts/groups/components/invite_members_banner.vue
@@ -1,5 +1,6 @@
<script>
import { GlBanner } from '@gitlab/ui';
+import eventHub from '~/invite_members/event_hub';
import { parseBoolean, setCookie, getCookie } from '~/lib/utils/common_utils';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
@@ -11,7 +12,7 @@ export default {
GlBanner,
},
mixins: [trackingMixin],
- inject: ['svgPath', 'inviteMembersPath', 'isDismissedKey', 'trackLabel'],
+ inject: ['svgPath', 'isDismissedKey', 'trackLabel'],
data() {
return {
isDismissed: parseBoolean(getCookie(this.isDismissedKey)),
@@ -20,11 +21,6 @@ export default {
},
};
},
- created() {
- this.$nextTick(() => {
- this.addTrackingAttributesToButton();
- });
- },
mounted() {
this.trackOnShow();
},
@@ -39,15 +35,12 @@ export default {
if (!this.isDismissed) this.track(this.$options.displayEvent);
});
},
- addTrackingAttributesToButton() {
- if (this.$refs.banner === undefined) return;
-
- const button = this.$refs.banner.$el.querySelector(`[href='${this.inviteMembersPath}']`);
-
- if (button) {
- button.setAttribute('data-track-event', this.$options.buttonClickEvent);
- button.setAttribute('data-track-label', this.trackLabel);
- }
+ openModal() {
+ eventHub.$emit('openModal', {
+ inviteeType: 'members',
+ source: this.$options.openModalSource,
+ });
+ this.track(this.$options.buttonClickEvent);
},
},
i18n: {
@@ -59,6 +52,7 @@ export default {
},
displayEvent: 'invite_members_banner_displayed',
buttonClickEvent: 'invite_members_banner_button_clicked',
+ openModalSource: 'invite_members_banner',
dismissEvent: 'invite_members_banner_dismissed',
};
</script>
@@ -70,8 +64,8 @@ export default {
:title="$options.i18n.title"
:button-text="$options.i18n.button_text"
:svg-path="svgPath"
- :button-link="inviteMembersPath"
@close="handleClose"
+ @primary="openModal"
>
<p>{{ $options.i18n.body }}</p>
</gl-banner>