|
|
@@ -6551,11 +6551,12 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], f
|
|
|
zIndex: Backend.api.layer.zIndex,
|
|
|
skin: 'layui-layer-noborder',
|
|
|
success: function (layero, index) {
|
|
|
+ var that = this;
|
|
|
//$(layero).removeClass("layui-layer-border");
|
|
|
Backend.api.layer.setTop(layero);
|
|
|
var frame = Backend.api.layer.getChildFrame('html', index);
|
|
|
var layerfooter = frame.find(".layer-footer");
|
|
|
- Backend.api.layerfooter(layero, index);
|
|
|
+ Backend.api.layerfooter(layero, index, that);
|
|
|
|
|
|
//绑定事件
|
|
|
if (layerfooter.size() > 0) {
|
|
|
@@ -6566,7 +6567,7 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], f
|
|
|
var target = layerfooter[0];
|
|
|
// 创建观察者对象
|
|
|
var observer = new MutationObserver(function (mutations) {
|
|
|
- Backend.api.layerfooter(layero, index);
|
|
|
+ Backend.api.layerfooter(layero, index, that);
|
|
|
mutations.forEach(function (mutation) {
|
|
|
});
|
|
|
});
|
|
|
@@ -6581,7 +6582,7 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], f
|
|
|
}, options ? options : {}));
|
|
|
return false;
|
|
|
},
|
|
|
- layerfooter: function (layero, index) {
|
|
|
+ layerfooter: function (layero, index, that) {
|
|
|
var frame = Backend.api.layer.getChildFrame('html', index);
|
|
|
var layerfooter = frame.find(".layer-footer");
|
|
|
if (layerfooter.size() > 0) {
|
|
|
@@ -6599,11 +6600,11 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], f
|
|
|
|
|
|
var oldheg = heg + titHeight + btnHeight;
|
|
|
var maxheg = 600;
|
|
|
- if (frame.outerWidth() < 768) {
|
|
|
- maxheg = $(window).height() - 28;
|
|
|
+ if (frame.outerWidth() < 768 || that.area[0].indexOf("%") > -1) {
|
|
|
+ maxheg = $(window).height();
|
|
|
}
|
|
|
// 如果有.layer-footer或窗口小于600则重新排
|
|
|
- if (layerfooter.size() > 0 || oldheg < maxheg) {
|
|
|
+ if (layerfooter.size() > 0 || oldheg < maxheg || that.area[0].indexOf("%") > -1) {
|
|
|
var footerHeight = layero.find('.layui-layer-footer').outerHeight() || 0;
|
|
|
footerHeight = 0;
|
|
|
if (oldheg >= maxheg) {
|
|
|
@@ -6785,6 +6786,10 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], f
|
|
|
Toastr.error(__('Operation failed'));
|
|
|
}
|
|
|
});
|
|
|
+ //修复含有fixed-footer类的body边距
|
|
|
+ if ($(".fixed-footer").size() > 0) {
|
|
|
+ $(document.body).css("padding-bottom", $(".fixed-footer").height());
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
//将Layer暴露到全局中去
|
|
|
@@ -8544,7 +8549,7 @@ define('upload',['jquery', 'bootstrap', 'backend', 'plupload', 'dragsort', 'temp
|
|
|
UploadProgress: function (up, file) {
|
|
|
//这里可以改成其它的表现形式
|
|
|
//document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
|
|
|
- $(that).prop("disabled", true).html("<i class='fa fa-upload'></i> 上传" + file.percent + "%");
|
|
|
+ $(that).prop("disabled", true).html("<i class='fa fa-upload'></i> " + __('Upload') + file.percent + "%");
|
|
|
},
|
|
|
FileUploaded: function (up, file, info) {
|
|
|
var options = this.getOption();
|