Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop

This commit is contained in:
zhanghongqing
2018-08-03 19:50:52 +08:00
3 changed files with 67 additions and 1 deletions

View File

@@ -33,6 +33,10 @@
<link href="${pageContext.request.contextPath}/static/global/plugins/bootstrap-fileupload/css/bootstrap-fileupload.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/static/global/plugins/jquery-tree-multiselect/jquery.tree-multiselect.min.css" rel="stylesheet" type="text/css" />
<!-- 日志界面 -->
<link href="${pageContext.request.contextPath}/static/pages/css/pageLogs.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]>
<script src="${pageContext.request.contextPath}/static/global/plugins/respond.min.js"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/excanvas.min.js"></script>
@@ -96,4 +100,7 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-fileupload/js/bootstrap-fileupload.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/bootstrap-fileupload/js/jquery.cookie.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-tree-multiselect/jquery.tree-multiselect.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-tree-multiselect/jquery.tree-multiselect.js" type="text/javascript"></script>
<!-- 日志界面 -->
<script src="${pageContext.request.contextPath}/static/pages/scripts/pageLogs.js" type="text/javascript"></script>

View File

@@ -0,0 +1,16 @@
/* logs page */
table.logTb {
table-layout: fixed;
}
table.logTb td {
width: 100px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-icab-text-overflow: ellipsis;
-khtml-text-overflow: ellipsis;
-moz-text-overflow: ellipsis;
-webkit-text-overflow: ellipsis;
}

View File

@@ -0,0 +1,43 @@
$(document).ready(function() {
// 界面鼠标悬停事件
$("table.logTb").find("td").not(":has(a)").bind("mouseover", function(){
this.title=$(this).html(this.innerHTML.trim()).text();
});
$("table.logTb th").each(function(){
// 判断是否支持currentStyle属性 是IE 否FF or Chrome
var finalStyle = this.currentStyle ? this.currentStyle : document.defaultView.getComputedStyle(this , null);
var fontSize = (finalStyle.fontSize).replace("px","");
var px = getPixelsCount($(this).text(),fontSize)+55;
this.setAttribute('width',px+'px');
});
})
// 获取界面标题字符串对等的像素值
function getPixelsCount(str, strFontSize){
// 字符串字符个数
var stringCharsCount = str.length;
// 像素值
var stringPixelsCount = 0;
var element = document.createElement("span");
element.style.fontSize = strFontSize; // 设置span的fontSize
element.style.visibility = "hidden"; // 设置span不可见
element.style.display = "inline-block";
element.style.wordBreak = "break-all !important";
document.body.appendChild(element);
for(var i = 0; i < stringCharsCount; i++){
if(str[i] == " "){
element.innerHTML = "&nbsp;";
}else{
element.innerHTML = str[i];
}
stringPixelsCount += element.offsetWidth;
}
return stringPixelsCount;
}