Adding sorting of index names in the index selector

My JavaScript skills are pretty weak, but this works. It's really useful to have sorted index names when you have lots of indices.