Fixed some javascript calls and dialogs

Fixed links for some bridge ajax calls
put custom event triggers directly after binding the events