|
|
@ -154,6 +154,8 @@
|
|
|
|
$.btTable.on('click', '.img-circle', function() {
|
|
|
|
$.btTable.on('click', '.img-circle', function() {
|
|
|
|
var src = $(this).attr('src');
|
|
|
|
var src = $(this).attr('src');
|
|
|
|
var target = $(this).data('target');
|
|
|
|
var target = $(this).data('target');
|
|
|
|
|
|
|
|
var height = $(this).data('height');
|
|
|
|
|
|
|
|
var width = $(this).data('width');
|
|
|
|
if($.common.equals("self", target)) {
|
|
|
|
if($.common.equals("self", target)) {
|
|
|
|
layer.open({
|
|
|
|
layer.open({
|
|
|
|
title: false,
|
|
|
|
title: false,
|
|
|
@ -161,7 +163,7 @@
|
|
|
|
closeBtn: true,
|
|
|
|
closeBtn: true,
|
|
|
|
shadeClose: true,
|
|
|
|
shadeClose: true,
|
|
|
|
area: ['auto', 'auto'],
|
|
|
|
area: ['auto', 'auto'],
|
|
|
|
content: "<img src='" + src + "' />"
|
|
|
|
content: "<img src='" + src + "' height='" + height + "' width='" + width + "'/>"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else if ($.common.equals("blank", target)) {
|
|
|
|
} else if ($.common.equals("blank", target)) {
|
|
|
|
window.open(src);
|
|
|
|
window.open(src);
|
|
|
@ -214,12 +216,17 @@
|
|
|
|
return actions.join('');
|
|
|
|
return actions.join('');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 图片预览
|
|
|
|
// 图片预览
|
|
|
|
imageView: function (value, path, target) {
|
|
|
|
imageView: function (value, height, width, target) {
|
|
|
|
var _path = $.common.isEmpty(path) ? '/profile/upload' : path;
|
|
|
|
if ($.common.isEmpty(width)) {
|
|
|
|
|
|
|
|
width = 'auto';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($.common.isEmpty(height)) {
|
|
|
|
|
|
|
|
height = 'auto';
|
|
|
|
|
|
|
|
}
|
|
|
|
// blank or self
|
|
|
|
// blank or self
|
|
|
|
var _target = $.common.isEmpty(target) ? 'self' : target;
|
|
|
|
var _target = $.common.isEmpty(target) ? 'self' : target;
|
|
|
|
if ($.common.isNotEmpty(value)) {
|
|
|
|
if ($.common.isNotEmpty(value)) {
|
|
|
|
return $.common.sprintf("<img class='img-circle img-xs' data-target='%s' src='%s/%s'/>", _target, _path, value);
|
|
|
|
return $.common.sprintf("<img class='img-circle img-xs' data-height='%s' data-width='%s' data-target='%s' src='%s'/>", width, height, _target, value);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return $.common.nullToStr(value);
|
|
|
|
return $.common.nullToStr(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -574,16 +581,16 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(title)) {
|
|
|
|
if ($.common.isEmpty(title)) {
|
|
|
|
title = false;
|
|
|
|
title = false;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(url)) {
|
|
|
|
if ($.common.isEmpty(url)) {
|
|
|
|
url = "/404.html";
|
|
|
|
url = "/404.html";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(width)) {
|
|
|
|
if ($.common.isEmpty(width)) {
|
|
|
|
width = 800;
|
|
|
|
width = 800;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(height)) {
|
|
|
|
if ($.common.isEmpty(height)) {
|
|
|
|
height = ($(window).height() - 50);
|
|
|
|
height = ($(window).height() - 50);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(callback)) {
|
|
|
|
if ($.common.isEmpty(callback)) {
|
|
|
|
callback = function(index, layero) {
|
|
|
|
callback = function(index, layero) {
|
|
|
|
var iframeWin = layero.find('iframe')[0];
|
|
|
|
var iframeWin = layero.find('iframe')[0];
|
|
|
@ -646,16 +653,16 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(title)) {
|
|
|
|
if ($.common.isEmpty(title)) {
|
|
|
|
title = false;
|
|
|
|
title = false;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(url)) {
|
|
|
|
if ($.common.isEmpty(url)) {
|
|
|
|
url = "/404.html";
|
|
|
|
url = "/404.html";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(width)) {
|
|
|
|
if ($.common.isEmpty(width)) {
|
|
|
|
width = 800;
|
|
|
|
width = 800;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if ($.common.isEmpty(height)) {
|
|
|
|
if ($.common.isEmpty(height)) {
|
|
|
|
height = ($(window).height() - 50);
|
|
|
|
height = ($(window).height() - 50);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
var index = layer.open({
|
|
|
|
var index = layer.open({
|
|
|
|
type: 2,
|
|
|
|
type: 2,
|
|
|
|
area: [width + 'px', height + 'px'],
|
|
|
|
area: [width + 'px', height + 'px'],
|
|
|
|