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

Fit, flow & reposition #87

Closed
wants to merge 12 commits into from
Closed

Fit, flow & reposition #87

wants to merge 12 commits into from

Conversation

jojosati
Copy link

@jojosati jojosati commented Mar 7, 2013

I've just add the "Fit, Flow & Reposition" demo using my wip branch at last section of page.
http://jojosati.github.com/bootstrap-modal/demo.html

height and  maxHeight option can pass a callback function or string
'auto',
for recalculating height/maxHeight of modal-body  everytime window's
size changed.
Modal with  '.modal-reposition' class will listen to any input 'change'
event to check modal-size changed and fire 'resize.modal'.
The "change" event may be triggered by input, select and textarea
element within modal.
Otherwise required writing a custom script to trigger when ajax loading
complete or trigger every specific interval .
@@ -104,6 +104,11 @@
var prop = this.options.height ? 'height' : 'max-height',
value = this.options.height || this.options.maxHeight;

if (!value && this.$element.hasClass('modal-fit')){
value = function(){return $(window).height() - 165}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the value 165 shouldn't be hardcoded if we're going to include the "contrain modal to window size" example from the docs. This wouldn't work quite right for all cases (i.e no header or footer, any font/padding style changes etc..)

Would be nice if we could compute the actual value. Something like windowHeight - headerHeight - footerHeight - marginBetweenModalAndWindow.

@jschr
Copy link
Owner

jschr commented Mar 8, 2013

For some reason I can't auto merge this PR but can #72 be closed? Seems like it contains both functionalities.

@jojosati
Copy link
Author

jojosati commented Mar 8, 2013

#88

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

Successfully merging this pull request may close these issues.

2 participants