mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Fixed TabSet.js initialisation with cookies, default to first tab rather than allowing tab deselects through an index of -1
This commit is contained in:
parent
a62881a137
commit
34d3f29a95
@ -17,11 +17,12 @@
|
||||
redrawTabs: function() {
|
||||
this.rewriteHashlinks();
|
||||
|
||||
// Initialize jQuery UI tabs
|
||||
var id = this.attr('id');
|
||||
this.tabs({
|
||||
cookie: ($.cookie && id) ? { expires: 30, path: '/', name: 'ui-tabs-' + id } : false
|
||||
});
|
||||
var id = this.attr('id'), cookieId = 'ui-tabs-' + id;
|
||||
|
||||
// Fix for wrong cookie storage of deselected tabs
|
||||
if($.cookie && id && $.cookie(cookieId) == -1) $.cookie(cookieId, 0);
|
||||
|
||||
this.tabs({cookie: ($.cookie && id) ? { expires: 30, path: '/', name: cookieId } : false});
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user