Rescue attached data objects if list of dimension elements gets sorted

- additionally, do not execute onClick_sortButton further, if dialogDiv
is undefined
Some UI changes to fit the screen better in FF
Remove all event handler from Legend related buttons before add click event

- avoid having double or triple click event handler