From 9f9cf4fbb6b073f9dc3a105801b2de722fd04923 Mon Sep 17 00:00:00 2001 From: Alexander Shursha Date: Wed, 23 May 2018 16:06:24 +0300 Subject: [PATCH] Update history on tab state and implement navigation. --- .../mvc/app/views/OPNsense/Zerotier/overview.volt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/zerotier/src/opnsense/mvc/app/views/OPNsense/Zerotier/overview.volt b/net/zerotier/src/opnsense/mvc/app/views/OPNsense/Zerotier/overview.volt index d2f22c4fb..b12d07914 100644 --- a/net/zerotier/src/opnsense/mvc/app/views/OPNsense/Zerotier/overview.volt +++ b/net/zerotier/src/opnsense/mvc/app/views/OPNsense/Zerotier/overview.volt @@ -35,11 +35,18 @@ POSSIBILITY OF SUCH DAMAGE. $("#network_details_collapse_all").click(function() { $(".network_details").collapse('toggle'); }); - }); - $(document).ready(function() { + $("#peer_details_collapse_all").click(function() { $(".peer_details").collapse('toggle'); }); + + // update history on tab state and implement navigation + if(window.location.hash != "") { + $('a[href="' + window.location.hash + '"]').click() + } + $('.nav-tabs a').on('shown.bs.tab', function (e) { + history.pushState(null, null, e.target.hash); + }); });