diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/project_select_combo_button.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/project_select_combo_button.js')
-rw-r--r-- | app/assets/javascripts/project_select_combo_button.js | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/app/assets/javascripts/project_select_combo_button.js b/app/assets/javascripts/project_select_combo_button.js index 865dd23bd80..4b14df21f05 100644 --- a/app/assets/javascripts/project_select_combo_button.js +++ b/app/assets/javascripts/project_select_combo_button.js @@ -17,9 +17,9 @@ export default class ProjectSelectComboButton { bindEvents() { this.projectSelectInput .siblings('.new-project-item-select-button') - .on('click', e => this.openDropdown(e)); + .on('click', (e) => this.openDropdown(e)); - this.newItemBtn.on('click', e => { + this.newItemBtn.on('click', (e) => { if (!this.getProjectFromLocalStorage()) { e.preventDefault(); this.openDropdown(e); @@ -50,9 +50,7 @@ export default class ProjectSelectComboButton { // eslint-disable-next-line promise/no-nesting loadCSSFile(gon.select2_css_path) .then(() => { - $(event.currentTarget) - .siblings('.project-item-select') - .select2('open'); + $(event.currentTarget).siblings('.project-item-select').select2('open'); }) .catch(() => {}); }) @@ -104,14 +102,8 @@ export default class ProjectSelectComboButton { const defaultTextPrefix = this.resourceLabel; // the trailing slice call depluralizes each of these strings (e.g. new-issues -> new-issue) - const localStorageItemType = `new-${this.resourceType - .split('_') - .join('-') - .slice(0, -1)}`; - const presetTextSuffix = this.resourceType - .split('_') - .join(' ') - .slice(0, -1); + const localStorageItemType = `new-${this.resourceType.split('_').join('-').slice(0, -1)}`; + const presetTextSuffix = this.resourceType.split('_').join(' ').slice(0, -1); return { localStorageItemType, // new-issue / new-merge-request |