Created
October 28, 2013 18:32
-
-
Save rickard2/7202098 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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