index.html:

<header id="header"></header>
<div role="main" id="mainarea"></div>
<div id="genericModal"></div>

ModalView.js

App.Views.ModalView = Backbone.Marionette.Layout.extend({
    template: '#modalView',
    actionTemplate:_.template('<button class="btn <%= className %>" id="<%=
id %>" onclick="<%= onClick %>"><%= text %></button>'),

    ui: {
        title: '.modal-title',
        footer: '.modal-footer'
    },
    events: {
        'click .close': 'closeModal'
    },
    regions: {
        body: '.modal-body'
    },

    initialize: function(options) {
        this.options = options;
    },

    onRender: function() {
        this.ui.title.html(this.options.title);
        this.body.show(this.options.body);
        this.ui.footer.html(this.generateButtons(this.options.actions,
this.actionTemplate));
    },
...
});


On Mon, Feb 25, 2013 at 3:09 PM, Matheus Costa Vieira <
[email protected]> wrote:

> jsfiddle




Regards,
Guy Korland

-- 
You received this message because you are subscribed to the Google Groups 
"twitter-bootstrap" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to