mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
beb4efef09
commit
b930fbfe20
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
// Initialize jQuery UI tabs
|
// Initialize jQuery UI tabs
|
||||||
this.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() {
|
$(this).find('ul a').each(function() {
|
||||||
var href = $(this).attr('href').replace(/.*(#.*)/, '$1');
|
var href = $(this).attr('href').replace(/.*(#.*)/, '$1');
|
||||||
if(href) $(this).attr('href', href);
|
if(href) $(this).attr('href', href);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
@ -1,4 +1,4 @@
|
|||||||
<div class="ss-tabset">
|
<div class="ss-tabset" id="$id">
|
||||||
<ul>
|
<ul>
|
||||||
<% control Tabs %>
|
<% control Tabs %>
|
||||||
<li class="$FirstLast $MiddleString"><a href="#$id" id="tab-$id">$Title</a></li>
|
<li class="$FirstLast $MiddleString"><a href="#$id" id="tab-$id">$Title</a></li>
|
||||||
|
Loading…
Reference in New Issue
Block a user