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();