From ac524ee76f8321b80bb6cd295fc1452397603029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=9A=93=E5=AE=B8?= Date: Fri, 26 Apr 2019 17:35:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=B8=AD=E5=BC=82=E5=B8=B8=E6=97=A5=E5=BF=97=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/sys/logList.jsp | 2 +- .../webapp/static/global/scripts/common.js | 27 ++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/sys/logList.jsp b/src/main/webapp/WEB-INF/views/sys/logList.jsp index 578ecd6ad..e7b0020b9 100644 --- a/src/main/webapp/WEB-INF/views/sys/logList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/logList.jsp @@ -103,7 +103,7 @@ - <%-- 用户代理: ${log.userAgent}
--%> <%-- 提交参数: ${fns:escapeHtml(log.params)}
--%>
diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index bc0eb96ec..86c0afc5b 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -61,7 +61,7 @@ $(function(){ $("form input[class~='domainCheck']").attr("maxlength","1024"); $("form input[class~='domainCheck']").attr("minlength","4"); //截取过长的文字 使用id选择器;例如:tab对象->tr->td对象. 排除日志table .logTb - $("#contentTable").find("td").not(":has(a)").each(function(i,element){ + $("#contentTable").find("td").not(":has(a)").not(".SysException").each(function(i,element){ //获取td当前对象的文本,如果长度大于25; if(!$(element).find(".tooltips").length>0){ var tdclass= $(this).attr("class");//no_substr 不进行截取 @@ -85,6 +85,31 @@ $(function(){ } }); + $("#contentTable").find("td.SysException").each(function(i,element){ + //获取td当前对象的文本,如果长度大于25; + if(!$(element).find(".tooltips").length>0){ + var tdclass= $(this).attr("class");//no_substr 不进行截取 + if(tdclass!='no_substr'){ + if($(this).text().trim().length>100){ + //给td设置title属性,并且设置td的完整值.给title属性. + var strTitle = $(this).text().trim().replace(/[\r\n]/g,"").replace(/\s+/g, " ");; + $(this).attr("titleHidden","'"+strTitle+"'"); // 加一个不含换行的隐藏文本方便其它复制处理 + //解决火狐title不能自动换行 + var count = Math.floor(strTitle.length/62); + for(var i=1;i<=count;i++){ + strTitle=strTitle.substring(0,i*62-1)+"\n"+strTitle.substring(i*62-1); + } + $(this).attr("title",strTitle); + //获取td的值,进行截取。赋值给text变量保存. + var length=$(this).html().length; + var text=$(this).html().substring(0,(length/2))+"..."; + //重新为td赋值; + $(this).html(text); + } + } + } + }); + $("input[name$='isCaseSenstive']").on("change",function(){ setIsHexBin(this); });