~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: 2009-12-08 03:50:24 UTC
  • mfrom: (1294.2.143 ui-the-third)
  • Revision ID: grantw@unimelb.edu.au-20091208035024-wjx8zp54gth15ph8
Merge ui-the-third. This is another UI revamp.

The header is now thin! Thin! The yellow bar is gone. The tabs are gone.
Breadcrumbs are here. Routes is replaced (with an object publishing
mechanism). Views are less repetitive. etc.

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