~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-27 12:09:13 UTC
  • mto: This revision was merged to the branch mainline in revision 1826.
  • Revision ID: grantw@unimelb.edu.au-20100727120913-v0kfnwxzbiwrjnue
(simple)json always returns a unicode when decoding, while cjson returned a str where possible. This makes cPickle unhappy, so convert back to a str.

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