Minor JS changes for collection editing page (fixes Issues #859, #871)

I messed up something in my git history and grabbed a bunch of previous commits, but there doesn't seem to be a merge conflict, so I think it's fine.