Unable to add Dialog2 in vm template in jira

Hi all,

I am unable to use dialog2 in vm template . I am using jira 6.1.4

I am using

Atlassian-plugin.xml

<web-resource key="dialog" name="AUI DIALOG">

<dependency>com.atlassian.auiplugin:dialog2</dependency>

<dependency>com.atlassian.auiplugin:ajs</dependency>

</web-resource>

In VM
$webResourceManager.requireResource("com.test.application.testmanagement:dialog")
<script>
function showDialog(){
alert('hello');
AJS.dialog2("#demo-dialog").show();
}
// Hides the dialog
AJS.$("#dialog-close-button").click(function(e) {
e.preventDefault();
AJS.dialog2("#demo-dialog").hide();
});
</script>
<button id="dialog-show-button" class="aui-button aui-button-primary" onclick="showDialog();">Execute</button>
<section role="dialog" id="demo-dialog" class="aui-layer aui-dialog2 aui-dialog2-medium" aria-hidden="true">
<!-- Dialog header -->
<header class="aui-dialog2-header">
<!-- The dialog's title -->
<h1 class="aui-dialog2-header-main">Hello World</h1>
<!-- Actions to render to the left of the title -->
<div class="aui-dialog2-header-actions">
<button id="demo-header-action" class="aui-button">Header Action</button>
</div>
<!-- Actions to render on the right of the header -->
<div class="aui-dialog2-header-secondary">
<input id="demo-search" type="text" name="search">
</div>
<!-- Close icon -->
<a class="aui-dialog2-header-close">
<span class="aui-icon aui-icon-small aui-iconfont-close-dialog">Close</span>
</a>
</header>
<!-- Main dialog content -->
<div class="aui-dialog2-content">
<p>Hello World</p>
</div>
<!-- Dialog footer -->
<footer class="aui-dialog2-footer">
<!-- Actions to render on the right of the footer -->
<div class="aui-dialog2-footer-actions">
<button id="dialog-close-button" class="aui-button aui-button-link">Close</button>
</div>
<!-- Hint text is rendered on the left of the footer -->
<div class="aui-dialog2-footer-hint">this is a hint</div>
</footer>
</section>

1 answer

I am using refrence of https://docs.atlassian.com/aui/5.4.1/docs/dialog2.html

Its urgent Can anybody help me

thanks

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 Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

650 views 6 12
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