Delegate the close button click events via $dialog