diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js index 8cc37b7cd..ca76d7bcb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js @@ -70,7 +70,7 @@ dfop.width = dfop.width > $(window).width() ? $(window).width() - 10 : dfop.width; dfop.height = dfop.height > $(window).height() ? $(window).height() - 10 : dfop.height; var r = 0; - r=top.layer.open({ + r = top.layer.open({ id: dfop.id, maxmin: dfop.maxmin, type: 2, //0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) @@ -80,6 +80,12 @@ content: op.url, skin: dfop.btn == null ? 'lr-layer-nobtn' : 'lr-layer', success: function (layero, index) { + if (dfop.id == "PreviewForm") { + if (layero.find("iframe").length > 0 && layero.find("iframe").contents().find("img").length > 0) { + layero.find("iframe").contents().find("img").css({ "max-width": "100%", "max-height": "100%", "width": "auto", "height": "auto" }); + } + } + top['layer_' + dfop.id] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); layero[0].learun_layerid = 'layer_' + dfop.id; //如果底部有按钮添加-确认并关闭窗口勾选按钮 @@ -298,7 +304,7 @@ } }); }, - + // 关闭弹层 layerClose: function (name, index) { var _index;