Customize event on Reply all button in sugar8

I am customizing event on reply all button. I need to check if case supanel has data, then reply all will do normal operation and if not it will show alert.

But i am checking the event is written in sidecar.js for that button. any idea how to do this?