Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Open *.vm in a popup

Georg Steinmetz October 10, 2013

Hello again :)

I got a finished plugin, and it's working fine. Now I want it to be accessible. I already added a Webitem, and it opens a page with the atl.general decorator.

Now I tought it would be cool, if it opens as an overlay popup like the creat issue or create project dialog.

It is possible to add such a parameter to the Webitem?

Thank you

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Georg Steinmetz October 10, 2013

That looks great

How/where do you include the JavaScript?

John Bishop
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2013

We just keep the javascript in a .js file in src/main/resources/js.

I also forgot to mention that we also define the javascript file as a web resource in the atlassian-plugin.xml.

<web-resource key="SystemTestingPlugin-ExecuteIssueDialog" name="ExecuteIssueDialog">
    	<resource type="download" name="ExecuteIssueDialog.js" location="js/ExecuteIssueDialog.js" />
    	<context>atl.general</context>
    </web-resource>

Also don't forget to add the resource to your velocity template:

$webResourceManager.requireResource("com.csg.jira.plugins.SystemTestingPlugin:SystemTestingPlugin-ExecuteIssueDialog");

1 vote
John Bishop
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2013

For our popup webitems, we specify some javascript like this:

AJS.$(function () {
    JIRA.Dialogs.executeIssue = new JIRA.FormDialog({
        id: "execute-issue",
        trigger: "a.issueaction-execute-issue",
        ajaxOptions: JIRA.Dialogs.getDefaultAjaxOptions,
        onSuccessfulSubmit : JIRA.Dialogs.storeCurrentIssueIdOnSucessfulSubmit,
        issueMsg : 'thanks_issue_updated'
    });
});

Then in our atlassian-plugin.xml we define the webitem with a styleClass like this:

<web-item key="execute-test-group-item" name="Execute Test Group" section="tcopsbar-toplevel" weight="10">
				<resource  type="i18n" name="i18n" location="SystemTestingPlugin" />
				<description key="item.executetestgroup.desc" />
				<label key="item.executetestgroup.label" />	
				<styleClass>issueaction-execute-issue</styleClass>
				<link linkId="branchdefect.link">/secure/CSGSystemTestingExecute.jspa?issueType=TestGroup&parentIssueId=${issue.id}</link>
				<condition class="com.atlassian.jira.plugin.webfragment.conditions.IsIssueEditableCondition"/>
		        <condition class="com.atlassian.jira.plugin.webfragment.conditions.HasIssuePermissionCondition">
		            <param name="permission">create</param>
		        </condition>
			</web-item>

0 votes
Bharadwaj Jannu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2013
TAGS
AUG Leaders

Atlassian Community Events