diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index da0012ab7046629db51606ebb59d16403d0d38bd..33ead173892beaec569da16fd229817bf6cb1b41 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -226,11 +226,14 @@ function ajaxTagUpdate(tag, remove) { function applyRecordTabHash() { var activeTab = $('ul.recordTabs li.active a').attr('id'); + var initiallyActiveTab = $('ul.recordTabs li.initiallyActive a').attr('id'); var newTab = typeof window.location.hash !== 'undefined' ? window.location.hash.toLowerCase() : ''; // Open tag in url hash - if (newTab.length > 0 && '#' + activeTab != newTab) { + if (newTab.length == 0 || newTab == '#tabnav') { + $('#' + initiallyActiveTab).click(); + } else if (newTab.length > 0 && '#' + activeTab != newTab) { $(newTab).click(); } } diff --git a/themes/bootstrap3/templates/record/view.phtml b/themes/bootstrap3/templates/record/view.phtml index 7ab2b83665832502c20383850af734162bb1937e..487dc44a715eb10f21f15a27e76c123db41ba50b 100644 --- a/themes/bootstrap3/templates/record/view.phtml +++ b/themes/bootstrap3/templates/record/view.phtml @@ -58,6 +58,7 @@ $tab_classes = array(); if (0 === strcasecmp($this->activeTab, $tab)) { $tab_classes[] = 'active'; + $tab_classes[] = 'initiallyActive'; $this->layout()->breadcrumbs .= '<li class="active">' . $this->transEsc($desc) . '</li>'; $activeTabObj = $obj; }