Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Displaying Content in a Dialog in JIRA: popup width

I have a web item in operations-top-level. I am using 'trigger-dialog' style class to show the content in a popup. The content comes from a velocity template backed by a webwork action.

The problem is the content is shown in a medium popup, I have checked it is using 'popup-width-medium' css class. The initial content fits within the provided with, but the popup provides some feature which dynamically adds html elemens and this is causing things getting stretched outside the popup area.

How can I increase the initial width of the popup. More specifically how can I tell Jira to use 'popup-width-large' css class to display my popup?

4 answers

1 accepted

2 votes
Answer accepted

I am using a new css class "trigger-dialog-large".


Then in my plugin.js I have:

(function(){

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, $ctx) {
	    initLargeDialogs($ctx);
});

function initLargeDialogs(context) {
		context.find("a.trigger-dialog-large").each(function () {
	        new JIRA.FormDialog({
	            trigger: this,
	            id: this.id + "-dialog",
	            ajaxOptions: {
	                url: this.href,
	                data: {
	                    decorator: "dialog",
	                    inline: "true"
	                }
	            },
	            widthClass: "large"
	        });
	    });
	}

})(jQuery)

Take care, that the web-resource that contains plugin.js needs <context>atl.general</context>.

I have the <styleClass>trigger-dialog</styleClass> property in the webitem declaration (atlassian-plugin.xml).

Where I need to add "trigger-dialog-large" property? In atlassian-plugin.xml or in style in html/vm screen?

In the web-item declaration, like this (taken from our self-written plugin):

&lt;web-item name="AnswerAllEmailItem" i18n-name-key="answer-all-email-item.name" key="answer-all-email-item" section="ennit-tools-web-section" weight="1070"&gt;
    &lt;description key="answer-all-email-item.description"&gt;The AnswerAll Plugin&lt;/description&gt;
    &lt;conditions type="AND"&gt;
      &lt;condition class="de.ennit.atlassian.jira.web.condition.IsEmailSendingAllowedCondition"/&gt;
      &lt;condition class="de.ennit.atlassian.jira.web.condition.IsAnswerAllPossibleCondition"/&gt;
    &lt;/conditions&gt;
    &lt;styleClass&gt;trigger-dialog-large&lt;/styleClass&gt;
    &lt;label key="answer-all-email-item.label"/&gt;
    &lt;link linkId="answer-all-email-item-link"&gt;/secure/SendCustomerEmailAction!default.jspa?id=${issueId}&amp;amp;answerAll=true&lt;/link&gt;
    &lt;tooltip key="answer-all-email-item.tooltip"/&gt;
    &lt;param name="isPopupLink" value="true"/&gt;
  &lt;/web-item&gt;

Hi Carsten!

Thank you very much! You reply me very fast. I couldn’t have done it without you”.

I owe you!”

I have the <styleClass>trigger-dialog</styleClass> property in the webitem declaration (atlassian-plugin.xml).

Where I need to add "trigger-dialog-large" property? In atlassian-plugin.xml or in style in html/vm screen?

Hi Carsten!

Thank you very much! You reply me very fast. I couldn’t have done it without you”.

I owe you!”

Hi Carsten,

This is very nice to solve this problem. But still the width is fixed to some size. Can I have a customize the width and increase it?

 

Thanks,

Manikandan

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you