https://github.com/gadicc/meteor-modal-bs3ui
bootstrap 3 modals, the Meteor way (for Meteor UI)
https://github.com/gadicc/meteor-modal-bs3ui
Last synced: about 1 year ago
JSON representation
bootstrap 3 modals, the Meteor way (for Meteor UI)
- Host: GitHub
- URL: https://github.com/gadicc/meteor-modal-bs3ui
- Owner: gadicc
- Created: 2014-01-23T09:51:10.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-16T09:48:07.000Z (almost 12 years ago)
- Last Synced: 2025-02-17T21:19:04.708Z (over 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# modal-bs3ui
Modals using Bootstrap 3 with Meteor UI (spacebars)
Design goals:
* Reactive everywhere. Pass text or TEMPLATES
* Open/close state stored in Sessions
```js
Template.profile.events({
'click .user': function(event, tpl) {
modal({
context: this,
title: this.fullname,
body: "userBadgeBody"
});
}
});
```
body
*Name* of Template to be used as the Modal body
context
Context to load dialog template with (relevant for body template too).
Usually `this` (from Template event). Avoid relying on *functions*,
as they won't be available on code reload.
message
*Text* to be used as the dialog body
## Partially Reactive (and very convenient)
* Fully reactive on initial load, partially reactive after a hot code push
* Note: hot code pushes rely on `eval` to resume callback functions :(
buttons vs context?
## Full reactivity (with a tiny bit more work)
buttons vs context?
in anonymous functions given to modal, don't use external variables, use session variables