timheckel / meteor-bootboxjs Goto Github PK
View Code? Open in Web Editor NEWA meteor smart package for the bootstrap bootboxjs plugin
A meteor smart package for the bootstrap bootboxjs plugin
useful for using
backdrop: true;
to close dialog with click on backdrop.
Out of the box custom dialogs don't work. Lib should probably be upgraded to 4.0.0 as this fixed my issues.
$ meteor remove bootboxjs
removed bootboxjs from project
Removed top-level dependency on bootboxjs.
$ sudo meteor add bootboxjs
added bootboxjs at version 0.0.0bootboxjs: Programmatic dialog boxes using Twitter's bootstrap modals
$ meteor
[[[[[ ~ ]]]]]=> Started proxy.
=> Started MongoDB.
Could not write versions file for bootboxjs
I20140828-20:09:40.873(-4)? Meteor.startup - server server/startup.js
=> Started your app.
I'd like the dialog to be a reactive template. I looked at this SO:
http://stackoverflow.com/questions/22418592/bootboxjs-how-to-render-a-meteor-template-as-dialog-body
But that does not appear to work anymore. I played with Blaze.render but could not figure out the proper parent. I also tried Blaze.toHTML which worked great but was not reactive. What's the proper way, if any, to do this? Or is there a better practice for creating modals with templates?
Thanks in advance!
The bootboxjs library uses jQuery for manipulating the DOM:
https://github.com/TimHeckel/meteor-bootboxjs/blob/v4.3.0/lib/bootbox.js#L700
But shouldn't meteor users avoid manipulating the DOM by jQuery directly and rather use Blaze methods & templates?
That's why packages like peppelg:bootstrap-3-modal
were created:
https://atmospherejs.com/peppelg/bootstrap-3-modal
Notice how peppelg:bootstrap-3-modal
uses Blaze methods:
https://github.com/PeppeL-G/bootstrap-3-modal/blob/master/main.js
IMO, a bootboxjs wrapper for meteor should follow a similar approach...
When using the bootbox.confirm method, we sometimes experience a scenario in which confirming the modal re-displays it. Confirming it again then carries on as normal. This is primarily used in delete operations, and we use collection helpers, if that's of any use.
Installed the package and nothing shows up.
The README.md
says to install Meteorite, so I assume that this is pretty out of date thats why it doesn't work. This is the most popular package for Modals on Atmospherejs so it would be great if we could fix it.
I would like to use form popup in form popup (2 level).
I work fine, but when i close the second form, the first form can not scroll.
problem when twbs:bootstrap upgraded from 3.3.2 to 3.3.4 ?
I've documented this problem on Stack Overflow:
Pl example for me (how to use?).
I've documented this issue on Stack Overflow:
http://stackoverflow.com/questions/22418592/bootboxjs-how-render-a-meteor-template-as-dialog-body
If you have both packages (bootstrap-3 and bootboxjs), when you try to use for example a modal dialog, it closes itself because of some script/css duplication
I'm scratching my head on how to pass a variable (this._id) into the callback function of bootbox.confirm?
Weird, out of nowhere, I'm unable to click on the backdrop to dismiss the modal. I'm still using the 4.4.0 package. Nothing in my code with regards to bootbox has changed. Any ideas?
It would be great to have reactive buttons for custom dialogs, example:
bootbox.dialog({
title: 'Share your thoughts...',
message: '<div id="createSessionDialogWrapper"></div>',
buttons: {
success: {
label: Session.get('someKey'),
className: "btn-success",
callback: function () { }
},
main: {
label: "Close",
className: "btn-default",
callback: function () {});
}
}
},
});
It's common to have dialogs that interacts somehow with the user and I prefer my UI buttons to explicit say what they do. For example, I hate the "accept" and "cancel" buttons. I prefer the button saying what it's doing like "save" (although you know you are on a saving instance, the user shouldn't know about it), or buttons like "Discard changes" instead of "cancel".
I wonder if this package won't break by adding this feature, hoping it won't depend on the label value for doing some actions.
the latest is 3.2.2 (Aug 19, 2013) so editing smart.json
is always necessary to pull the bootstrap-3 compatible version
It would be really useful if this could be merged with https://github.com/sacketty/meteor-bootboxjs so that it has the latest version.
be great to see the bootboxjs examples implemented for meteor... consider it a feature request...
Here's how I'm getting around it for now without me having to deal with giving you a pull request with a complete fix: https://gist.github.com/1ba557e380008a0050f1
I don't know the proper solution, but the problem is that some people don't use the bootstrap-3
dependency but the bootstrap3-less
, and we wouldn't want to include them both. And obviously bootbox
would work with the latter as well.
What I would like to propose is to remove the bootstrap-3
dependency - as we don't have a mechanism to check if either one is already included and include it based on that information.
Any opinions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.