We like to include an issue collector on a certain confluence page. The first version went with the vertical trigger style and it was fine. It was, however, decided to go with the custom trigger style, and I cannot get it to work. The idea is to click an image and to raise a ticket. Since I'm inexperienced with html and JavaScript, I wanted to test first on an html page, using the provided example. Using one of the non-custom trigger style, everythings works, but as soon as I switch in the JIRA project settings to custom trigger style, no ticket is raised, no response whatsoever.
Here is the code of the current test implementation:
<!doctype html>
<html>
<head>
<!-- Load jQuery-->
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
<!-- Issue Collector-->
<script src="path-to-issue-collector"></script>
<script>
window.ATL_JQ_PAGE_PROBS =
{
"triggerFunction":
function (showCollectorDialog) {
jQuery("#feedback-button").click(
function (e) {
e.preventDefault();
showCollectorDialog;
}
);
}
};
</script>
</head>
<body onload="jqAvail()">
<h2>JIRA Issue Collector Demo</h2>
<p id="jqText"></p>
<img src="pic.JPG" id="feedback-button"></img>
<!-- Check if jQuery is available-->
<script>
function jqAvail()
{
if (typeof jQuery != "undefined")
document.getElementById("jqText").innerHTML = jQuery.fn.jquery;
else
document.getElementById("jqText").innerHTML = "jQuery not available";
}
</script>
</body>
</html>
As you can see, I made clear, that jQuery is loaded. What am I doing wrong? Help is highly appreciated!
I'm having the same issue, were you able to figure out what was causing this?
I was, but I‘m not sure if my „Solution“ is of any help. There are two typos in the snippet above:
ATL_JQ_PAGE_PROBS —> ATL_JQ_PAGE_PROPS
showCollectorDialog —> showCollectorDialog()
After correcting, everything was running.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.