From b930fbfe20fb7f79acd7c24cee27cae29ef22a23 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 02:31:13 +0000 Subject: [PATCH] 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 --- javascript/TabSet.js | 4 ++-- templates/TabSetFieldHolder.ss | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/TabSet.js b/javascript/TabSet.js index 1b61ad27859..56ebaff4217 100644 --- a/javascript/TabSet.js +++ b/javascript/TabSet.js @@ -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); \ No newline at end of file diff --git a/templates/TabSetFieldHolder.ss b/templates/TabSetFieldHolder.ss index 303e6613721..3117242ed34 100644 --- a/templates/TabSetFieldHolder.ss +++ b/templates/TabSetFieldHolder.ss @@ -1,4 +1,4 @@ -
+