Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

JS can't access elements from the vm file

Hello, I have a Jira velocity page which is supposed to define an aui-dialog2 popup window element as it is shown here https://aui.atlassian.com/aui/9.2.0/docs/dialog2.html

Then I have a JS file trying to reach the element from vm file to show the dialog as a popup window. 

JS.toInit(function () {
AJS.$("#dialog-show-button").on('click', function(e) {
e.preventDefault();
AJS.dialog2("#demo-dialog").show();
});

});

Velocity page works fine as it is a part of the webwork module but the dialog won't show up. I'm not sure how to link these two files together to make it work. I tried to put these $webResourceManager.requireResource and $webResourceManager.requireResourcesForContext commands to make it work but nothing seems to work. The JS works okay in other scenarious but can't acces the webwork module files (elements). So is there any way how to show the velocity page as a window popup after clicking any button?

0 answers

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