From 0cd9ca04883e9bc68b259da26957f82edb214b7d Mon Sep 17 00:00:00 2001 From: wangxin Date: Thu, 16 Aug 2018 17:49:50 +0800 Subject: [PATCH] =?UTF-8?q?(1)=E4=BF=AE=E5=A4=8D=E6=8E=92=E9=99=A4ID=200?= =?UTF-8?q?=3D''=20(2)notAllowSelectRoot=E5=8F=82=E6=95=B0=E7=94=A8?= =?UTF-8?q?=E6=9D=A5=E5=A4=84=E7=90=86select=E9=80=89=E4=B8=AD=E9=A1=B9=20?= =?UTF-8?q?(3)app=EF=BC=8C=E5=9F=BA=E7=A1=80=E5=8D=8F=E8=AE=AE=EF=BC=8C?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E9=9A=A7=E9=81=93=E8=A1=8C=E4=B8=BA=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E4=B8=8D=E5=BE=97=E9=80=89=E6=8B=A9rootNode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/tags/sys/treeselect.tag | 19 +++++++++++-------- .../views/cfg/app/appPolicyCfgForm.jsp | 4 ++-- .../WEB-INF/views/cfg/basicprotocol/form.jsp | 4 ++-- .../views/cfg/encryptedtunnelbehav/form.jsp | 4 ++-- .../WEB-INF/views/sys/tagTreeselect.jsp | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/main/webapp/WEB-INF/tags/sys/treeselect.tag b/src/main/webapp/WEB-INF/tags/sys/treeselect.tag index bc47cf5ed..294d2d9d5 100644 --- a/src/main/webapp/WEB-INF/tags/sys/treeselect.tag +++ b/src/main/webapp/WEB-INF/tags/sys/treeselect.tag @@ -28,7 +28,7 @@ <%@ attribute name="unCheckedPS" type="java.lang.String" required="false" description="复选框取消选中时是否关联父子节点,ps关联父子,p关联父,s关联子,都不关联为空"%>
- " data-msg-required="${dataMsgRequired}" placeholder="${empty value?labelValue:value}" class="${cssClass}" style="${cssStyle} background-color:transparent"/>
@@ -49,7 +49,7 @@ ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"":"ok", "":"clear","":true}, submit:function(v, h, f){ if (v == "ok"){ var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents(); - var ids = [], names = [], nodes = [],types =[]; + var ids = [], names = [], nodes = []; if ("${checked}" == "true"){ nodes = tree.getCheckedNodes(true); }else{ @@ -100,12 +100,17 @@ }// names.push(nodes[i].name); - if(nodes[i].type){ - types.push(nodes[i].type); - } + //if(nodes[i].type){ + // types.push(nodes[i].type); + //} // break; // 如果为非复选框选择,则返回第一个选择 } + + if((nodes.length==1)&&(nodes[0].level == 0)&&('true'=='${notAllowSelectRoot}')){ + top.$.jBox.tip("("+nodes[0].name+")"); + return false; + } $("#${id}Id").val(ids.join(",").replace(/u_/ig,"")); //if(types.length>0){ // $("#${id}Id").attr('cfgtype',types.join(",")); @@ -120,9 +125,7 @@ //$("#${id}Id").removeAttr('cfgtype'); $("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到 $("#${id}Name").val(""); - if('${value}'){//如果值不存在,但是value却有值,将placeholder清空 - $("#${id}Name").attr("placeholder",""); - } + $("#${id}Name").attr("placeholder",""); } if(typeof ${id}TreeselectCallBack == 'function'){ ${id}TreeselectCallBack(v, h, f); diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index 5e1d0bb12..99b918ecb 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -201,8 +201,8 @@ var delContent = function(contentClassName, addBtnClassName) { + title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId="0" + notAllowSelectRoot="true" cssClass="form-control required"/>
diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp index 217a99c66..dd93fa071 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp @@ -153,8 +153,8 @@ var delContent = function(contentClassName, addBtnClassName) { + title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId="0" + notAllowSelectRoot="true" cssClass="form-control required"/>
diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp index d68a9267a..bee54a4ac 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/form.jsp @@ -202,8 +202,8 @@ var delContent = function(contentClassName, addBtnClassName) { + title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId="0" + notAllowSelectRoot="true" cssClass="form-control required"/>
diff --git a/src/main/webapp/WEB-INF/views/sys/tagTreeselect.jsp b/src/main/webapp/WEB-INF/views/sys/tagTreeselect.jsp index 026c03de2..079944d8a 100644 --- a/src/main/webapp/WEB-INF/views/sys/tagTreeselect.jsp +++ b/src/main/webapp/WEB-INF/views/sys/tagTreeselect.jsp @@ -89,7 +89,7 @@ for(var i=0; i