|
Lines 101-111
Link Here
|
| 101 |
// Display card number in parentheses if it exists |
101 |
// Display card number in parentheses if it exists |
| 102 |
cardnumber = " (" + item.cardnumber + ") "; |
102 |
cardnumber = " (" + item.cardnumber + ") "; |
| 103 |
} |
103 |
} |
| 104 |
var itemString = "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>"; |
104 |
var itemString = "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " + ( item.firstname ? item.firstname.escapeHtml() : "" ) + cardnumber.escapeHtml() + " <small>"; |
| 105 |
if( item.dateofbirth ) { |
105 |
if( item.dateofbirth ) { |
| 106 |
itemString += item.dateofbirth + "<span class=\"age_years\"> (" + item.age + " " + _("years") + ")</span>, "; |
106 |
itemString += ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) |
|
|
107 |
+ "<span class=\"age_years\"> (" + ( item.age ? item.age.escapeHtml() : "" ) + " " + _("years") + ")</span>, "; |
| 107 |
} |
108 |
} |
| 108 |
itemString += item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>"; |
109 |
itemString += ( item.address ? item.address.escapeHtml() : "" ) + " " |
|
|
110 |
+ ( item.city ? item.city.escapeHtml() : "" ) + " " |
| 111 |
+ ( item.zipcode ? item.city.escapeHtml() : "" ) + " " |
| 112 |
+ ( item.country ? item.country.escapeHtml() : "" ) |
| 113 |
+ "</small></a>"; |
| 109 |
return $( "<li></li>" ) |
114 |
return $( "<li></li>" ) |
| 110 |
.data( "ui-autocomplete-item", item ) |
115 |
.data( "ui-autocomplete-item", item ) |
| 111 |
.append( itemString ) |
116 |
.append( itemString ) |
|
Lines 137-143
Link Here
|
| 137 |
} |
142 |
} |
| 138 |
return $( "<li></li>" ) |
143 |
return $( "<li></li>" ) |
| 139 |
.data( "ui-autocomplete-item", item ) |
144 |
.data( "ui-autocomplete-item", item ) |
| 140 |
.append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) |
145 |
.append( |
|
|
146 |
"<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " |
| 147 |
+ ( item.firstname ? item.firstname.escapeHtml() : "" ) |
| 148 |
+ cardnumber.escapeHtml() |
| 149 |
+ " <small>" |
| 150 |
+ ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " " |
| 151 |
+ ( item.address ? item.address.escapeHtml() : "" ) + " " |
| 152 |
+ ( item.city ? item.city.escapeHtml() : "" ) + " " |
| 153 |
+ ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " |
| 154 |
+ ( item.country ? item.country.escapeHtml() : "" ) |
| 155 |
+ "</small>" |
| 156 |
+ "</a>" ) |
| 141 |
.appendTo( ul ); |
157 |
.appendTo( ul ); |
| 142 |
}; |
158 |
}; |
| 143 |
} |
159 |
} |