Module-documentation

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

Panel with validation

This example shows how to use validation. Note that the panel only gets closed when pressed on the Ok-button

Code-example:

<script src="itsabuild-min.js"></script>
<script>
    var modelData, validateFn;

    validateFn = function(e) {
        return (e.button.getHTML()==='Ok');
    };

    modelData = {
        header: 'title',
        footer: '<button class="pure-button">Cancel</button><button class="pure-button">Ok</button>',
        content: 'I am a panel',
        visible: true,
        headerCloseBtn: true,
        validate: validateFn
    };

    document.createPanel(modelData);
</script>
API Docs