From 33c2c81a7e59778d249b9fec56483d9ec0bcdcda Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Sun, 26 Aug 2018 19:54:34 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E6=97=A5=E5=BF=97=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=BC=B9=E6=A1=86=E8=BD=AC=E4=B9=89=EF=BC=8C=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C2.=E5=8A=A0=E8=BD=BD=E9=81=AE=E7=BD=A9=E6=96=87?= =?UTF-8?q?=E5=AD=97onloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/static/global/scripts/common.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 8bb931152..314fe89af 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -16,9 +16,18 @@ $(function(){ var text=""; if($(element).find(".tooltips").length > 0){ text=$(element).find(".tooltips").attr("data-original-title").trim(); + }else{ text=$(element).text().trim() } + //增加换行 + var count = Math.floor(text.length/34); + for(var i=1;i<=count;i++){ + text=text.substring(0,i*34-1)+"\n"+text.substring(i*34-1); + } + //特殊字符转义 + text=text.replace(/[<>&"]/g,function(c){return {'<':'<','>':'>','&':'&','"':'"'}[c];}); + html+="
"; html+="
"; html+="
"; @@ -398,7 +407,7 @@ $(function(){ } }, submitHandler: function(form){ - loading(''); + loading('onloading'); form.submit(); } });