Skip to content

Commit

Permalink
BUGFIX Setting cookie name in TabSet.js to avoid writing new cookies …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
chillu committed Nov 21, 2009
1 parent beb4efe commit b930fbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions javascript/TabSet.js
Expand Up @@ -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
});
},

Expand All @@ -26,7 +26,7 @@
$(this).find('ul a').each(function() {
var href = $(this).attr('href').replace(/.*(#.*)/, '$1');
if(href) $(this).attr('href', href);
})
});
}
});
})(jQuery);
2 changes: 1 addition & 1 deletion templates/TabSetFieldHolder.ss
@@ -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>
Expand Down

0 comments on commit b930fbf

Please sign in to comment.