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

question about aui tabs

Hi

I use AUI tabs to show 3 confiform tableview in 3 tabs. As describe in AUI.atlassian documentation there is on active (or main tab) and three other. MY pb is when I work in confiform table (table3 or 2 show in tab3 or 2) each time confiform refresh page it always return on First tab not on last tab used.

someone can help me to rest on current tab even if confiform refresh page after a new record ?

thx 

1 answer

1 accepted

I believe you can tell what tab should be active, and that is by adding #tabname to the url

Which means you can probably set ConfiForms to redirect (via IFTTT rule, for example) on submit (create/modify) to the url you need

Alex

Nop, it doesnt work. Even if I manually enter URL#tabname I have good URL in address bar but the page show always the the tab that was defined as active tab...

I think it s necessary to change active tab with js or jql but I don't know well scripts languages

I am not a pro in Atlassian aui tabs and this is really not my cup of tea, but after a bit of a research I think that this little script could help

<script type="text/javascript"> 
AJS.toInit(function () {
initTabFor();

AJS.$(window).on('hashchange', function() {
initTabFor();
});
});

function initTabFor() {
var hash = AJS.$(window.location).attr('hash');
if (hash !== '') {
AJS.tabs.change(jQuery('a[href="' + hash + '"]'));
}
}
</script>

You will need to put it on your page - what it does is, it reads the anchor from the URL and tells the tabs to "switch" to this anchor

Obviously the anchor needs to be the same as the ID of a tab

The example is based on the https://aui.atlassian.com/aui/8.5/docs/tabs.html 

Hope it helps

Alex

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

218 views 0 6
Read article

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