The button, to pull up the issue collector, needs to be clicked twice in order for the collector to pop up.
running jQuery version 1.12.4
Current code:
In html file:
<button id="nameOfButton" (click)="nameOfButton">Name of Button</button>
In ts file:
import * as jQuery from 'jquery';
declare global {
interface Window {
ALT_JQ_PAGE_PROPS: any;
}
}
window.ALT_JQ_PAGE_PROPS = window.ALT_JQ_PAGE_PROPS || {};
@Component({ })
nameOfButton() {
jQuery.ajax({url: 'https://url/plugins/servlet/issueCollectorBootstrap.js?collectorId=numberid&locale=en_US',
type: 'get',
cache: true,
dataType: 'script',
})
triggerFunction: function (showCollectorDialog: any) {
//Requires that jQuery is available!
jQuery('#nameOfButton').on('click', function (e) {
e.preventDefault();
showCollectorDialog();
e.stopImmediatePropagation(); <- this is added by us to stop overlapping->
});
},
};
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.