Howdy,
I am trying to modify the default trigger button that calls the collector form from a Confluence page.
I am not into development and web development specifically, so most of JavaScript stuff is all greek to me. I'd appreaciate your help greately.
So I have created a new Collector in Jira and set the trigger to Custom.
Then I have added a Markdown macro to the Confluence page where I want to modify the trigger button. The macro should allow me to inject JavaScript into the page.
Inside the Markdown macro I have added the following script:
<script src="https://code.jquery.com/jquery-latest.js"></script>
<script>
jQuery.ajax({
url: "https://example.net/jira/s/9513b004b8a6dcfc358427f3364b533d-T/ -786kzr/76010/be09033ea7858348cd8d5cdeb793189a/2.0.27/_/download/batch/ com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/ com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js? locale=en-UK&collectorId=1cba1cab",
type: "get",
cache: true,
dataType: "script"
});
window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function(showCollectorDialog) {
jQuery("#myCustomTrigger").click(function(e) {
e.preventDefault();
showCollectorDialog();
});
}};
/* Tried this one as well, but no cigar
window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
// ==== custom trigger function ====
triggerFunction : function( showCollectorDialog ) {
$('#feedback-button').on( 'click', function(e) {
e.preventDefault();
showCollectorDialog();
});
// add any other custom triggers for the issue collector here
}
}); */
</script>
<body>
<h2>JIRA Issue Collector Demo</h2>
<a href="#" id="feedback-button" class='btn btn-primary btn-large'>Report feedback</a>
</body> |
However, when I click the Report Feedback link-button, nothing happens, Jira Issue Collector's form does not show up.
What am I doing wrong here? TIA.