aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorTom Christie2013-08-30 09:20:12 +0100
committerTom Christie2013-08-30 09:20:12 +0100
commitf3ab0b2b1d5734314dbe3cdd13cd7c4f0531bf7d (patch)
tree608df7defbd0eb5930496791861abe4e16b8a17b /rest_framework
parentcba972911a90bdc0050bc48397bc70e1a062040d (diff)
downloaddjango-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.js4
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 + ']');