{value:"",label:"No authority found !!!"}
{% endif %}
];
+ // sorting the list
+ availableTags.sort(function(a,b){
+ var nameA=a.value.toLowerCase(), nameB=b.value.toLowerCase();
+ if (nameA < nameB) {
+ return -1;
+ }
+ if (nameA > nameB) {
+ return 1;
+ }
+ return 0;
+ });
+ // auto-complete the form
jQuery( "#authority_hrn" ).autocomplete({
source: availableTags,
minLength: 0,