diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 71f3f84a2..123d75ca3 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -33,8 +33,9 @@ $(function(){ $("form input[name$='cfgKeywords']").attr("maxlength","1024"); $("form input[class~='domainCheck']").attr("maxlength","1024"); //截取过长的文字 使用id选择器;例如:tab对象->tr->td对象. 排除日志table .logTb - $("#contentTable").find("td").each(function(i){ - //获取td当前对象的文本,如果长度大于25; + $("#contentTable").find("td").each(function(i,element){ + //获取td当前对象的文本,如果长度大于25; + if(!$(element).find(".tooltips").length>0){ if($(this).text().trim().length>28){ //给td设置title属性,并且设置td的完整值.给title属性. var strTitle = $(this).text().trim().replace(/[\r\n]/g,"").replace(/\s+/g, " "); @@ -48,10 +49,8 @@ $(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(){ @@ -75,7 +74,7 @@ $(function(){ }else{ text=$(element).text().trim() } - if(typeof($(element).attr("title"))!="undefined"&&$(element).attr("title")!=null&&$(element).attr("title").length > 0){ + if(!$(element).find(".tooltips").length>0&&typeof($(element).attr("title"))!="undefined"&&$(element).attr("title")!=null&&$(element).attr("title").length > 0){ text=$(element).attr("title").trim(); }