Bladeren bron

【修改】上传:预览图片设置为按比例调整;

塔里木分支
dyy 3 maanden geleden
bovenliggende
commit
edc2ef705e
1 gewijzigde bestanden met toevoegingen van 8 en 2 verwijderingen
  1. +8
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js

+ 8
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-layer.js Bestand weergeven

@@ -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;


Laden…
Annuleren
Opslaan