~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/groups/media/groups.js

  • Committer: William Grant
  • Date: 2010-02-23 08:48:09 UTC
  • mfrom: (1673 trunk)
  • mto: This revision was merged to the branch mainline in revision 1674.
  • Revision ID: grantw@unimelb.edu.au-20100223084809-du6dvsxrjhw15ytr
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
 
56
56
function manage_group(offeringid, groupid, namespace)
57
57
{
 
58
    var elem = document.getElementById(namespace);
58
59
    var button = document.getElementById(namespace+"_button");
59
60
    var manage_div = document.createElement("div")
60
61
    manage_div.id = namespace + "_contents";
61
 
 
62
 
    /* Get the td which is button's parent (the 'actions' column) */
63
 
    button_td = button.parentNode;
64
 
    button_td.appendChild(manage_div);
65
 
 
 
62
    elem.insertBefore(manage_div, button);
 
63
    
66
64
    /* Refresh contents */
67
65
    list_projectgroup_contents(offeringid, groupid, manage_div.id);
68
66
 
69
67
    /* Remove the button element */
70
 
    button_td.removeChild(button);
 
68
    elem.removeChild(button);
71
69
}
72
70
 
73
71
/* Lists the information about a particular project group identified by groupid 
91
89
            var member = groupmembers[i];
92
90
 
93
91
            var li = dom_make_text_elem("li", member.fullname + " (" +
94
 
                                              member.login + ") ");
 
92
                                              member.login + ")");
95
93
            var rmbutton = document.createElement("input");
96
94
            rmbutton.value = "Remove";
97
95
            rmbutton.type = "image";
98
96
            /* XXX: There must be a better way to do this! */
99
 
            rmbutton.src = "/+media/ivle.webapp.core/images/interface/delete.png";
 
97
            rmbutton.src = "/+media/ivle.webapp.groups/cross.png";
100
98
 
101
99
            $(rmbutton).click(function(offeringid, login, groupid, elemnm)
102
100
            {