Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 1946833

Browse files
bekospkozlowski-opensource
authored andcommitted
fix(tabs): remove tabbable class required for left/right tabs
Closes #1708
1 parent ab0387c commit 1946833

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

src/tabs/test/tabs.spec.js

+18-21
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,23 @@ describe('tabs', function() {
3737
scope.deselectFirst = jasmine.createSpy();
3838
scope.deselectSecond = jasmine.createSpy();
3939
elm = $compile([
40-
'<div>',
41-
' <tabset class="hello" data-pizza="pepperoni">',
42-
' <tab heading="First Tab {{first}}" active="actives.one" select="selectFirst()" deselect="deselectFirst()">',
43-
' first content is {{first}}',
44-
' </tab>',
45-
' <tab active="actives.two" select="selectSecond()" deselect="deselectSecond()">',
46-
' <tab-heading><b>Second</b> Tab {{second}}</tab-heading>',
47-
' second content is {{second}}',
48-
' </tab>',
49-
' </tabset>',
50-
'</div>'
40+
'<tabset class="hello" data-pizza="pepperoni">',
41+
' <tab heading="First Tab {{first}}" active="actives.one" select="selectFirst()" deselect="deselectFirst()">',
42+
' first content is {{first}}',
43+
' </tab>',
44+
' <tab active="actives.two" select="selectSecond()" deselect="deselectSecond()">',
45+
' <tab-heading><b>Second</b> Tab {{second}}</tab-heading>',
46+
' second content is {{second}}',
47+
' </tab>',
48+
'</tabset>'
5149
].join('\n'))(scope);
5250
scope.$apply();
5351
return elm;
5452
}));
5553

5654
it('should pass class and other attributes on to tab template', function() {
57-
var tabbable = elm.find('.tabbable');
58-
expect(tabbable).toHaveClass('hello');
59-
expect(tabbable.attr('data-pizza')).toBe('pepperoni');
55+
expect(elm).toHaveClass('hello');
56+
expect(elm.attr('data-pizza')).toBe('pepperoni');
6057
});
6158

6259
it('should create clickable titles', function() {
@@ -680,15 +677,15 @@ describe('tabs', function() {
680677
var scope = $rootScope.$new();
681678
elm = $compile([
682679
'<div>',
683-
' <tabset>',
680+
' <tabset class="tabbable">',
684681
' <tab heading="Tab 1">',
685-
' <tabset>',
682+
' <tabset class="tabbable">',
686683
' <tab heading="Tab 1A">',
687684
' </tab>',
688685
' </tabset>',
689686
' </tab>',
690687
' <tab heading="Tab 2">',
691-
' <tabset>',
688+
' <tabset class="tabbable">',
692689
' <tab heading="Tab 2A">',
693690
' </tab>',
694691
' </tabset>',
@@ -710,19 +707,19 @@ describe('tabs', function() {
710707
scope.tab2aaText = '456';
711708
elm = $compile([
712709
'<div>',
713-
' <tabset>',
710+
' <tabset class="tabbable">',
714711
' <tab heading="Tab 1">',
715-
' <tabset>',
712+
' <tabset class="tabbable">',
716713
' <tab heading="{{ tab1aHead }}">',
717714
' {{ tab1aText }}',
718715
' </tab>',
719716
' </tabset>',
720717
' <span class="tab-1">{{ tab1Text }}</span>',
721718
' </tab>',
722719
' <tab heading="Tab 2">',
723-
' <tabset>',
720+
' <tabset class="tabbable">',
724721
' <tab heading="Tab 2A">',
725-
' <tabset>',
722+
' <tabset class="tabbable">',
726723
' <tab heading="Tab 2AA">',
727724
' <span class="tab-2aa">{{ tab2aaText }}</span>',
728725
' </tab>',

template/tabs/tabset.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
<div class="tabbable">
2+
<div>
33
<ul class="nav nav-{{type || 'tabs'}}" ng-class="{'nav-stacked': vertical, 'nav-justified': justified}" ng-transclude></ul>
44
<div class="tab-content">
55
<div class="tab-pane"

0 commit comments

Comments
 (0)