DJIN#52575 de modalCount wordt intern in FcltMgr bijgehouden, maar ook opgehoogd bij elke nieuwe modal. Bij het openen van meerdere modals wordt de modalCount dus eerder opgehoogd dan dat de _resizeModal() wordt aangeroepen, wanneer het verkeerde dialog dus geresized werd.

svn path=/Website/branches/v2017.3/; revision=37366
This commit is contained in:
2018-03-14 15:19:19 +00:00
parent 0cf7f025ad
commit 28e4452f6d

View File

@@ -655,6 +655,11 @@ var FcltMgr =
// FcltMgr.alert("Bad resizing");
return; // IE9 soms als dialoog net gesloten is
}
var thisModalCount;
if ($(frm).attr("name") && $(frm).attr("name").length > 9)
thisModalCount = $(frm).attr("name").slice(9); // _modalCount op moment van aanmaken, zodat we de juiste modal resizen.
else
thisModalCount = FcltMgr._modalCount; // backup (oude manier, overbodig ?)
// Hoeveel extra moeten we rekenen voor jQuery dialog
var dialogborderHeight = $(frm).closest(".ui-dialog").outerHeight() - $(frm).height();
// 6 pixels extra marge wegens AAVL#38845
@@ -665,10 +670,10 @@ 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);
$('iframe#fcltmodal'+thisModalCount).dialog('option', 'height', newHeight + dialogborderHeight + 20);
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);
$('iframe#fcltmodal'+thisModalCount).dialog('option', 'height', newHeight2 + dialogborderHeight + 20);
var extraWidth = 0;
if (newHeight <= frmcontent.height())
extraWidth = 24; // scrollbar
@@ -676,7 +681,7 @@ var FcltMgr =
var newWidth = Math.min(frmcontent.outerWidth()+extraWidth , $(window).width()-10);
if (dialogborderWidth) // AAVL#38845
newWidth += dialogborderWidth;
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'width', newWidth);
$('iframe#fcltmodal'+thisModalCount).dialog('option', 'width', newWidth);
// Ook al is onze <iframe> de dialog moeten we deze wel afzonderlijk te zetten?
$(frm).width(newWidth);
@@ -684,14 +689,14 @@ var FcltMgr =
var newWidth2 = Math.min(frmcontent.outerWidth()+extraWidth , $(window).width()-10);
if (newWidth2 > newWidth) // FSN#39111
{
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'width', newWidth2);
$('iframe#fcltmodal'+thisModalCount).dialog('option', 'width', newWidth2);
$(frm).width(newWidth2);
}
if (FcltMgr.isTouchscreen())
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'position', { my: "top", at: "top", of: window });
$('iframe#fcltmodal'+thisModalCount).dialog('option', 'position', { my: "top", at: "top", of: window });
else
$('iframe#fcltmodal'+FcltMgr._modalCount).dialog('option', 'position', { my: "center", at: "center", of: window });
$('iframe#fcltmodal'+thisModalCount).dialog('option', 'position', { my: "center", at: "center", of: window });
},
// Opent een modal dialoog in de huidige 'detailManager'