73
73
var ul = document.createElement("ul");
74
74
for (var i=0; i<groupmembers.length; i++)
76
var li = dom_make_text_elem("li", groupmembers[i].fullname + " (" +
77
groupmembers[i].login + ")");
76
var member = groupmembers[i];
78
var li = dom_make_text_elem("li", member.fullname + " (" +
80
var rmbutton = document.createElement("input");
81
rmbutton.value = "Remove";
82
rmbutton.type = "image";
83
/* XXX: There must be a better way to do this! */
84
rmbutton.src = "/+media/ivle.webapp.groups/cross.png";
86
$(rmbutton).click(function(offeringid, login, groupid, elemnm)
89
if (!confirm("Are you sure want to revoke this user's membership?"))
92
var args = {'login': login, 'groupid': groupid};
93
ajax_call(null, serviceapp, 'unassign_group', args, 'POST');
94
list_projectgroup_contents(offeringid, groupid, elemnm);
96
}(offeringid, member.login, groupid, elemnm));
98
li.appendChild(rmbutton);
78
99
ul.appendChild(li);