From 46c3e4b56aaad26ba5841a61df88a4bc14f90020 Mon Sep 17 00:00:00 2001 From: duandongmei Date: Tue, 7 Aug 2018 10:02:57 +0800 Subject: [PATCH] =?UTF-8?q?isHexbin=20=E5=8D=81=E5=85=AD=E8=BF=9B=E5=88=B6?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/static/global/scripts/common.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index f8278b611..f9c42e8c0 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -347,7 +347,13 @@ $(function(){ $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); }); - + //选择hex cfgkeywords需校验十六进制 + $("select[name$='isHexbin']").each(function(){ + $(this).on("change",function(){ + addHexCheck(this,$(this).val()); + }); + addHexCheck(this,$(this).val()); + }); // 校验搜索条件里的时间选框,不允许起始时间晚于终止时间 $("#searchForm").validate({ rules:{ @@ -393,11 +399,19 @@ window.onload=function(){ 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"); }); } + +//选择hex cfgkeywords需校验十六进制 +var addHexCheck=function(obj,isHexbin){ + if(isHexbin == 1){ //十六进制 + $(obj).parent().parent().parent().parent().parent().parent().find("input[name$='cfgKeywords']").addClass("hexCheck"); + }else{ + $(obj).parent().parent().parent().parent().parent().parent().find("input[name$='cfgKeywords']").removeClass("hexCheck"); + } +} //与表达式时,只允许为子串匹配 var setDefaultMatchMethod=function (obj){ var exprType = $(obj).val();