From 6438df3a1e0fb944485cebf07976160184697d72 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 20 Jan 2021 13:34:23 -0600 Subject: Add latest changes from gitlab-org/gitlab@13-8-stable-ee --- app/assets/javascripts/profile/profile.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'app/assets/javascripts/profile/profile.js') diff --git a/app/assets/javascripts/profile/profile.js b/app/assets/javascripts/profile/profile.js index 4755a4aa9ba..bfeeff47163 100644 --- a/app/assets/javascripts/profile/profile.js +++ b/app/assets/javascripts/profile/profile.js @@ -20,7 +20,7 @@ export default class Profile { this.timezoneDropdown = new TimezoneDropdown({ $inputEl: this.$inputEl, $dropdownEl: $('.js-timezone-dropdown'), - displayFormat: selectedItem => formatTimezone(selectedItem), + displayFormat: (selectedItem) => formatTimezone(selectedItem), }); } @@ -33,15 +33,13 @@ export default class Profile { uploadImageBtn: '.js-upload-user-avatar', modalCropImg: '.modal-profile-crop-image', }; - this.avatarGlCrop = $('.js-user-avatar-input') - .glCrop(cropOpts) - .data('glcrop'); + this.avatarGlCrop = $('.js-user-avatar-input').glCrop(cropOpts).data('glcrop'); } bindEvents() { $('.js-preferences-form').on('change.preference', 'input[type=radio]', this.submitForm); $('.js-group-notification-email').on('change', this.submitForm); - $('#user_notification_email').on('select2-selecting', event => { + $('#user_notification_email').on('select2-selecting', (event) => { setTimeout(this.submitForm.bind(event.currentTarget)); }); $('#user_notified_of_own_activity').on('change', this.submitForm); @@ -91,7 +89,7 @@ export default class Profile { // Enable submit button after requests ends self.form.find(':input[disabled]').enable(); }) - .catch(error => flash(error.message)); + .catch((error) => flash(error.message)); } updateHeaderAvatar() { -- cgit v1.2.1