Module-documentation

version 1.0.0
module: panel
maintanance: Marco Asbreuk
home
all modules

Panel with callback

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>
API Docs