-
-
Save jechlin/27993535f4e27ff5e3886dcf68268e3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$(function () { | |
AJS.dialog2.on("show", function (e) { | |
var targetId = e.target.id; | |
if (targetId == "my-own-dialog") { | |
var someDialog = AJS.dialog2(e.target); | |
$(e.target).find("#dialog-close-button").click(function (e) { | |
e.preventDefault(); | |
someDialog.hide(); | |
someDialog.remove(); | |
}); | |
$(e.target).find("#button-A").click(function (e) { | |
$.ajax({ | |
type: "GET", | |
dataType: "json", | |
"contentType": "application/json", | |
url: AJS.params.baseURL + "/rest/scriptrunner-jira/latest/custom/...", | |
done: function (data) { | |
// do something with data | |
}, | |
fail: function(data) { | |
alert("Error: ..."); | |
}, | |
always: function() { | |
// | |
} | |
}) | |
}); | |
} | |
}); | |
}); | |
})(AJS.$); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment