[Update] 修复批量删除资产,当待删除数量和资产总数相等时,提示删除失败。

This commit is contained in:
Bai
2020-03-17 17:06:59 +08:00
parent a67b445026
commit a6054ff6a5

View File

@@ -258,6 +258,10 @@ $(document).ready(function(){
confirmButtonText: "{% trans 'Confirm' %}",
closeOnConfirm: false
},function () {
function fail() {
var msg = "{% trans 'Asset Deleting failed.' %}";
swal("{% trans 'Asset Delete' %}", msg, "error");
}
function success(data) {
url = setUrlParam(the_url, 'spm', data.spm);
requestApi({
@@ -268,13 +272,10 @@ $(document).ready(function(){
swal("{% trans 'Asset Delete' %}", msg, "success");
reloadTable();
},
error: fail,
flash_message: false,
});
}
function fail() {
var msg = "{% trans 'Asset Deleting failed.' %}";
swal("{% trans 'Asset Delete' %}", msg, "error");
}
requestApi({
url: "{% url 'api-common:resources-cache' %}",
method: 'POST',