From 31f25b413407c73d38273219c4ffcfdcc951fffb Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Thu, 19 Sep 2013 17:15:16 -0500 Subject: [PATCH] Working on tab bar --- hacking/TabBar.js | 1 + hacking/TabBarController.unit.js | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) 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',