I need to open a simple modal dialog from the Confluence Page actions menu.
When the menu is clicked, the browser navigates to a new page and then properly displays the dialog.
I'd like to display the dialog on top of the current page and not navigate away from it.
Here are the relevant sections of atlassian-plugin.xml:
<xwork name="Plugin Actions" key="plugin-actions">
<package name="dialog" extends="pages" namespace="/pages/dialog">
<action name="dialog" class="com.elbitsystems.confluence.plugins.actions.DialogAction" method="doDefault">
<result name="input" type="velocity">/templates/actions/dialog.vm</result>
</action>
</package>
</xwork>
<web-item key="opendialog" name="opendialog" section="system.content.action/secondary" weight="1000">
<label key="plugin.dialog.name" />
<link linkId="opendialog">/pages/dialog/dialog.action?pageId=$page.id</link>
<styleClass>trigger-dialog</styleClass>
</web-item>
And this is dialog.vm template:
<section id="sample-dialog" class="aui-dialog2 aui-dialog2-medium">
<header class="aui-dialog2-header">
<h2 class="aui-dialog2-header-main">Dialog Heading</h2>
</header>
<div class="aui-dialog2-content">
This is the content...
</div>
<footer class="aui-dialog2-footer">
<div class="aui-dialog2-footer-actions">
<button id="dialog-submit-button" class="aui-button aui-button-primary">Submit</button>
<button class="aui-button aui-button-link close-dialog">Close</button>
</div>
</footer>
</section>
Any ideas?
Thank You,
Shay
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.