Skip to content
Snippets Groups Projects
Commit 3aaf6271 authored by Phil Hughes's avatar Phil Hughes
Browse files

JS update

parent ed5d29aa
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -15,14 +15,8 @@
 
addListeners() {
$('.project_member, .group_member').on('ajax:success', this.removeRow);
$('.js-member-update-control').on('change', function () {
$(this).closest('form')
.trigger("submit.rails");
$(this).disable();
});
$('.js-edit-member-form').on('ajax:success', function () {
$(this).find('.js-member-update-control').enable();
});
$('.js-member-update-control').on('change', this.formSubmit);
$('.js-edit-member-form').on('ajax:success', this.formSuccess);
}
 
removeRow(e) {
Loading
Loading
@@ -36,8 +30,16 @@
}
}
 
submitForm() {
formSubmit() {
const $this = $(this);
 
$this.disable()
.closest('form')
.trigger("submit.rails");
}
formSuccess() {
$(this).find('.js-member-update-control').enable();
}
}
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment