Skip to content

Commit

Permalink
Merge pull request #121 from basil/remove-prototype
Browse files Browse the repository at this point in the history
Replace Prototype.js with native JavaScript
  • Loading branch information
jglick authored Jun 27, 2023
2 parents bcfcdeb + d2169f4 commit 94e7d9f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/main/resources/hudson/tasks/_ant/AntTargetNote/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@

if (!loading) {
loading = true;
var u = new Ajax.Updater(document.getElementById("side-panel"),
rootURL+"/descriptor/hudson.tasks._ant.AntTargetNote/outline",
{insertion: Insertion.Bottom, onComplete: function() {
if (!u.success()) return; // we can't us onSuccess because that kicks in before onComplete
outline = document.getElementById("console-outline-body");
loading = false;
queue.each(handle);
}});
fetch(rootURL + "/descriptor/hudson.tasks._ant.AntTargetNote/outline", {
method: "post",
headers: crumb.wrap({}),
}).then(function(rsp) {
if (rsp.ok) {
rsp.text().then((responseText) => {
document.getElementById("side-panel").insertAdjacentHTML("beforeend", responseText);
outline = document.getElementById("console-outline-body");
loading = false;
queue.forEach(handle);
});
}
});
}
return true;
}
Expand Down

0 comments on commit 94e7d9f

Please sign in to comment.