Skip to content
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

why is the data-remote inserted in .modal-body #5161

Closed
webpatser opened this issue Sep 16, 2012 · 20 comments
Closed

why is the data-remote inserted in .modal-body #5161

webpatser opened this issue Sep 16, 2012 · 20 comments
Labels

Comments

@webpatser
Copy link

I want to reuse the modal for different URL's. Now I cannot set the Header/Footer + a bigger modal gets double scrollbars now :-(

Is there a way to replace the modal completely so I can remote load the modal-header/body and footer?

@webpatser
Copy link
Author

I fixed it by changing line 93 in the bootstrap:

this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
to
this.options.remote && this.$element.find('.modal-body').parent().load(this.options.remote)

maybe write an option for it?

@jschr
Copy link

jschr commented Sep 17, 2012

Should be able to just do

this.$element.load(this.options.remote)

@andrewdeandrade
Copy link

Hey @webpatser,

Thanks for opening this issue! Unfortunately, it looks like it fails to pass the criteria neccessary for submitting to bootstrap. The following things are currently failing:

  • should include a jsfiddle/jsbin illustrating the problem if tagged with js but not a feature

For a full list of issue filing guidelines, please refer to the bootstrap issue filing guidelines.

thanks!

@kikito
Copy link

kikito commented Oct 11, 2012

Hello @malandrew & @webpatser,

I created a jsfiddle illustrating the problem:

http://jsfiddle.net/LEjAq/4/

Let me know if you need something else.

@jschr
Copy link

jschr commented Oct 11, 2012

Bootstrap's default modals fell a bit short for my purposes as well so I extended the class to add some more functionality, including handling AJAX a little smoother. See here for a demo: http://jschr.github.com/bootstrap-modal/

Maybe that will help you in the meantime until hopefully some of these issues get addressed.

@victorbstan
Copy link

Is this the same problem that I'm seeing, where I want to have a modal template used for a gallery of thumbnails, each thumbnail click pops up a modal, the modal loads the image data from date-remote url provided. However, I was expecting that different images be loaded when providing different data url through the definition of each thumbnail, instead, I find the first image loads, but subsequent clicks on different thumbnails simply show the modal with the first image that has loaded. I was expecting the proper data-remote url to be loaded.

@indrekj
Copy link

indrekj commented Dec 17, 2012

+1

@Kordonme
Copy link

Kordonme commented Jan 2, 2013

+1

Feels wrong to only update the body of a modal.

@swiharta
Copy link

swiharta commented Jan 6, 2013

+1

@fat
Copy link
Member

fat commented Feb 8, 2013

if you want more advanced templating i recommend just building the modal out in your templates… we're not going to be extending this further

@fat fat closed this as completed Feb 8, 2013
@kikito
Copy link

kikito commented Feb 10, 2013

Hello @fat ,

Thank you for taking the time to answer this, but I think you might have misread what the issue was about. It was not about "more advanced templating".No extension on the "templating" is needed.

The change needed is moving from this:

this.options.remote && this.$element.find('.modal-body').load(this.options.remote)

To this:

this.options.remote && this.$element.load(this.options.remote)

Maybe you have mistaken this issue with another one?

@steventen
Copy link

+1 for this simple change, instead of inject remote url into the .modal-body, inject it to the parent of the body

make modal more flexible

@swiharta
Copy link

swiharta commented Mar 1, 2013

Right, the present behavior is a head scratcher. Why include the feature at all if it's limited to updating modal-body? Seems like wasted effort. And what are the odds that you want to only update the modal-body and nothing else? I'd guess well less than half the time. Probably more like 5% or so of use cases are completely satisfied by the current behavior.

@kikito
Copy link

kikito commented Mar 1, 2013

I honestly think this is just a misunderstanding. @fat-kun's closing message doesn't really seem related with the rest of the issue. He must have closed this issue by mistake.

I don't know what's the standard procedure in this case though. Open another issue?

@cvrebert
Copy link
Collaborator

cvrebert commented Mar 2, 2013

Yeah, opening another issue, generally.

@alexhayes
Copy link

+1 - with a slight change the current behaviour could be much more flexible!

alexhayes pushed a commit to alexhayes/bootstrap that referenced this issue Mar 22, 2013
…remote content that contains model header, body and footer.

Refs twbs#7149: Maintains backwards compatibility while allowing for remote content that contains model header, body and footer.
@marcghorayeb
Copy link

+1

2 similar comments
@ptah23
Copy link

ptah23 commented Jun 21, 2013

+1

@anark
Copy link

anark commented Jul 9, 2013

+1

alexhayes pushed a commit to alexhayes/bootstrap that referenced this issue Jul 17, 2013
…mote should be placed in the body or not. Set data-remoteinbody="false" to control via markup.
@MattHoneycutt
Copy link

For Bootstap 2.3.2, I wrote a simple 'remote-modal' handler. Here's a crude fiddle demonstrating it: http://jsfiddle.net/cvqyv/1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests