View | Details | Raw Unified | Return to bug 11636
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt (-2 / +8 lines)
Lines 27-36 $(document).ready(function() { Link Here
27
        .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
27
        .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
28
        .appendTo( ul );
28
        .appendTo( ul );
29
    };
29
    };
30
31
    $("body").on("click",".removePatron",function(e){
32
        e.preventDefault();
33
        var divid = $(this).parent().attr("id");
34
        var cardnumber = divid.replace("borrower_","");
35
        RemovePatron(cardnumber);
36
    });
30
});
37
});
31
38
32
function AddPatron( name, cardnumber ) {
39
function AddPatron( name, cardnumber ) {
33
    div = "<div id='borrower_" + cardnumber + "'>" + name + " ( <a href='javascript:void()' onclick='RemovePatron(" + cardnumber + ");'> Remove </a> ) <input type='hidden' name='patrons_to_add' value='" + cardnumber + "' /></div>";
40
    div = "<div id='borrower_" + cardnumber + "'>" + name + " ( <a href='#' class='removePatron'> " + _("Remove") + " </a> ) <input type='hidden' name='patrons_to_add' value='" + cardnumber + "' /></div>";
34
    $('#patrons_to_add').append( div );
41
    $('#patrons_to_add').append( div );
35
42
36
    $('#find_patron').val('').focus();
43
    $('#find_patron').val('').focus();
37
- 

Return to bug 11636