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

Commit

Permalink
fix(tabs): remove tabbable class required for left/right tabs
Browse files Browse the repository at this point in the history
Closes #1708
  • Loading branch information
bekos authored and pkozlowski-opensource committed Jan 31, 2014
1 parent ab0387c commit 1946833
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
39 changes: 18 additions & 21 deletions src/tabs/test/tabs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,23 @@ describe('tabs', function() {
scope.deselectFirst = jasmine.createSpy();
scope.deselectSecond = jasmine.createSpy();
elm = $compile([
'<div>',
' <tabset class="hello" data-pizza="pepperoni">',
' <tab heading="First Tab {{first}}" active="actives.one" select="selectFirst()" deselect="deselectFirst()">',
' first content is {{first}}',
' </tab>',
' <tab active="actives.two" select="selectSecond()" deselect="deselectSecond()">',
' <tab-heading><b>Second</b> Tab {{second}}</tab-heading>',
' second content is {{second}}',
' </tab>',
' </tabset>',
'</div>'
'<tabset class="hello" data-pizza="pepperoni">',
' <tab heading="First Tab {{first}}" active="actives.one" select="selectFirst()" deselect="deselectFirst()">',
' first content is {{first}}',
' </tab>',
' <tab active="actives.two" select="selectSecond()" deselect="deselectSecond()">',
' <tab-heading><b>Second</b> Tab {{second}}</tab-heading>',
' second content is {{second}}',
' </tab>',
'</tabset>'
].join('\n'))(scope);
scope.$apply();
return elm;
}));

it('should pass class and other attributes on to tab template', function() {
var tabbable = elm.find('.tabbable');
expect(tabbable).toHaveClass('hello');
expect(tabbable.attr('data-pizza')).toBe('pepperoni');
expect(elm).toHaveClass('hello');
expect(elm.attr('data-pizza')).toBe('pepperoni');
});

it('should create clickable titles', function() {
Expand Down Expand Up @@ -680,15 +677,15 @@ describe('tabs', function() {
var scope = $rootScope.$new();
elm = $compile([
'<div>',
' <tabset>',
' <tabset class="tabbable">',
' <tab heading="Tab 1">',
' <tabset>',
' <tabset class="tabbable">',
' <tab heading="Tab 1A">',
' </tab>',
' </tabset>',
' </tab>',
' <tab heading="Tab 2">',
' <tabset>',
' <tabset class="tabbable">',
' <tab heading="Tab 2A">',
' </tab>',
' </tabset>',
Expand All @@ -710,19 +707,19 @@ describe('tabs', function() {
scope.tab2aaText = '456';
elm = $compile([
'<div>',
' <tabset>',
' <tabset class="tabbable">',
' <tab heading="Tab 1">',
' <tabset>',
' <tabset class="tabbable">',
' <tab heading="{{ tab1aHead }}">',
' {{ tab1aText }}',
' </tab>',
' </tabset>',
' <span class="tab-1">{{ tab1Text }}</span>',
' </tab>',
' <tab heading="Tab 2">',
' <tabset>',
' <tabset class="tabbable">',
' <tab heading="Tab 2A">',
' <tabset>',
' <tabset class="tabbable">',
' <tab heading="Tab 2AA">',
' <span class="tab-2aa">{{ tab2aaText }}</span>',
' </tab>',
Expand Down
2 changes: 1 addition & 1 deletion template/tabs/tabset.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="tabbable">
<div>
<ul class="nav nav-{{type || 'tabs'}}" ng-class="{'nav-stacked': vertical, 'nav-justified': justified}" ng-transclude></ul>
<div class="tab-content">
<div class="tab-pane"
Expand Down

0 comments on commit 1946833

Please sign in to comment.