diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/protected_tags | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/protected_tags')
4 files changed, 9 insertions, 9 deletions
diff --git a/app/assets/javascripts/protected_tags/constants.js b/app/assets/javascripts/protected_tags/constants.js new file mode 100644 index 00000000000..3e71ba62877 --- /dev/null +++ b/app/assets/javascripts/protected_tags/constants.js @@ -0,0 +1,3 @@ +import { s__ } from '~/locale'; + +export const FAILED_TO_UPDATE_TAG_MESSAGE = s__('ProjectSettings|Failed to update tag!'); diff --git a/app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js b/app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js index 202286a5fb4..4094c300a50 100644 --- a/app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js +++ b/app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js @@ -1,5 +1,5 @@ -import { __ } from '~/locale'; import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown'; +import { __ } from '~/locale'; export default class ProtectedTagAccessDropdown { constructor(options) { diff --git a/app/assets/javascripts/protected_tags/protected_tag_create.js b/app/assets/javascripts/protected_tags/protected_tag_create.js index eb44f0c67fd..e3f427b8408 100644 --- a/app/assets/javascripts/protected_tags/protected_tag_create.js +++ b/app/assets/javascripts/protected_tags/protected_tag_create.js @@ -1,7 +1,7 @@ import $ from 'jquery'; -import ProtectedTagAccessDropdown from './protected_tag_access_dropdown'; -import CreateItemDropdown from '../create_item_dropdown'; import { __ } from '~/locale'; +import CreateItemDropdown from '../create_item_dropdown'; +import ProtectedTagAccessDropdown from './protected_tag_access_dropdown'; export default class ProtectedTagCreate { constructor() { diff --git a/app/assets/javascripts/protected_tags/protected_tag_edit.js b/app/assets/javascripts/protected_tags/protected_tag_edit.js index 157ac1c7ebd..ae7855d4638 100644 --- a/app/assets/javascripts/protected_tags/protected_tag_edit.js +++ b/app/assets/javascripts/protected_tags/protected_tag_edit.js @@ -1,7 +1,7 @@ import { deprecatedCreateFlash as flash } from '../flash'; import axios from '../lib/utils/axios_utils'; +import { FAILED_TO_UPDATE_TAG_MESSAGE } from './constants'; import ProtectedTagAccessDropdown from './protected_tag_access_dropdown'; -import { __ } from '~/locale'; export default class ProtectedTagEdit { constructor(options) { @@ -48,11 +48,8 @@ export default class ProtectedTagEdit { .catch(() => { this.$allowedToCreateDropdownButton.enable(); - flash( - __('Failed to update tag!'), - 'alert', - document.querySelector('.js-protected-tags-list'), - ); + window.scrollTo({ top: 0, behavior: 'smooth' }); + flash(FAILED_TO_UPDATE_TAG_MESSAGE); }); } } |