diff --git a/hacking/TabBar.js b/hacking/TabBar.js index c37d2433f3..999eed0c6f 100644 --- a/hacking/TabBar.js +++ b/hacking/TabBar.js @@ -90,6 +90,7 @@ TabBar.prototype = { // Add an item to the tab bar addItem: function(item) { + // Create a new TabItem this.items.push(item); this._bindEventsOnItem(item); }, diff --git a/hacking/TabBarController.unit.js b/hacking/TabBarController.unit.js index 296a44ab54..fa1560f601 100644 --- a/hacking/TabBarController.unit.js +++ b/hacking/TabBarController.unit.js @@ -5,17 +5,12 @@ describe('TabBarController', function() { var tabEl = $('
'); ctrl = new TabBarController({ tabBar: new TabBar({ - el: tabEl.get(0), - itemAdded: function(item) { - }, - itemRemoved: function(item) { - } + el: tabEl.get(0) }) }); }) it('Should add Controllers', function() { - debugger; ctrl.addController({ title: 'Item 1', icon: 'icon-home',