ObjectList选中/批量删除时增加遮罩层

This commit is contained in:
zhangwenqing
2019-07-19 15:26:11 +08:00
parent 8c514c4e7e
commit 3f952f6a83
4 changed files with 83 additions and 50 deletions

View File

@@ -103,12 +103,15 @@
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
if(v=="ok"){
loading('onloading');
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
}
},{buttonsFocus:1});
top.$('.jbox-body .jbox-icon').css('top','55px');
}else{ // 未选中任何 批量
loading('onloading');
var myData = {};
var groupId = $("#groupId").val();
if($("#intype").val() != null && $("#intype").val() != ""){
@@ -118,11 +121,10 @@
myData["groupId"] = groupId;
}
$.ajax({
myAjax = $.ajax({
type:'post',
url:'${ctx}/basics/domain/ajaxCheckIsLastOneCfgBatch',
data:myData,
async:false,
success:function(data,textStatus){// 处理返回结果
if(data.length > 0 && typeof(data) == 'object'){
canDel = false;
@@ -134,17 +136,24 @@
}
});
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='delete_all'/>",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action",url);
page();
}
});
// myAjax异步请求完毕后执行
$.when(myAjax).done(function() {
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.closeTip();
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action",url);
page();
}
});
});
}
}
</script>

View File

@@ -104,12 +104,15 @@
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
if(v=="ok"){
loading('onloading');
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
}
},{buttonsFocus:1});
top.$('.jbox-body .jbox-icon').css('top','55px');
}else{ // 未选中任何 批量
loading('onloading');
var myData = {};
var groupId = $("#groupId").val();
if($("#intype").val() != null && $("#intype").val() != ""){
@@ -119,11 +122,10 @@
myData["groupId"] = groupId;
}
$.ajax({
myAjax = $.ajax({
type:'post',
url:'${ctx}/basics/ip/ajaxCheckIsLastOneCfgBatch',
data:myData,
async:false,
success:function(data,textStatus){// 处理返回结果
if(data.length > 0 && typeof(data) == 'object'){
canDel = false;
@@ -135,16 +137,22 @@
}
});
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='delete_all'/>",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action",url);
page();
}
});
// myAjax异步请求完毕后执行
$.when(myAjax).done(function() {
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.closeTip();
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action",url);
page();
}
});
});
}
}

View File

@@ -107,12 +107,15 @@
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
if(v=="ok"){
loading('onloading');
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
}
},{buttonsFocus:1});
top.$('.jbox-body .jbox-icon').css('top','55px');
}else{ // 未选中任何 批量
loading('onloading');
var myData = {};
var groupId = $("#groupId").val();
if($("#intype").val() != null && $("#intype").val() != ""){
@@ -122,11 +125,10 @@
myData["groupId"] = groupId;
}
$.ajax({
myAjax = $.ajax({
type:'post',
url:'${ctx}/basics/scriberId/ajaxCheckIsLastOneCfgBatch',
data:myData,
async:false,
success:function(data,textStatus){// 处理返回结果
if(data.length > 0 && typeof(data) == 'object'){
canDel = false;
@@ -138,17 +140,23 @@
}
});
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='delete_all'/>",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action",url);
page();
}
});
// myAjax异步请求完毕后执行
$.when(myAjax).done(function() {
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.closeTip();
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action",url);
page();
}
});
});
}
}
</script>

View File

@@ -102,12 +102,15 @@
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
if(v=="ok"){
loading('onloading');
window.location = url+"&ids="+ids+"&groupIds="+groupIds;
}
},{buttonsFocus:1});
top.$('.jbox-body .jbox-icon').css('top','55px');
}else{ // 未选中任何 批量
loading('onloading');
var myData = {};
var groupId = $("#groupId").val();
if($("#intype").val() != null && $("#intype").val() != ""){
@@ -117,11 +120,10 @@
myData["groupId"] = groupId;
}
$.ajax({
myAjax = $.ajax({
type:'post',
url:'${ctx}/basics/url/ajaxCheckIsLastOneCfgBatch',
data:myData,
async:false,
success:function(data,textStatus){// 处理返回结果
if(data.length > 0 && typeof(data) == 'object'){
canDel = false;
@@ -133,16 +135,22 @@
}
});
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='delete_all'/>",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action",url);
page();
}
});
// myAjax异步请求完毕后执行
$.when(myAjax).done(function() {
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.closeTip();
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
if(v=="ok"){
$("#searchForm").attr("action",url);
page();
}
});
});
}
}