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() {
|
redrawTabs: function() {
|
||||||
this.rewriteHashlinks();
|
this.rewriteHashlinks();
|
||||||
|
|
||||||
// Initialize jQuery UI tabs
|
var id = this.attr('id'), cookieId = 'ui-tabs-' + id;
|
||||||
var id = this.attr('id');
|
|
||||||
this.tabs({
|
// Fix for wrong cookie storage of deselected tabs
|
||||||
cookie: ($.cookie && id) ? { expires: 30, path: '/', name: 'ui-tabs-' + id } : false
|
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