diff --git a/forms/TabSet.php b/forms/TabSet.php index 3f7b8beaa..6ae705cc0 100644 --- a/forms/TabSet.php +++ b/forms/TabSet.php @@ -54,6 +54,7 @@ class TabSet extends CompositeField { Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/ui.core.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/ui.tabs.js'); + Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-cookie/jquery.cookie.js'); Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/ui.all.css'); Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/ui.tabs.css'); diff --git a/javascript/TabSet.js b/javascript/TabSet.js index 538ff2f5c..d85ecd5b6 100644 --- a/javascript/TabSet.js +++ b/javascript/TabSet.js @@ -11,7 +11,9 @@ this.rewriteHashlinks(); // Initialize jQuery UI tabs - this.tabs(); + this.tabs({ + cookie: $.cookie ? { expires: 30, path: '/' } : false + }); }, /**