The issue collector allows to use a custom trigger. How do you actually setup the page such that if the user clicks on a link, the dialog box pops up ?
It was a bit confusing for me too. When creating a new issue collector and you select custom trigger, you see this snippet of code:
function(onclickHandler) { //Requries that jQuery is available! jQuery("#myCustomTrigger").click(function(e) { e.preventDefault(); onclickHandler(); }); }
In this case, you just need to change the name of "myCustomTrigger" to the id of what you want to use it with. For example, I chose this:
<a id="feedback-link">Feedback</a>
So I changed that code snippet to be this:
function(onclickHandler) { //Requries that jQuery is available! jQuery("#feedback-link").click(function(e) { e.preventDefault(); onclickHandler(); }); }
When you create the new collector, this snippet of code gets put INTO the script that you attach with html to the bottom of the page. All you need to do now is have your element on the screen and have the html snippet at the bottom of the page and you do NOT need to insert that javascript anywhere.
Hope this helps!
When I try to customize the link for the issue collector the default JIRA link always appears in the rendered page and what ever link I try to use does not invoke the collector window to appear. However, the JIRA default link always works.
My code:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery_v1_x.js"></script>
<script type="text/javascript" src="https://our_domain/s/132db92a7c4910b1b669ccc6291c9efa-T/en_US-p5m6n0/64025/11/1.4.27/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=d4401b08"></script>
<script type="text/javascript">
function(onclickHandler) {
jQuery(".button").click(function(e) {
e.preventDefault();
onclickHandler();
});
</script>
</head>
<body>
<input type="button" style="color:green" id="myCustomTrigger" class="button" value="test" />
</body>
</html>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI All,
Am using JIRA Issue collector in my .net web application. I have a specific requirement. I want to keep one issue collector for a set of pages and a diff issue collector for another set. One solution is embed separate scripts into each set. But its tedious as I have huge number of pages,
Can someone help me with a feasible solution..?
Any help would be greatly appreciate..
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
+1 for an example of adding a custom trigger to a html page.
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.