From cdb27d85a2168d6a32ddaa4c5d4dd371520397d8 Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Thu, 15 Nov 2018 14:52:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=88=97=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/static/global/scripts/common.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 75779c4c1..71f3f84a2 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -48,7 +48,10 @@ $(function(){ var text=$(this).text().trim().substring(0,25)+"..."; //重新为td赋值; $(this).text(text); - } + } else{ + var strTitle = $(this).text().trim().replace(/[\r\n]/g,"").replace(/\s+/g, " "); + $(this).attr("title",strTitle); + } }); $("input[name$='isCaseSenstive']").on("change",function(){ @@ -72,6 +75,10 @@ $(function(){ }else{ text=$(element).text().trim() } + if(typeof($(element).attr("title"))!="undefined"&&$(element).attr("title")!=null&&$(element).attr("title").length > 0){ + text=$(element).attr("title").trim(); + + } //特殊字符转义 text=text.replace(/[<>&"]/g,function(c){return {'<':'<','>':'>','&':'&','"':'"'}[c];});