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

0 vote
Colin Goudie Community Champion Apr 21, 2013

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

0 vote
Colin Goudie Community Champion Apr 21, 2013

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?

Colin Goudie Community Champion Apr 25, 2013

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

179 views 0 4
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