how do I exit a dialog?

I'm writing a web-item plugin which triggers a dialog. the web-item is connected to a webwork action.

The pugin creates an Issue and would usually redirect to the new Issue. At first I didn't have a dialog and it worked perfectly. Now that I implemented the dialog it redirects to the new Issue INSIDE the dialog. How can I tell my plugin to close the dialog instead of showing the site inside it?

3 answers

Not answering your direct question but when I do dialogs they are all javascript but the dialog is populated via soy templates. The dialog itself grabs the data and communicates to the server via REST.

It's then trivial to save out the info via POSTs to a REST interface and close the dialog in success via javascript

For your actual question, can't you grab hold of the 'submit', or whatever equivalent button your populating your UI with, using JQuery and on that event close the dialog?

that should be possible, shouldn't it?

can you tell me how I exit the dialog using a button? I don't exactly have much experience with Javascript and HTML. Also is it possible to trigger the dialog closing event when pressing enter?

dialog.hide();

seriously I'm still desperate. I can't even find a Javascriptmethod that closes a dialog.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,138 views 0 8
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you