Dialog onClose callback

This fix adds the possibility to call a callback everytime the Dialog widget is closed.
`this.templateCtxt.data` and `this.data` are the same object, maybe we could use the second reference to shorten the code. Actually, I advise to create a local variable.