Commit 87a0501d authored by Phil Hughes's avatar Phil Hughes

Updates the member row when values changed

parent 52d2fd49
...@@ -14,14 +14,18 @@ ...@@ -14,14 +14,18 @@
inputs.datepicker({ inputs.datepicker({
dateFormat: 'yy-mm-dd', dateFormat: 'yy-mm-dd',
minDate: 1, minDate: 1,
onSelect: toggleClearInput onSelect: function () {
$(this).trigger('change');
toggleClearInput.call(this);
}
}); });
inputs.next('.js-clear-input').on('click', function(event) { inputs.next('.js-clear-input').on('click', function(event) {
event.preventDefault(); event.preventDefault();
var input = $(this).closest('.clearable-input').find('.js-access-expiration-date'); var input = $(this).closest('.clearable-input').find('.js-access-expiration-date');
input.datepicker('setDate', null); input.datepicker('setDate', null)
.trigger('change');
toggleClearInput.call(input); toggleClearInput.call(input);
}); });
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
addListeners() { addListeners() {
$('.project_member').on('ajax:success', this.removeRow); $('.project_member').on('ajax:success', this.removeRow);
$('.js-member-update-control').on('change', function () { $('.js-member-update-control').on('change', function () {
console.log($(this).val()); $(this).closest('form')
.trigger("submit.rails");
}); });
} }
......
:plain :plain
$("##{dom_id(@project_member)}").replaceWith('#{escape_javascript(render('shared/members/member', member: @project_member))}'); var $listItem = $('#{escape_javascript(render('shared/members/member', member: @project_member))}');
new gl.MemberExpirationDate(); $("##{dom_id(@project_member)} .list-item-name").replaceWith($listItem.find('.list-item-name'));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment