mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
grunt
This commit is contained in:
parent
eb2a9da5b4
commit
5a5ab4c0de
2 changed files with 10 additions and 4 deletions
12
js/dist/tab.js
vendored
12
js/dist/tab.js
vendored
|
@ -45,10 +45,10 @@ var Tab = function ($) {
|
||||||
A: 'a',
|
A: 'a',
|
||||||
LI: 'li',
|
LI: 'li',
|
||||||
DROPDOWN: '.dropdown',
|
DROPDOWN: '.dropdown',
|
||||||
LIST: 'ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)',
|
LIST: 'ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu), .list-group:not(.dropdown-menu)',
|
||||||
FADE_CHILD: '> .nav-item .fade, > .fade',
|
FADE_CHILD: '> .nav-item .fade, > .list-group-item .fade, > .fade',
|
||||||
ACTIVE: '.active',
|
ACTIVE: '.active',
|
||||||
ACTIVE_CHILD: '> .nav-item > .active, > .active',
|
ACTIVE_CHILD: '> .nav-item > .active, > .list-group-item > .active, > .active',
|
||||||
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]',
|
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]',
|
||||||
DROPDOWN_TOGGLE: '.dropdown-toggle',
|
DROPDOWN_TOGGLE: '.dropdown-toggle',
|
||||||
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
|
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
|
||||||
|
@ -163,6 +163,9 @@ var Tab = function ($) {
|
||||||
Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
|
Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
|
||||||
if (active) {
|
if (active) {
|
||||||
$(active).removeClass(ClassName.ACTIVE);
|
$(active).removeClass(ClassName.ACTIVE);
|
||||||
|
if ($(active).hasClass('list-group-item')) {
|
||||||
|
$(active).find('a.nav-link').removeClass(ClassName.ACTIVE);
|
||||||
|
}
|
||||||
|
|
||||||
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
|
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
|
||||||
|
|
||||||
|
@ -174,6 +177,9 @@ var Tab = function ($) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(element).addClass(ClassName.ACTIVE);
|
$(element).addClass(ClassName.ACTIVE);
|
||||||
|
if ($(element.parentNode).hasClass('list-group-item')) {
|
||||||
|
$(element.parentNode).addClass(ClassName.ACTIVE);
|
||||||
|
}
|
||||||
element.setAttribute('aria-expanded', true);
|
element.setAttribute('aria-expanded', true);
|
||||||
|
|
||||||
if (isTransitioning) {
|
if (isTransitioning) {
|
||||||
|
|
2
js/dist/tab.js.map
vendored
2
js/dist/tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue