From c247fd8ed90eccdcfe390b860b4f5e7f12ba0361 Mon Sep 17 00:00:00 2001 From: chenjinsong Date: Mon, 6 Aug 2018 15:17:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A0=8F=E9=AB=98=E5=BA=A6=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=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/static/global/scripts/common.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 8cd4edbc1..f8278b611 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -387,14 +387,17 @@ $(function(){ form.submit(); } }); - - // 动态调整日志 - var igHeight = $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").height(); - $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").bind("DOMNodeInserted",function(e) { - var newIgHeight = $("#searchForm").find(".col-md-12").eq(0).height(); - $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").find(".input-group-btn").css("padding-bottom", (newIgHeight-igHeight)+"px"); - }); }); +window.onload=function(){ + // 动态调整日志页搜索框的样式,防止validate的错误提示导致样式错乱 + var igHeight = $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").height(); + $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").bind("DOMNodeInserted",function(e) { + var newIgHeight = $("#searchForm").find(".col-md-12").eq(0).height(); + alert(newIgHeight) + $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").find(".input-group-btn").css("padding-bottom", (newIgHeight-igHeight)+"px"); + }); + +} //与表达式时,只允许为子串匹配 var setDefaultMatchMethod=function (obj){ var exprType = $(obj).val();