From 0ab86a72b957f30fdf3116bb14f8840977f15635 Mon Sep 17 00:00:00 2001 From: Loic Baron Date: Mon, 26 Jan 2015 13:00:48 +0100 Subject: [PATCH] Project: display list of users (pis of project) user removed from the list after success --- portal/templates/fed4fire/fed4fire_institution.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/portal/templates/fed4fire/fed4fire_institution.html b/portal/templates/fed4fire/fed4fire_institution.html index d4025864..fa4115b3 100644 --- a/portal/templates/fed4fire/fed4fire_institution.html +++ b/portal/templates/fed4fire/fed4fire_institution.html @@ -311,6 +311,17 @@ $(document).ready(function() { $.post("/update/myslice:authority/",{'filters':{'authority_hrn':'{{user_details.parent_authority}}'},'params':{'pi_users':pi_users}}, function(data) { if(data.success){ mysliceAlert('Success: User rights removed from: {{user_details.parent_authority}}','success', true); + {% if project %} + // remove the user from the list of pis of the project displayed + $('input:checkbox.user').each(function (index) { + if(this.checked){ + var record_id = this.id; + $('tr[id="'+record_id+'"]').fadeOut("slow"); + $('tr[id="'+record_id+'"]').remove(); + } + + }); + {% endif %} }else{ mysliceAlert('Rest Error for: '+data.error,'warning', true); //alert("Rest Error for "+record_id+": "+data.error); -- 2.43.0