mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 11:17:28 +08:00
Handle UnsafeUrl and RemoveUrl clicks now and always for any future elements.
This commit is contained in:
@@ -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() {
|
||||
$("body").on("click", "a[itemprop~=UnsafeUrl]", function() {
|
||||
var _this = $(this);
|
||||
var hrefParts = _this.attr("href").split("?");
|
||||
var form = $("<form action=\"" + hrefParts[0] + "\" method=\"POST\" />");
|
||||
|
@@ -62,7 +62,7 @@
|
||||
$(this).closest("form").find(".apply-bulk-actions-auto:first").click();
|
||||
});
|
||||
|
||||
$("[itemprop~='RemoveUrl']").click(function () {
|
||||
$("body").on("click", "[itemprop~='RemoveUrl']", function () {
|
||||
// don't show the confirm dialog if the link is also UnsafeUrl, as it will already be handled in base.js
|
||||
if ($(this).filter("[itemprop~='UnsafeUrl']").length == 1) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user