diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 03:10:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 03:10:11 +0300 |
commit | b5452c76b5b35884482214dbf6fe9971e0276d3b (patch) | |
tree | 45eaee5a27650a3c63a742398054cb666838aae3 /app/assets/javascripts | |
parent | af969ba2792f5d872f446398abcf9895573bd292 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/search_autocomplete.js | 10 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/components/date_time_picker/date_time_picker.vue | 5 |
2 files changed, 14 insertions, 1 deletions
diff --git a/app/assets/javascripts/search_autocomplete.js b/app/assets/javascripts/search_autocomplete.js index 05e0b9e7089..990c8faf253 100644 --- a/app/assets/javascripts/search_autocomplete.js +++ b/app/assets/javascripts/search_autocomplete.js @@ -12,6 +12,7 @@ import { getProjectSlug, spriteIcon, } from './lib/utils/common_utils'; +import Tracking from '~/tracking'; /** * Search input in top navigation bar. @@ -355,6 +356,15 @@ export class SearchAutocomplete { if (!this.dropdown.hasClass('show')) { this.loadingSuggestions = false; this.dropdownToggle.dropdown('toggle'); + + const trackEvent = 'click_search_bar'; + const trackCategory = undefined; // will be default set in event method + + Tracking.event(trackCategory, trackEvent, { + label: 'main_navigation', + property: 'navigation', + }); + return this.searchInput.removeClass('js-autocomplete-disabled'); } } diff --git a/app/assets/javascripts/vue_shared/components/date_time_picker/date_time_picker.vue b/app/assets/javascripts/vue_shared/components/date_time_picker/date_time_picker.vue index d932588bee1..3b6b0a91e97 100644 --- a/app/assets/javascripts/vue_shared/components/date_time_picker/date_time_picker.vue +++ b/app/assets/javascripts/vue_shared/components/date_time_picker/date_time_picker.vue @@ -213,6 +213,7 @@ export default { class="d-inline-block" > <gl-deprecated-dropdown + ref="dropdown" :text="timeWindowText" v-bind="$attrs" class="date-time-picker w-100" @@ -250,7 +251,9 @@ export default { /> </div> <gl-form-group> - <gl-button @click="closeDropdown">{{ __('Cancel') }}</gl-button> + <gl-button data-testid="cancelButton" @click="closeDropdown">{{ + __('Cancel') + }}</gl-button> <gl-button variant="success" category="primary" |