|
|
|
|
@ -712,11 +712,15 @@ angular.module('$strap.directives').directive('bsTabs', [ |
|
|
|
|
scope.$watch(iAttrs.ngModel, function (newValue, oldValue) { |
|
|
|
|
if (angular.isUndefined(newValue)) |
|
|
|
|
return; |
|
|
|
|
console.log(oldValue +" -> "+ newValue); |
|
|
|
|
activeTab = newValue; |
|
|
|
|
setTimeout(function () { |
|
|
|
|
var $next = $($tabs[0].querySelectorAll('li')[newValue * 1]); |
|
|
|
|
if (!$next.hasClass('active')) { |
|
|
|
|
$next.children('a').tab('show'); |
|
|
|
|
// Check if we're still on the same tab before making the switch
|
|
|
|
|
if(activeTab === newValue) { |
|
|
|
|
var $next = $($tabs[0].querySelectorAll('li')[newValue * 1]); |
|
|
|
|
if (!$next.hasClass('active')) { |
|
|
|
|
$next.children('a').tab('show'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|