Merge branch 'demostration_08' into 'develop'

解决日志中火狐title不自动换行问题

See merge request !14
This commit is contained in:
zhanghongqing
2018-08-14 10:56:53 -04:00
2 changed files with 8 additions and 4 deletions

View File

@@ -136,9 +136,7 @@
<spring:message code='select' /> <spring:message code='select' />
</c:set> </c:set>
<form:select path="transProto" <form:select path="transProto"
class="selectpicker select2 form-control" class="selectpicker select2 form-control" >
data-live-search="true"
data-live-search-placeholder="search">
<form:option value=""> <form:option value="">
<spring:message code="select" /> <spring:message code="select" />
</form:option> </form:option>

View File

@@ -1,7 +1,13 @@
$(document).ready(function() { $(document).ready(function() {
// 界面鼠标悬停事件 // 界面鼠标悬停事件
$("table.logTb").find("td").not(":has(a)").bind("mouseover", function(){ $("table.logTb").find("td").not(":has(a)").bind("mouseover", function(){
this.title=$(this).html(this.innerHTML.trim()).text(); var str = $(this).html(this.innerHTML.trim()).text();
//解决火狐title不能自动换行
var count = Math.floor(str.length/64);
for(var i=1;i<=count;i++){
str=str.substring(0,i*64-1)+"\n"+str.substring(i*64-1);
}
this.title=str;
}); });
var fontSize = 0; var fontSize = 0;
$("table.logTb th").each(function(){ $("table.logTb th").each(function(){