js: sort tag listing and remove duplicated code
js: sort tag listing and remove duplicated code

Change-Id: I7cfd9fa532d04f24beb658cd658d813ae478bcc9

morucci/repoxplorer,morucci/repoxplorer,morucci/repoxplorer,morucci/repoxplorer