changes hadling popup to using events

Was having issues in the mobile side with ionic and decided to use
events for now. Best solution woulbe an optional onObClick handler using
scapoes but this works for now.