Lines 169-175
Link Here
|
169 |
.data( "ui-autocomplete" )._renderItem = function( ul, item ) { |
169 |
.data( "ui-autocomplete" )._renderItem = function( ul, item ) { |
170 |
return $( "<li></li>" ) |
170 |
return $( "<li></li>" ) |
171 |
.data( "ui-autocomplete-item", item ) |
171 |
.data( "ui-autocomplete-item", item ) |
172 |
.append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) |
172 |
.append( |
|
|
173 |
"<a>" |
174 |
+ ( item.surname ? item.surname.escapeHtml() : "" ) |
175 |
+ ", " |
176 |
+ ( item.firstname ? item.firstname.escapeHtml() : "" ) |
177 |
+ " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")" |
178 |
+ " " |
179 |
+ "<small>" |
180 |
+ ( item.address ? item.address.escapeHtml() : "" ) |
181 |
+ " " |
182 |
+ ( item.city ? item.city.escapeHtml() : "" ) |
183 |
+ " " |
184 |
+ ( item.zipcode ? item.zipcode.escapeHtml() : "" ) |
185 |
+ " " |
186 |
+ ( item.country ? item.country.escapeHtml() : "" ) |
187 |
+ "</small>" |
188 |
+ "</a>" ) |
173 |
.appendTo( ul ); |
189 |
.appendTo( ul ); |
174 |
}; |
190 |
}; |
175 |
|
191 |
|
Lines 186-192
Link Here
|
186 |
}); |
202 |
}); |
187 |
|
203 |
|
188 |
function AddInstructor( name, borrowernumber ) { |
204 |
function AddInstructor( name, borrowernumber ) { |
189 |
div = "<div class='instructor_line' id='borrower_" + borrowernumber + "'>" + name + " ( <a href='#' class='removeInstructor'><i class='fa fa-trash'></i> " + _("Remove")+ " </a> ) <input type='hidden' name='instructors' value='" + borrowernumber + "' /></div>"; |
205 |
div = "<div class='instructor_line' id='borrower_" + borrowernumber + "'>" + ( name ? name.escapeHtml() : "" ) + " ( <a href='#' class='removeInstructor'><i class='fa fa-trash'></i> " + _("Remove")+ " </a> ) <input type='hidden' name='instructors' value='" + borrowernumber + "' /></div>"; |
190 |
$('#instructors').append( div ); |
206 |
$('#instructors').append( div ); |
191 |
|
207 |
|
192 |
$('#find_instructor').val('').focus(); |
208 |
$('#find_instructor').val('').focus(); |