From ffd412ac3456e429c499b64d345b3ff12c94d4a4 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Mon, 8 May 2023 13:31:24 +0100 Subject: [PATCH] [JENKINS-70921] Remove Prototype `Ajax.Request` usages from `link.js` (#7953) --- core/src/main/resources/lib/form/link.jelly | 8 ++------ core/src/main/resources/lib/form/link/link.js | 16 ---------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/core/src/main/resources/lib/form/link.jelly b/core/src/main/resources/lib/form/link.jelly index ce211fb3d3f4..2b29b2fab611 100644 --- a/core/src/main/resources/lib/form/link.jelly +++ b/core/src/main/resources/lib/form/link.jelly @@ -25,8 +25,7 @@ THE SOFTWARE. - Generates an anchor element with the ability to send POST requests and/or - asynchronous requests. It depends the combination of post and async attributes. + Generates an anchor element with the ability to send POST requests. @since 1.584 @@ -38,12 +37,9 @@ THE SOFTWARE. If this must send a POST request. - - If this must send an asynchronous request. - - + diff --git a/core/src/main/resources/lib/form/link/link.js b/core/src/main/resources/lib/form/link/link.js index 430308b1b5a1..74c053582992 100644 --- a/core/src/main/resources/lib/form/link/link.js +++ b/core/src/main/resources/lib/form/link/link.js @@ -9,19 +9,3 @@ Behaviour.specify("A.post", "link.post", 0, function (element) { return false; }; }); - -Behaviour.specify("A.post-async", "link.post-async", 0, function (element) { - element.onclick = function () { - new Ajax.Request(element.getAttribute("href")); - return false; - }; -}); - -Behaviour.specify("A.async", "link.async", 0, function (element) { - element.onclick = function () { - new Ajax.Request(element.getAttribute("href"), { - method: "get", - }); - return false; - }; -});