1
0
-1

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.

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Ok so I found the answer for this finally.

      For Project tab panels is used

      and for the User profile tab panels

      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.

        CommentAdd your comment...
      1.  
        1
        0
        -1

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

        1. Jakub Papcun

          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

        2. Jamie Echlin

          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.

        CommentAdd your comment...