Project: display list of users (pis of project) user removed from the list after...
authorLoic Baron <loic.baron@lip6.fr>
Mon, 26 Jan 2015 12:00:48 +0000 (13:00 +0100)
committerLoic Baron <loic.baron@lip6.fr>
Mon, 26 Jan 2015 12:00:48 +0000 (13:00 +0100)
portal/templates/fed4fire/fed4fire_institution.html

index d402586..fa4115b 100644 (file)
@@ -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);