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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-2 / +5 lines)
Lines 87-95 Link Here
87
                var obj = $( "#findborrower" ).autocomplete({
87
                var obj = $( "#findborrower" ).autocomplete({
88
                    source: "/cgi-bin/koha/circ/ysearch.pl",
88
                    source: "/cgi-bin/koha/circ/ysearch.pl",
89
                    minLength: 3,
89
                    minLength: 3,
90
                    select: function( event, ui ) {
91
                        window.location.href = ui.item.link;
92
                    }
90
                }).data( "ui-autocomplete" );
93
                }).data( "ui-autocomplete" );
91
                if( obj ) {
94
                if( obj ) {
92
                    obj._renderItem = function( ul, item ) {
95
                    obj._renderItem = function( ul, item ) {
96
                        item.link = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber;
93
                        var cardnumber = "";
97
                        var cardnumber = "";
94
                        if( item.cardnumber != "" ){
98
                        if( item.cardnumber != "" ){
95
                            // Display card number in parentheses if it exists
99
                            // Display card number in parentheses if it exists
Lines 97-103 Link Here
97
                        }
101
                        }
98
                        return $( "<li></li>" )
102
                        return $( "<li></li>" )
99
                        .data( "ui-autocomplete-item", item )
103
                        .data( "ui-autocomplete-item", item )
100
                        .append( "<a href=\"/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
104
                        .append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
101
                        .appendTo( ul );
105
                        .appendTo( ul );
102
                    };
106
                    };
103
                }
107
                }
104
- 

Return to bug 23518