Skip to content

Instantly share code, notes, and snippets.

@rickard2
Created October 28, 2013 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickard2/7202098 to your computer and use it in GitHub Desktop.
Save rickard2/7202098 to your computer and use it in GitHub Desktop.
<script type="text/x-handlebars" data-template-name="index">
{{bs-alert message="A warning alert with simple message." type="warning"}}
{{#bs-modal name="testing1" title="Testing"}}
Hello World
{{/bs-modal}}
<button class="btn btn-default" {{action openModal "testing1"}}>Open Modal</button>
{{#bs-modal name="testing2" title="Testing buttons" footerButtons=footerButtons}}
Hello World with buttons
{{/bs-modal}}
<button class="btn btn-default" {{action openModal "testing2"}}>Open Modal w/ buttons</button>
</script>
<script type="text/javascript">
App.IndexController = Ember.Controller.extend({
footerButtons: [
{title: 'Submit', clicked: "submit"},
{title: 'Cancel', clicked: "cancel", dismiss: 'modal'}
],
actions: {
openModal: function (name) {
Bootstrap.ModalManager.show(name);
}
}
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment