Added close trigger

Added closeTrigger option to specify an handler to use for closing the panel.