This content has been marked as final.
Show 1 reply
-
1. Re: maxWidth and maxHight for modalPanel or equivelent
amarkhel Sep 28, 2010 7:19 AM (in response to buffe)There are no ways to do it in 3.3.3. This attribbutes were added to popupPanel only in 4.0 version of richfaces. As workaround you can try next trick:
After open modal panel by onclick="Richfaces.hideModalPanel('myModal'); adjustModalPanel('myModal')" you can call your custom javascript function. For example :
<script>
function adjustModalPanel(id){
var element = //find modal panel content div by given id
var width = element.width// get style of element and calculate width(by prototype or jQuery etc..)
var height = element.height// same as for width
if(width > MAX_WIDTH){
element.setWidth(MAX_WIDTH)// it is not concrete code dependent of your choice
}
..same for height..........
}
</script>