Find Questions…

Close ×
First time here? Check out the FAQ!

Is there any event fired when changing tab in projects view in JIRA 5.0?

Jakub Papcun asked this question · 111 karma ·

Hi,

I have a problem with javascript. I followed the steps to get rid of all $webResourceManager.requireResource in my velocity files on THIS PAGE. The problem is that I need to execute some javascript function after the content of some tab in projects view is all loaded. e.g.: I am on Road Map tab and I click on tab defined in our plug-in I need to execute this function after this page is loaded. Is there any kind of the event that is fired when I go through tabs (similar to "dialogContentReady" when opening popup window.)? I tried just "ready" event which is fired only on refresh of all tabs but not when going between tabs. "load" event doesn't work at all.

Thanks for any help.

710 views

2 Answers:

Jakub Papcun · 111 karma ·

Ok so I found the answer for this finally.

For Project tab panels is used

JIRA.Project.navigationTabs.addLoadEvent(tabId, function); 

and for the User profile tab panels

JIRA.TabManager.navigationTabs.addLoadEvent(tabId, function);

where tabId is the ID of the tab which we are switching to and function is the function that is to be executed after the tab is loaded.

Jamie Echlin · 48,651 karma ·

The linked page mentions JIRA.Events.NEW_CONTENT_ADDED - did you try that?

Jakub Papcun · 111 karma ·

Yes I did and tried everything mentioned on that page. It seems that I have some problems with <context>atl.general</context> as it caused some issue with plugin loading and it did't load while starting JIRA

Jamie Echlin · 48,651 karma ·

you could try the jquery aop plugin to hook into whatever function loads the content... I think you need to get your resource contexts working though.

Looking for something else?

Find Questions…

or Browse other questions tagged:

or Ask a Question