X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Ftemplates%2Fregistration_view.html;h=654f79d66b27ddd4d4f3b0c60c31c11bd6f2bfee;hb=c0c06b984d835acb246381631c8a2227772a67e7;hp=3cdbecf3148dca2d2999cc2e958e20890ce0b610;hpb=c92bdf384d06da6780b776652e94ce5afed75127;p=unfold.git diff --git a/portal/templates/registration_view.html b/portal/templates/registration_view.html index 3cdbecf3..654f79d6 100644 --- a/portal/templates/registration_view.html +++ b/portal/templates/registration_view.html @@ -487,6 +487,18 @@ jQuery(document).ready(function(){ {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,