Skip to content

Commit 92ec1e7

Browse files
authored
CC-36695 Fix file attachment deletion and SSP API validation issues. (#139)
CC-36695 Fix file attachment deletion and SSP API validation issues.
1 parent 3b360bb commit 92ec1e7

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

assets/Zed/js/modules/libs/tabs.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22

3-
// TODO: add support for multi-tab navigation hash handling (e.g "/#tab1=tab-content-foo&tab2=tab-content-bar")
43
var bootstrap = require('bootstrap');
54

65
function Tabs(selector, onTabChange) {
@@ -11,6 +10,7 @@ function Tabs(selector, onTabChange) {
1110
this.onTabChange = onTabChange || function () {};
1211

1312
this.checkErrors();
13+
this.checkActivatedTab();
1414
this.setNavigation();
1515
this.mapChangeEvent();
1616
}
@@ -100,12 +100,20 @@ Tabs.prototype.checkActivatedTab = function () {
100100
var positionChanged = false;
101101
self.tabUrls.each(function () {
102102
var element = $(this);
103-
if (positionChanged === false && element.attr('href') === self.currentUrlHash) {
103+
104+
var tabTarget = element.closest(['data-bs-target']).data('bs-target') || element.attr('href');
105+
if (
106+
positionChanged === false &&
107+
(element.attr('href') === self.currentUrlHash || tabTarget === self.currentUrlHash)
108+
) {
104109
self.currentTabPosition = position;
105110

106111
positionChanged = true;
107112
self.activateTab(element, self.currentUrlHash);
108-
self.showHideNavigationButtons();
113+
114+
if (self.tabsContainer.data('isNavigable') === true) {
115+
self.showHideNavigationButtons();
116+
}
109117
}
110118
position++;
111119
});

0 commit comments

Comments
 (0)