#19654: 404 when click "unpublish" or "publish" in Blog Module.

--HG--
branch : 1.x
extra : source : 54d46ec006b20bfa7559f32bd9b9d1df1b90b9d1
This commit is contained in:
Jacky@Jacky-PC
2013-04-29 09:45:55 +08:00
parent a49ccf4d76
commit 0b70baa19b

View File

@@ -223,7 +223,7 @@
$(function () {
var magicToken = $("input[name=__RequestVerificationToken]").first();
if (!magicToken) { return; } // no sense in continuing if form POSTS will fail
$("a[itemprop~=UnsafeUrl]").on("click", function () {
$("a[itemprop~=UnsafeUrl]").on("click", function() {
var _this = $(this);
var hrefParts = _this.attr("href").split("?");
var form = $("<form action=\"" + hrefParts[0] + "\" method=\"POST\" />");
@@ -238,16 +238,16 @@
}
form.css({ "position": "absolute", "left": "-9999em" });
$("body").append(form);
_this.click(function () {
if (_this.filter("[itemprop~='RemoveUrl']").length == 1) {
if (!confirm(confirmRemoveMessage)) {
return false;
}
}
form.submit();
return false;
});
if (_this.filter("[itemprop~='RemoveUrl']").length == 1) {
if (!confirm(confirmRemoveMessage)) {
return false;
}
}
form.submit();
return false;
});
});
})(jQuery);