FSN#38746 resize modals gepatched

svn path=/Website/trunk/; revision=31995
This commit is contained in:
2016-12-16 12:06:56 +00:00
parent a3f1db5de3
commit 2c03e29e37

View File

@@ -641,6 +641,7 @@ var FcltMgr =
}
// Hoeveel extra moeten we rekenen voor jQuery dialog
var dialogborderHeight = $(frm).closest(".ui-dialog").outerHeight() - $(frm).height();
var scrollBarBeforeResize = $(frm).width() < $(frmcontent).width();
// var dialogborderWidth = $(frm).closest(".ui-dialog").outerWidth() - $(frm).closest(".ui-dialog").width();
$(frm).height('10px'); // Voor verkleinde/ kleine frames. Anders default minimaal 150px
var newHeight = Math.min(frmcontent.outerHeight(), $(window).height()-100);
@@ -648,11 +649,15 @@ var FcltMgr =
// FcltMgr.alert("N:" + newHeight);
// Omdat onze <iframe> de dialog *is* hoeven we die schijnbaar niet afzonderlijk te zetten?
// $(frm).height(newHeight + 200);
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'height', newHeight + dialogborderHeight + 20);
var setHeight = newHeight + dialogborderHeight + 20;
FcltMgr.alert("N: " + newHeight + "\nD: " + dialogborderHeight + "\nS: " + setHeight);
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'height', setHeight);
var newHeight2 = Math.min(frmcontent.outerHeight(), $(window).height()-100);
if (newHeight2 > newHeight) // Gebeurde in FireFox wel eens
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'height', newHeight2 + dialogborderHeight + 20);
{
setHeight = newHeight2 + dialogborderHeight + 20;
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'height', setHeight);
}
var extraWidth = 0;
if (newHeight < frmcontent.height())
extraWidth = 24; // scrollbar
@@ -660,6 +665,9 @@ var FcltMgr =
var newWidth = Math.min(frmcontent.outerWidth()+extraWidth , $(window).width()-10);
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'width', newWidth);
// Ook al is onze <iframe> de dialog moeten we deze wel afzonderlijk te zetten?
if (scrollBarBeforeResize && $('iframe#fcltmodal'+FcltMgr._modalCount).has(".mod_resupdateroom")) // TODO: verbeteren, netjes maken
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'height', setHeight + 20);
$(frm).width(newWidth);
if (FcltMgr.isTouchscreen())