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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/subject-media/project.js

  • Committer: William Grant
  • Date: 2009-12-02 09:16:17 UTC
  • Revision ID: grantw@unimelb.edu.au-20091202091617-bt3b0ta3bl6iom38
Unbreak creation of projects in a newly-created projectset. Correct the subject in the URL (was an id), and hook up JS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    function callback(xhr) {
44
44
        var response = JSON.parse(xhr.responseText);
45
45
        $('#projectset_list').append(response.html);
46
 
        $('#projectset_' + response.projectset_id).hide();
47
 
        $('#projectset_' + response.projectset_id).slideDown();
 
46
        var projectset_div = $('#projectset_' + response.projectset_id);
 
47
        projectset_div.hide();
 
48
        projectset_div.slideDown();
48
49
        $("#add_projectset").removeAttr('disabled');
49
 
        $(".add-project-link").click(show_add);
 
50
        projectset_div.find(".new_project").submit(add_project);
 
51
        projectset_div.find(".add-project-link").click(show_add);
50
52
    };
51
53
 
52
54
    var data = serializeForm($("#new_projectset_form"));