Hi,
I add a Web-item in issue page, and I expect when I click the button, a new window pops up, but until now, it doesn't work. My code looks like:
<web-item key="My key" name="web item name" section="operations-top-level">
<condition class="com.aa.condition">
</condition>
<label>my button</label>
<tooltip >This is my button</tooltip>
<link target="_blank">/spt/newReview.jspa?issueId=$issue.id</link>
</web-item>
It seems the 'target' attribute is invalid, so is there anyone know how to make a popup window for a web item?
Thanks a lot!
Community moderators have prevented the ability to post new answers.
Conrad's method does not work for JIRA 6.2, but I've found another solution. Adding code below to web-item does the job.
<param name="target" value="_blank" />
Is this working on jira 5.1? Can you post the code <web-item>code here</web-item>here where to place the one liner code above?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is my full solution
<web-item key="cool_link" name="Cool link" section="cool_links/cool_links_first_section" weight="10"> <label>Cool link</label> <link linkId="atlassian_cool_link">http://atlassian.com</link> <param name="target" value="_blank" /> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> </web-item>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Inide your web-item add the following line,
<styleClass>aui-list-item-link issueaction-link-issue opsbar-operations</styleClass>
You page should be displayed as a overlayed popup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How to do the same for Confluence. I want a popup on click of some webitem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right about target not being a valid attribute.
You can inject some javascript via the link href. It's not the prettiest but it seems to work for us. here's an example web-item link that opens a new window from a menu item.
<web-item key="jira_doco_link" name="Jira Documentation Link" section="atlassian_down_menu/atlassian_jira_section"> <label>Documentation</label> <link linkId="jira_doco_linkid">javascript:window.open('http://docs.atlassian.com/jira-latest/', 'atlassian_win').focus();</link> </web-item>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Matthew, I tried your 'javascript:window.open()' code in JIRA 5.1.5.
Unfortunately, it does not work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You didn't specify which version in your question so I had gave something generic. if I have time, I'll see what I can do next week. In the meantine, can you paste up the HTML snippet it generated?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Matther.
I found a solution with a few problems.
The code below works.
javascript:void(window.open('/secure/viewIssuePage.jspa?issueId=$issue.id&issueKey=$issue.key','test','width=100, height=100'));
Your solution is right, but it seems not to work on several browsers.
The javascript is dependent on a browser type.
But my solution also has a problem. It pops up a child window on Firefox, but unexpectedly opens a new tab browser instance on IE.
I think a javascript-based solution is not a right answer to this question.
Lei and I want a CSS-based pop-up window like below, not a browser-based one.
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.
Re you using jira 6.2 also? Can you paste here the code you are using taht has the character escaping?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of using JS you could add
" target="_blank
to your link in your xml:
<link linkId="foo">http://my-link.com/bar.pdf" target="_blank</link>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, hey!
Take a look at this article: http://leonardinius.galeoconsulting.com/2011/01/howto-reusing-jira-gadgets-on-issue_10.html
There is js code, which can help you.
Have a nice day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think it's possible directly via a web-item. "target" attribute won't work.
They way how I worked around it is to use Javascript snipped (injected into view issue context) and JQuery to dynamically change the onclick behaviour on the link generated by the plugin framework from such web-item declaration.
You can also use AUI (namely its JIRA.FormDialog) to open standard JIRA popup (which grays out the entire screen).
Fee free to take a look at jira-view-issue-plugin (in source JIRA distribution) and add-attachments-link web-item there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you briefly explain how to add AUI to open standart Jira Popup to a link? Can't get it, thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.