分组配置管理删除分组下最后一条域配置时增加提示信息
This commit is contained in:
@@ -61,6 +61,63 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function deletes(url){
|
||||
var checkboxes = $("tbody tr td input.i-checks:checkbox");
|
||||
var ids = "";
|
||||
var str = "";
|
||||
var groupIds = "";
|
||||
var canDel = true;
|
||||
|
||||
checkboxes.each(function(){
|
||||
if(true == $(this).is(':checked')){
|
||||
ids += ","+$(this).attr("id");
|
||||
str += ","+$(this).attr("groupId")+"_"+$(this).attr("id");
|
||||
groupIds += ","+$(this).attr("groupId");
|
||||
}
|
||||
});
|
||||
|
||||
ids = ids.substr(1);
|
||||
str = str.substr(1);
|
||||
groupIds = groupIds.substr(1);
|
||||
|
||||
if(ids.length >0){
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||
data:{"grouIdAndCfgId":str,"groupType":8},
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
}
|
||||
tipCompileIds = tipCompileIds.substr(1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
|
||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -135,7 +192,10 @@
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="domain:common:config">
|
||||
<sys:delRow url="${ctx}/basics/domain/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/domain/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<%-- <sys:delRow url="${ctx}/basics/domain/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%>
|
||||
<a href="javascript:void(0);" class="btn btn-default" onclick="deletes('${ctx}/basics/domain/delete?isValid=-1&functionId=${cfg.functionId }')" data-toggle="tooltip" data-placement="top">
|
||||
<i class="fa fa-trash"> <spring:message code="delete"/></i>
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
@@ -218,7 +278,7 @@
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" compileId="${cfg.groupId}"></td>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" groupId="${cfg.groupId}"></td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>
|
||||
<c:forEach items="${policyGroupInfos}" var="info">
|
||||
|
||||
@@ -59,6 +59,62 @@
|
||||
}
|
||||
}
|
||||
|
||||
function deletes(url){
|
||||
var checkboxes = $("tbody tr td input.i-checks:checkbox");
|
||||
var ids = "";
|
||||
var str = "";
|
||||
var groupIds = "";
|
||||
var canDel = true;
|
||||
|
||||
checkboxes.each(function(){
|
||||
if(true == $(this).is(':checked')){
|
||||
ids += ","+$(this).attr("id");
|
||||
str += ","+$(this).attr("groupId")+"_"+$(this).attr("id");
|
||||
groupIds += ","+$(this).attr("groupId");
|
||||
}
|
||||
});
|
||||
|
||||
ids = ids.substr(1);
|
||||
str = str.substr(1);
|
||||
groupIds = groupIds.substr(1);
|
||||
|
||||
if(ids.length >0){
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||
data:{"grouIdAndCfgId":str,"groupType":5},
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
}
|
||||
tipCompileIds = tipCompileIds.substr(1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
|
||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -154,7 +210,10 @@
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="ip:common:config">
|
||||
<sys:delRow url="${ctx}/basics/ip/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/ip/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<%-- <sys:delRow url="${ctx}/basics/ip/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%>
|
||||
<a href="javascript:void(0);" class="btn btn-default" onclick="deletes('${ctx}/basics/ip/delete?isValid=-1&functionId=${cfg.functionId }')" data-toggle="tooltip" data-placement="top">
|
||||
<i class="fa fa-trash"> <spring:message code="delete"/></i>
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
@@ -253,7 +312,7 @@
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" compileId="${cfg.groupId}"></td>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" groupId="${cfg.groupId}"></td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>
|
||||
<c:forEach items="${policyGroupInfos}" var="policyGroup">
|
||||
|
||||
@@ -61,6 +61,63 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function deletes(url){
|
||||
var checkboxes = $("tbody tr td input.i-checks:checkbox");
|
||||
var ids = "";
|
||||
var str = "";
|
||||
var groupIds = "";
|
||||
var canDel = true;
|
||||
|
||||
checkboxes.each(function(){
|
||||
if(true == $(this).is(':checked')){
|
||||
ids += ","+$(this).attr("id");
|
||||
str += ","+$(this).attr("groupId")+"_"+$(this).attr("id");
|
||||
groupIds += ","+$(this).attr("groupId");
|
||||
}
|
||||
});
|
||||
|
||||
ids = ids.substr(1);
|
||||
str = str.substr(1);
|
||||
groupIds = groupIds.substr(1);
|
||||
|
||||
if(ids.length >0){
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||
data:{"grouIdAndCfgId":str,"groupType":9},
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
}
|
||||
tipCompileIds = tipCompileIds.substr(1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
|
||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -135,7 +192,10 @@
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="scriberid:common:config">
|
||||
<sys:delRow url="${ctx}/basics/scriberId/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/scriberId/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<%-- <sys:delRow url="${ctx}/basics/scriberId/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%>
|
||||
<a href="javascript:void(0);" class="btn btn-default" onclick="deletes('${ctx}/basics/scriberId/delete?isValid=-1&functionId=${cfg.functionId }')" data-toggle="tooltip" data-placement="top">
|
||||
<i class="fa fa-trash"> <spring:message code="delete"/></i>
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
@@ -218,7 +278,7 @@
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" compileId="${cfg.groupId}"></td>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" groupId="${cfg.groupId}"></td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>
|
||||
<c:forEach items="${policyGroupInfos}" var="info">
|
||||
|
||||
@@ -56,6 +56,63 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function deletes(url){
|
||||
var checkboxes = $("tbody tr td input.i-checks:checkbox");
|
||||
var ids = "";
|
||||
var str = "";
|
||||
var groupIds = "";
|
||||
var canDel = true;
|
||||
|
||||
checkboxes.each(function(){
|
||||
if(true == $(this).is(':checked')){
|
||||
ids += ","+$(this).attr("id");
|
||||
str += ","+$(this).attr("groupId")+"_"+$(this).attr("id");
|
||||
groupIds += ","+$(this).attr("groupId");
|
||||
}
|
||||
});
|
||||
|
||||
ids = ids.substr(1);
|
||||
str = str.substr(1);
|
||||
groupIds = groupIds.substr(1);
|
||||
|
||||
if(ids.length >0){
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||
data:{"grouIdAndCfgId":str,"groupType":7},
|
||||
async:false,
|
||||
success:function(data,textStatus){// 处理返回结果
|
||||
if(data.length > 0){
|
||||
canDel = false;
|
||||
for(var index in data){
|
||||
tipCompileIds += ","+data[index]
|
||||
}
|
||||
tipCompileIds = tipCompileIds.substr(1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(!canDel){
|
||||
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||
}
|
||||
|
||||
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -130,7 +187,10 @@
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="url:common:config">
|
||||
<sys:delRow url="${ctx}/basics/url/updateForm?functionId=${cfg.functionId}" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/basics/url/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
<%-- <sys:delRow url="${ctx}/basics/url/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%>
|
||||
<a href="javascript:void(0);" class="btn btn-default" onclick="deletes('${ctx}/basics/url/delete?isValid=-1&functionId=${cfg.functionId }')" data-toggle="tooltip" data-placement="top">
|
||||
<i class="fa fa-trash"> <spring:message code="delete"/></i>
|
||||
</a>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
@@ -213,7 +273,7 @@
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" compileId="${cfg.groupId}"></td>
|
||||
<td><input type="checkbox" class="i-checks" id="${cfg.cfgId}" isValid="${cfg.isValid}" value="${cfg.isAudit}" groupId="${cfg.groupId}"></td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>
|
||||
<c:forEach items="${policyGroupInfos}" var="info">
|
||||
|
||||
Reference in New Issue
Block a user