Skip to content

Instantly share code, notes, and snippets.

@devfoo-one
Created April 21, 2015 20:11
Show Gist options
  • Save devfoo-one/ab20d478df9608242a89 to your computer and use it in GitHub Desktop.
Save devfoo-one/ab20d478df9608242a89 to your computer and use it in GitHub Desktop.
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<div class="container">
<button id="btn-AddNewProject" title="Create a new project" class="btn btn-success navbar-btn navbar-right">Add new project</button>
</div>
</nav>
'click #btn-AddNewProject': function(e) {
// render "addNewProjectModal" into the lastNode of current "dashboard"-template instance
var modal = Blaze.render(Template.addNewProjectModal, Template.instance().lastNode);
// destroy rendered template when modal is hiding
$('#addNewProjectModal').on('hide.bs.modal', function (e) {
Blaze.remove(modal);
});
// show modal
$("#addNewProjectModal").modal('show');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment