~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-07-29 11:34:44 UTC
  • Revision ID: grantw@unimelb.edu.au-20100729113444-ht6s5kdcixvfubhr
Merge video and audio handlers, and reword them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        {
41
41
            /* pass */
42
42
        }
 
43
        else if (response.status == 400)
 
44
        {
 
45
            alert("Could not create group: " + response.getResponseHeader('X-IVLE-Error'));
 
46
        }
43
47
        else
44
48
        {
45
49
            alert("Error: Could not add group. Does it already exist?");
51
55
 
52
56
function manage_group(offeringid, groupid, namespace)
53
57
{
54
 
    var elem = document.getElementById(namespace);
55
58
    var button = document.getElementById(namespace+"_button");
56
59
    var manage_div = document.createElement("div")
57
60
    manage_div.id = namespace + "_contents";
58
 
    elem.insertBefore(manage_div, button);
59
 
    
 
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
 
60
66
    /* Refresh contents */
61
67
    list_projectgroup_contents(offeringid, groupid, manage_div.id);
62
68
 
63
69
    /* Remove the button element */
64
 
    elem.removeChild(button);
 
70
    button_td.removeChild(button);
65
71
}
66
72
 
67
73
/* Lists the information about a particular project group identified by groupid 
85
91
            var member = groupmembers[i];
86
92
 
87
93
            var li = dom_make_text_elem("li", member.fullname + " (" +
88
 
                                              member.login + ")");
 
94
                                              member.login + ") ");
89
95
            var rmbutton = document.createElement("input");
90
96
            rmbutton.value = "Remove";
91
97
            rmbutton.type = "image";
92
98
            /* XXX: There must be a better way to do this! */
93
 
            rmbutton.src = "/+media/ivle.webapp.groups/cross.png";
 
99
            rmbutton.src = "/+media/ivle.webapp.core/images/interface/delete.png";
94
100
 
95
101
            $(rmbutton).click(function(offeringid, login, groupid, elemnm)
96
102
            {