diff options
| author | Tom Christie | 2013-08-30 09:20:12 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-08-30 09:20:12 +0100 | 
| commit | f3ab0b2b1d5734314dbe3cdd13cd7c4f0531bf7d (patch) | |
| tree | 608df7defbd0eb5930496791861abe4e16b8a17b /rest_framework | |
| parent | cba972911a90bdc0050bc48397bc70e1a062040d (diff) | |
| download | django-rest-framework-f3ab0b2b1d5734314dbe3cdd13cd7c4f0531bf7d.tar.bz2 | |
Browsable API tab preferences should be site-wide
Diffstat (limited to 'rest_framework')
| -rw-r--r-- | rest_framework/static/rest_framework/js/default.js | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/rest_framework/static/rest_framework/js/default.js b/rest_framework/static/rest_framework/js/default.js index a57b1cb8..bcb1964d 100644 --- a/rest_framework/static/rest_framework/js/default.js +++ b/rest_framework/static/rest_framework/js/default.js @@ -36,12 +36,12 @@ $('a[data-toggle="tab"]:not(:first)').on('shown', function (e) {  });  $('a[data-toggle="tab"]').click(function(){ -    document.cookie="tab=" + this.name; +    document.cookie="tabstyle=" + this.name + "; path=/";  });  // Store tab preference in cookies & display appropriate tab on load.  var selectedTab = null; -var selectedTabName = getCookie('tab'); +var selectedTabName = getCookie('tabstyle');  if (selectedTabName) {      selectedTab = $('.form-switcher a[name=' + selectedTabName + ']'); | 
