Fixed "leave shared project" javascript

Now the project is actually removed from the page. This isn't optimal; see
T53546 for a followup.
This commit is contained in:
2017-12-12 11:48:48 +01:00
parent ae8c6e92fc
commit 6d37046933

View File

@@ -264,7 +264,7 @@ script.
$projects_list.find('span.user-remove-confirm').on('click', function(e){ $projects_list.find('span.user-remove-confirm').on('click', function(e){
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
var parent = $(this).closest('projects__list-item'); var parent = $(this).closest('.projects__list-item');
function removeUser(userId, projectUrl){ function removeUser(userId, projectUrl){
$.post(projectUrl, {user_id: userId, action: 'remove'}) $.post(projectUrl, {user_id: userId, action: 'remove'})