From d3e388e7e46eab117d04eccc4346ee36829b3dca Mon Sep 17 00:00:00 2001
From: Bryan Brancotte <bryan.brancotte@pasteur.fr>
Date: Mon, 25 May 2020 14:36:06 +0200
Subject: [PATCH] Open the correct tab, useful for settings panel

---
 basetheme_bootstrap/static/js/basetheme_bootstrap.js | 7 +++++++
 setup.py                                             | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/basetheme_bootstrap/static/js/basetheme_bootstrap.js b/basetheme_bootstrap/static/js/basetheme_bootstrap.js
index d592707..3b1abe7 100644
--- a/basetheme_bootstrap/static/js/basetheme_bootstrap.js
+++ b/basetheme_bootstrap/static/js/basetheme_bootstrap.js
@@ -98,3 +98,10 @@ $(window).on("scroll", function() {
     $("header").removeClass("scrolled");
   }
 });
+
+$(document).ready(function(){
+    let url = document.location.toString();
+    if ( url.match('#') ) {
+        $('.nav-tabs a.nav-item[href="#'+url.split('#')[1] + '"]').tab('show');
+    }
+});
diff --git a/setup.py b/setup.py
index f736322..2498232 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ readme = open('README.rst').read()
 
 setup(
     name='django-basetheme-bootstrap',
-    version='0.2.35',
+    version='0.2.36',
     description='Django Basetheme Bootstrap',
     long_description=readme,
     author='Bryan Brancotte',
-- 
GitLab