策略分组删除操作增加提示.

This commit is contained in:
zhangwq
2018-12-13 20:31:59 +08:00
parent d623414376
commit 20f4765b3c
8 changed files with 52 additions and 7 deletions

View File

@@ -46,6 +46,7 @@
if(str.substr(str.length-1)== ','){
ids = str.substr(0,str.length-1);
}
var canDel=true;
var tip='<spring:message code="can_not_delete_issued_asn_group"/>';
if(serviceGroupIds.length>0){
@@ -60,7 +61,7 @@
}
}
});
if(canDel){
/* if(canDel){ // 不能删除包含ASN IP的 ASN组
$.ajax({
type:'post',
url:'${ctx}/basics/policyGroup/ajaxHasAsnIPs',
@@ -73,11 +74,35 @@
}
}
});
}
} */
}
if(canDel){
window.location = url+"&ids="+ids;
}else{
var added = "";
if(serviceGroupIds.length != 0){
added = "<spring:message code='asn_ip_group_delete'/>";
}
top.$.jBox.confirm("<spring:message code='confirm_message'/>"+added,"<spring:message code='info'/>",function(v,h,f){
if(v=="ok"){
if(serviceGroupIds.length != 0){
$.ajax({
type:'post',
url:'${ctx}/basics/asn/ajaxDeleteAsnIp',
data:{"ids":serviceGroupIds.join(',')},
async:false,
success:function(data,textStatus){
if(textStatus == "success"){
window.location = url+"&ids="+ids;
}
}
});
}else{
window.location = url+"&ids="+ids;
}
}
},{buttonsFocus:1});
top.$('.jbox-body .jbox-icon').css('top','55px');
}else{
$.jBox.tip(tip);
return false;
}
@@ -159,6 +184,7 @@
<a href="javascript:void(0);" class="btn btn-default" onclick="deletes('${ctx}/basics/policyGroup/delete?isValid=0')" data-toggle="tooltip" data-placement="top">
<i class="fa fa-trash"> <spring:message code="delete"/></i>
</a>
<%-- <sys:delRow url="${ctx}/basics/asn/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%>
<%-- </shiro:hasPermission> --%>
<a class="btn btn-icon-only btn-default setfields tooltips"