Fixed tabs in ORM many association dialogs

1. Tabs in dialogs didn't work because of a strange click event binding on any "a" element.
2. After submitting a form, dialog was closing automatically, and after opening it again - tab names switched, but the content didn't.