BUGFIX Setting cookie name in TabSet.js to avoid writing new cookies with arbitrary identifiers on every page load

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92529 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 02:31:13 +00:00
parent beb4efef09
commit b930fbfe20
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@
// Initialize jQuery UI tabs
this.tabs({
cookie: $.cookie ? { expires: 30, path: '/' } : false
cookie: $.cookie ? { expires: 30, path: '/', name: 'ui-tabs-' + this.attr('id') } : false
});
},
@ -26,7 +26,7 @@
$(this).find('ul a').each(function() {
var href = $(this).attr('href').replace(/.*(#.*)/, '$1');
if(href) $(this).attr('href', href);
})
});
}
});
})(jQuery);

View File

@ -1,4 +1,4 @@
<div class="ss-tabset">
<div class="ss-tabset" id="$id">
<ul>
<% control Tabs %>
<li class="$FirstLast $MiddleString"><a href="#$id" id="tab-$id">$Title</a></li>