-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't set templateName of custom bodyViewClass of ModalPane #79
Comments
This is actually an issue with the removal of the default container in Ember-Core. Sadly the error coming up is a bit obtuse. Explanation is here https://gist.github.com/stefanpenner/5627411. There are a couple of ways of fixing it, you can pass the default container into the popup function if you have access to it from where you are calling popup. I personally have overriden the Bootstrap.ModalPane.reopenClass({
popup: function(options) {
var modalPane, rootElement;
if (!options) options = {};
modalPane = this.create(options);
if (!modalPane.container && modalPane.get("controller")) {
modalPane.container = modalPane.get("controller").container;
}
rootElement = get(this, 'rootElement');
modalPane.appendTo(rootElement);
return modalPane;
}
}); This is definitely something that should be fixed in |
Ah, interesting issue. It would have taken a while for me to figure that out on my own, thanks for the help! |
Note: To use the fix you posted the ModalPane has to be passed a controller somehow. I ended up passing it in hash I gave to the |
Any movement on this? Is ember-bootstrap going to incorporate a fix? |
We should indeed. |
I'm trying to create a custom bodyViewClass to replace the default modal body class which is too simple for my needs. Whenever I try to set a templateName, however, I get the following error:
I can use the same templateName elsewhere in the app and it displays just fine. This only comes up in the ModalPane instance. Below is the code for the ModalPane:
The text was updated successfully, but these errors were encountered: