附件管理删除bug修复

This commit is contained in:
Devil 2019-09-22 00:58:45 +08:00
parent a5c22c8aa0
commit 79f600e693
3 changed files with 9 additions and 12 deletions

View File

@ -734,10 +734,9 @@
window.event.stopPropagation(); //阻止事件的传播
} finally {
if(!confirm("确定要删除吗?")) return;
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) {
json = utils.str2json(responseText);
if (json.state == 'SUCCESS') del.parent().remove();
else alert(json.state);
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) {
if (response.state == 'SUCCESS') del.parent().remove();
else alert(response.state);
});
}
})[0]);

View File

@ -909,10 +909,9 @@
window.event.stopPropagation(); //阻止事件的传播
} finally {
if(!confirm("确定要删除吗?")) return;
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) {
json = utils.str2json(responseText);
if (json.state == 'SUCCESS') del.parent().remove();
else alert(json.state);
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) {
if (response.state == 'SUCCESS') del.parent().remove();
else alert(response.state);
});
}
})[0]);

View File

@ -286,10 +286,9 @@
window.event.stopPropagation(); //阻止事件的传播
} finally {
if(!confirm("确定要删除吗?")) return;
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) {
json = utils.str2json(responseText);
if (json.state == 'SUCCESS') del.parent().remove();
else alert(json.state);
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) {
if (response.state == 'SUCCESS') del.parent().remove();
else alert(response.state);
});
}
})[0]);