php: delete file

This commit is contained in:
Sergey Linnik
2016-12-05 15:20:48 +03:00
parent 85e6de27d3
commit cea433733f
4 changed files with 38 additions and 0 deletions

View File

@ -210,6 +210,22 @@ if (typeof jQuery != "undefined") {
jq.unblockUI();
});
jq(document).on("click", ".delete-file", function () {
var fileName = jq(this).attr("data");
var requestAddress = "webeditor-ajax.php?type=delete&fileName=" + fileName;
jq.ajax({
async: true,
contentType: "text/xml",
type: "get",
url: requestAddress,
complete: function (data) {
document.location.reload();
}
});
});
jq(document).on("click", "#createSample", function () {
jq(".try-editor").each(function () {
var href = jq(this).attr("href");