backbone-bootstrap-modals
The goal of backbone-bootstrap-modals is to produce a set of core Backbone Views when working with Bootstrap modal dialogs.
Advantages
- Simple integration with Bootstrap and Backbone
- Easily extensible with sane defaults
- All boilerplate taken care of for you
- Compatible with Marionette Views
Installing with NPM
npm install backbone-bootstrap-modals
Download Links
backbone-bootstrap-modals.min.js
Documentation
The source code is well annotated and run through Docco:
Please click the following links to see the library in action:
(See /examples)
Component Documentation
Quick Examples
// Extending BaseModalvar ExtendedModal = BackboneBootstrapModalsBaseModal;var modal = ;modal;
// Using ConfirmationModal directly (It could also be extended as above.)var modal = label: 'Confirm Action' text: 'Are you sure you want to do that?' { console; } { console; };modal;
// Using WizardModal directly (It could also be extended as above.)var modal = stepGraph: label: 'Wizard: Step One' view: BackboneBootstrapModalsBaseBodyView viewOptions: text: 'This is step one' nextIndex: 1 { console; } label: 'Wizard: Step Two' view: BackboneBootstrapModalsBaseBodyView viewOptions: text: 'This is step two' nextIndex: 2 previousIndex: 0 { console; } label: 'Wizard: Step Three' view: BackboneBootstrapModalsBaseBodyView viewOptions: text: 'This is step three' nextText: 'Finish' previousIndex: 1 { console; } ;modal;
Supported browsers
Should work with all modern browsers, including Internet Exploror 9+
Building
npm install
grunt
Running the tests
cd test
grunt mocha
Contributing
Contributions are welcome! To make the process as seamless as possible, please:
- Fork the project and make your changes. We encourage pull requests to discuss code changes.
- Have test cases for the new code. If you have questions about how to do this, please ask in your pull request.
License
Licensed under the MIT license.
Shout Outs
backbone-bootstrap-modals is a MongoDB Skunkworks Project