|
|
@ -99,10 +99,10 @@
|
|
|
|
tooltip: function (value, length) {
|
|
|
|
tooltip: function (value, length) {
|
|
|
|
var _length = $.common.isEmpty(length) ? 20 : length;
|
|
|
|
var _length = $.common.isEmpty(length) ? 20 : length;
|
|
|
|
var _text = "";
|
|
|
|
var _text = "";
|
|
|
|
if (value.length > _length) {
|
|
|
|
if ($.common.isNotEmpty(value) && value.length > _length) {
|
|
|
|
_text = value.substr(0, _length) + "...";
|
|
|
|
_text = value.substr(0, _length) + "...";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
_text = value;
|
|
|
|
_text = $.common.nullToStr(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return '<a href="#" class="tooltip-show" data-toggle="tooltip" title="' + value + '">' + _text +'</a>';
|
|
|
|
return '<a href="#" class="tooltip-show" data-toggle="tooltip" title="' + value + '">' + _text +'</a>';
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -396,7 +396,7 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 弹出层指定宽度
|
|
|
|
// 弹出层指定宽度
|
|
|
|
open: function (title, url, width, height) {
|
|
|
|
open: function (title, url, width, height, callback) {
|
|
|
|
//如果是移动端,就使用自适应大小弹窗
|
|
|
|
//如果是移动端,就使用自适应大小弹窗
|
|
|
|
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
|
|
|
|
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
|
|
|
|
width = 'auto';
|
|
|
|
width = 'auto';
|
|
|
@ -414,6 +414,12 @@
|
|
|
|
if ($.common.isEmpty(height)) {
|
|
|
|
if ($.common.isEmpty(height)) {
|
|
|
|
height = ($(window).height() - 50);
|
|
|
|
height = ($(window).height() - 50);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
if ($.common.isEmpty(callback)) {
|
|
|
|
|
|
|
|
callback = function(index, layero) {
|
|
|
|
|
|
|
|
var iframeWin = layero.find('iframe')[0];
|
|
|
|
|
|
|
|
iframeWin.contentWindow.submitHandler();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
layer.open({
|
|
|
|
layer.open({
|
|
|
|
type: 2,
|
|
|
|
type: 2,
|
|
|
|
area: [width + 'px', height + 'px'],
|
|
|
|
area: [width + 'px', height + 'px'],
|
|
|
@ -426,10 +432,7 @@
|
|
|
|
btn: ['确定', '关闭'],
|
|
|
|
btn: ['确定', '关闭'],
|
|
|
|
// 弹层外区域关闭
|
|
|
|
// 弹层外区域关闭
|
|
|
|
shadeClose: true,
|
|
|
|
shadeClose: true,
|
|
|
|
yes: function(index, layero) {
|
|
|
|
yes: callback,
|
|
|
|
var iframeWin = layero.find('iframe')[0];
|
|
|
|
|
|
|
|
iframeWin.contentWindow.submitHandler();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
cancel: function(index) {
|
|
|
|
cancel: function(index) {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -912,6 +915,13 @@
|
|
|
|
isNotEmpty: function (value) {
|
|
|
|
isNotEmpty: function (value) {
|
|
|
|
return !$.common.isEmpty(value);
|
|
|
|
return !$.common.isEmpty(value);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 空对象转字符串
|
|
|
|
|
|
|
|
nullToStr: function(value) {
|
|
|
|
|
|
|
|
if ($.common.isEmpty(value)) {
|
|
|
|
|
|
|
|
return '-'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
},
|
|
|
|
// 是否显示数据 为空默认为显示
|
|
|
|
// 是否显示数据 为空默认为显示
|
|
|
|
visible: function (value) {
|
|
|
|
visible: function (value) {
|
|
|
|
if ($.common.isEmpty(value) || value == true) {
|
|
|
|
if ($.common.isEmpty(value) || value == true) {
|
|
|
|