ENHANCEMENT Storing last selected tab in a cookie for TabSet.js. Requires jquery.cookie plugin.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92508 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 02:30:21 +00:00
parent a32d473b53
commit 2a53488bb8
2 changed files with 4 additions and 1 deletions

View File

@ -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');

View File

@ -11,7 +11,9 @@
this.rewriteHashlinks();
// Initialize jQuery UI tabs
this.tabs();
this.tabs({
cookie: $.cookie ? { expires: 30, path: '/' } : false
});
},
/**