提交 79f600e6 编写于 作者: D Devil

附件管理删除bug修复

上级 a5c22c8a
...@@ -734,10 +734,9 @@ ...@@ -734,10 +734,9 @@
window.event.stopPropagation(); //阻止事件的传播 window.event.stopPropagation(); //阻止事件的传播
} finally { } finally {
if(!confirm("确定要删除吗?")) return; if(!confirm("确定要删除吗?")) return;
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) { $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) {
json = utils.str2json(responseText); if (response.state == 'SUCCESS') del.parent().remove();
if (json.state == 'SUCCESS') del.parent().remove(); else alert(response.state);
else alert(json.state);
}); });
} }
})[0]); })[0]);
......
...@@ -909,10 +909,9 @@ ...@@ -909,10 +909,9 @@
window.event.stopPropagation(); //阻止事件的传播 window.event.stopPropagation(); //阻止事件的传播
} finally { } finally {
if(!confirm("确定要删除吗?")) return; if(!confirm("确定要删除吗?")) return;
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) { $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) {
json = utils.str2json(responseText); if (response.state == 'SUCCESS') del.parent().remove();
if (json.state == 'SUCCESS') del.parent().remove(); else alert(response.state);
else alert(json.state);
}); });
} }
})[0]); })[0]);
......
...@@ -286,10 +286,9 @@ ...@@ -286,10 +286,9 @@
window.event.stopPropagation(); //阻止事件的传播 window.event.stopPropagation(); //阻止事件的传播
} finally { } finally {
if(!confirm("确定要删除吗?")) return; if(!confirm("确定要删除吗?")) return;
$.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(responseText) { $.post(editor.getOpt("serverUrl") + "?action=deletefile", { "id": del.attr("data-id") }, function(response) {
json = utils.str2json(responseText); if (response.state == 'SUCCESS') del.parent().remove();
if (json.state == 'SUCCESS') del.parent().remove(); else alert(response.state);
else alert(json.state);
}); });
} }
})[0]); })[0]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册