This example show how you can setup a callback to inspect what button was pressed to close the panel. When a button is pressed, the buttonText will be shown on the screen.
Code-example:
<script src="itsabuild-min.js"></script>
<script>
var cb;
cb = function(buttonNode) {
document.getElement('#cont').setText(buttonNode.getHTML());
};
document.createPanel({
header: 'title',
footer: '<button class="pure-button">Cancel</button><button class="pure-button">Ok</button>',
content: 'Press cancel, ok or the closebutton',
visible: true,
onTopWhenShowed: true,
headerCloseBtn: true,
callback: cb
});
</script>