mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-07-01 17:09:38 +02:00
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92484 467b73ca-7a2a-4603-9d3b-597d59a354a9
18 lines
551 B
JavaScript
18 lines
551 B
JavaScript
jQuery(document).ready(function () {
|
|
/**
|
|
* Replace prefixes for all hashlinks in tabs.
|
|
* SSViewer rewrites them from "#Root_MyTab" to
|
|
* e.g. "/admin/#Root_MyTab" which makes them
|
|
* unusable for jQuery UI.
|
|
*/
|
|
jQuery('.ss-tabset > ul a').each(function() {
|
|
var href = jQuery(this).attr('href').replace(/.*(#.*)/, '$1');
|
|
jQuery(this).attr('href', href);
|
|
})
|
|
|
|
// Initialize tabset
|
|
jQuery('.ss-tabset').tabs();
|
|
|
|
// if tab has no nested tabs, set overflow to auto
|
|
jQuery('.ss-tabset .tab').not(':has(.tab)').css('overflow', 'auto');
|
|
}); |