summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/profile/profile.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/profile/profile.js')
-rw-r--r--app/assets/javascripts/profile/profile.js10
1 files changed, 4 insertions, 6 deletions
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() {