summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/profile
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/profile')
-rw-r--r--app/assets/javascripts/profile/account/components/update_username.vue4
-rw-r--r--app/assets/javascripts/profile/add_ssh_key_validation.js2
-rw-r--r--app/assets/javascripts/profile/gl_crop.js8
-rw-r--r--app/assets/javascripts/profile/preferences/profile_preferences_bundle.js2
-rw-r--r--app/assets/javascripts/profile/profile.js10
5 files changed, 12 insertions, 14 deletions
diff --git a/app/assets/javascripts/profile/account/components/update_username.vue b/app/assets/javascripts/profile/account/components/update_username.vue
index 5feac7485ad..869fdccc800 100644
--- a/app/assets/javascripts/profile/account/components/update_username.vue
+++ b/app/assets/javascripts/profile/account/components/update_username.vue
@@ -84,12 +84,12 @@ Please update your Git repository remotes as soon as possible.`),
return axios
.put(this.actionUrl, putData)
- .then(result => {
+ .then((result) => {
Flash(result.data.message, 'notice');
this.username = username;
this.isRequestPending = false;
})
- .catch(error => {
+ .catch((error) => {
Flash(error.response.data.message);
this.isRequestPending = false;
throw error;
diff --git a/app/assets/javascripts/profile/add_ssh_key_validation.js b/app/assets/javascripts/profile/add_ssh_key_validation.js
index ab6a6c1896c..5c78de7ffb0 100644
--- a/app/assets/javascripts/profile/add_ssh_key_validation.js
+++ b/app/assets/javascripts/profile/add_ssh_key_validation.js
@@ -12,7 +12,7 @@ export default class AddSshKeyValidation {
}
register() {
- this.form.addEventListener('submit', event => this.submit(event));
+ this.form.addEventListener('submit', (event) => this.submit(event));
this.confirmSubmitElement.addEventListener('click', () => {
this.isValid = true;
diff --git a/app/assets/javascripts/profile/gl_crop.js b/app/assets/javascripts/profile/gl_crop.js
index ecb69422287..afc78cbe78a 100644
--- a/app/assets/javascripts/profile/gl_crop.js
+++ b/app/assets/javascripts/profile/gl_crop.js
@@ -61,7 +61,7 @@ import { loadCSSFile } from '../lib/utils/css_utils';
bindEvents() {
const _this = this;
- this.fileInput.on('change', function(e) {
+ this.fileInput.on('change', function (e) {
_this.onFileInputChange(e, this);
this.value = null;
});
@@ -69,7 +69,7 @@ import { loadCSSFile } from '../lib/utils/css_utils';
this.modalCrop.on('shown.bs.modal', this.onModalShow);
this.modalCrop.on('hidden.bs.modal', this.onModalHide);
this.uploadImageBtn.on('click', this.onUploadImageBtnClick);
- this.cropActionsBtn.on('click', function() {
+ this.cropActionsBtn.on('click', function () {
const btn = this;
return _this.onActionBtnClick(btn);
});
@@ -184,8 +184,8 @@ import { loadCSSFile } from '../lib/utils/css_utils';
const cropModal = document.querySelector('.modal-profile-crop');
if (cropModal) loadCSSFile(cropModal.dataset.cropperCssPath);
- $.fn.glCrop = function(opts) {
- return this.each(function() {
+ $.fn.glCrop = function (opts) {
+ return this.each(function () {
return $(this).data('glcrop', new GitLabCrop(this, opts));
});
};
diff --git a/app/assets/javascripts/profile/preferences/profile_preferences_bundle.js b/app/assets/javascripts/profile/preferences/profile_preferences_bundle.js
index bcca3140717..744e0174a4e 100644
--- a/app/assets/javascripts/profile/preferences/profile_preferences_bundle.js
+++ b/app/assets/javascripts/profile/preferences/profile_preferences_bundle.js
@@ -18,6 +18,6 @@ export default () => {
el,
name: 'ProfilePreferencesApp',
provide,
- render: createElement => createElement(ProfilePreferences),
+ render: (createElement) => createElement(ProfilePreferences),
});
};
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() {