~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-05-13 03:15:26 UTC
  • mto: This revision was merged to the branch mainline in revision 1247.
  • Revision ID: grantw@unimelb.edu.au-20090513031526-l3knlkpgnldp6dgj
Attempting to view an SVN log when the repo is empty will not crash now.

svnlogservice now returns a 404 if the revision isn't found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
function add_project(){
20
20
 
21
 
    $(this).slideToggle('fast');
 
21
    $(this.parentNode).slideToggle();
22
22
    
23
23
    function callback(xhr) {
24
24
        var response = JSON.parse(xhr.responseText);
25
25
        var projectlist = $('#projectslist_' + response.projectset_id);
26
26
        var new_element = response.html.split('\n').slice(1).join('\n');
27
27
        projectlist.children(".list_empty_indicator").remove()
28
 
        add_section = projectlist.children(".add-project");
29
 
        $(add_section).before(new_element).hide().slideDown();
 
28
        $(new_element).appendTo(projectlist).hide().slideDown();
30
29
    };
31
30
 
32
31
    var data = serializeForm($(this));