diff --git a/public/static/common/lib/ueditor/dialogs/attachment/attachment.js b/public/static/common/lib/ueditor/dialogs/attachment/attachment.js index 7f8c3e951..9e9e03d20 100755 --- a/public/static/common/lib/ueditor/dialogs/attachment/attachment.js +++ b/public/static/common/lib/ueditor/dialogs/attachment/attachment.js @@ -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]); diff --git a/public/static/common/lib/ueditor/dialogs/image/image.js b/public/static/common/lib/ueditor/dialogs/image/image.js index be12333a1..255d781dd 100755 --- a/public/static/common/lib/ueditor/dialogs/image/image.js +++ b/public/static/common/lib/ueditor/dialogs/image/image.js @@ -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]); diff --git a/public/static/common/lib/ueditor/dialogs/video/video.js b/public/static/common/lib/ueditor/dialogs/video/video.js index 89f51a610..3917398d8 100755 --- a/public/static/common/lib/ueditor/dialogs/video/video.js +++ b/public/static/common/lib/ueditor/dialogs/video/video.js @@ -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]);