/Marionette.Modal

Dialog library based on Marionette framework

Primary LanguageJavaScriptMIT LicenseMIT

Marionette.Modal Build Status

Supported browsers

Example

Minimal required markup

<div id="mn-modal" class="mn-modal"></div>

Code sample

define(['backbone.marionette', 'marionette.modal'], function (Marionette, Modal) {
    // this is view will rendered inside modal dialog
    var ChildView = Marionette.ItemView.extend({
        template: '#awsum-template',

        onSubmit: function () {
            // do submit stuff ...
        },

        onReject: function () {
            // do reject stuff ...
        }
    });

    // Wow, modal!
    Modal.add({ View: ChildView });
});