Working on tab bar

This commit is contained in:
Max Lynch
2013-09-19 17:15:16 -05:00
parent ed5cb0ca5f
commit 31f25b4134
2 changed files with 2 additions and 6 deletions

View File

@ -90,6 +90,7 @@ TabBar.prototype = {
// Add an item to the tab bar // Add an item to the tab bar
addItem: function(item) { addItem: function(item) {
// Create a new TabItem
this.items.push(item); this.items.push(item);
this._bindEventsOnItem(item); this._bindEventsOnItem(item);
}, },

View File

@ -5,17 +5,12 @@ describe('TabBarController', function() {
var tabEl = $('<div class="tabs"></div>'); var tabEl = $('<div class="tabs"></div>');
ctrl = new TabBarController({ ctrl = new TabBarController({
tabBar: new TabBar({ tabBar: new TabBar({
el: tabEl.get(0), el: tabEl.get(0)
itemAdded: function(item) {
},
itemRemoved: function(item) {
}
}) })
}); });
}) })
it('Should add Controllers', function() { it('Should add Controllers', function() {
debugger;
ctrl.addController({ ctrl.addController({
title: 'Item 1', title: 'Item 1',
icon: 'icon-home', icon: 'icon-home',