Adding jQuery tab on JIRA welcome message

eKyNoX January 7, 2013

Hello,

I try to add a simple jQuery code in my JIRA welcome message composed by :

- a little jQuery link and script in the head section of JIRA, put at the end of head-common.jsp

<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<script>
    $(function() {
        $( "#tabs" ).tabs();
    });
    </script>

- and on welcome message html editing from admin section :

<div id="tabs">
    <ul>
        <li><a href="#tabs-1">Tab1.</a></li>
        <li><a href="#tabs-2">Tab2.</a></li>
    </ul>
    <div id="tabs-1">
        <p>Tab1.</p>
    </div>
    <div id="tabs-2">
        <p>Tab2.</p>
    </div>
</div>

When I'm on welcome message administration page editing, the tabs appears correctly :

But when on index JIRA page, it does not appear :

And I don't know what is blocking, so if you can help me with it ?

Thanks anyway.

2 answers

0 votes
uuuu September 25, 2013

Perhaps AUI flatpack could be another option. I've had issues getting jQuery to load so going to try AUI. check their AUI sandbox for samples of what all you can do with it.

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2013

I would put my thumb that the javascript loading sequence is not correct. You'd be better off creating your own gadget.

If you check the sequence of load using Chrome's Developer Tools, you will notice that your jQuery UI loads last.

eKyNoX January 7, 2013

I tried to put the script lines at the top of head-common.jsp, now it loads from the first lines of the page. No changes.

Then you can check directly : http://ekynoxx-studios.dyndns.org:8080/secure/Dashboard.jspa

With no account, welcome pane appears.

I'll be glad to make a gadget but I must revise my java skills and check api. So why not later.

eKyNoX January 8, 2013

Any other suggestion ? Thanks.

eKyNoX January 16, 2013

No news ? please ?

Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2013

Sorry. Must have missed this.

Have you tried to get your script to load the UI script (http://api.jquery.com/jQuery.getScript/)?

Suggest an answer

Log in or Sign up to answer