diff --git a/dist/ionic.js b/dist/ionic.js index 41481e7a7a..f136fbe948 100644 --- a/dist/ionic.js +++ b/dist/ionic.js @@ -1692,7 +1692,27 @@ if ( document.readyState === "complete" ) { } }; })(window.ionic); -;;(function(ionic) { +;(function(ionic) { + +ionic.views.HeaderBar = function(opts) { + this.el = opts.el; + + this._titleEl = this.el.querySelector('.title'); +}; + +ionic.views.NavBar.prototype = { + resizeTitle: function() { + var e, + children = this.el.children, + index = Array.prototype.indexOf.call(children, this.el); + + for(var i = 0; i < index; i++) { + e = children[i]; + } + } +}; +})(window.ionic); +;(function(ionic) { ionic.views.NavBar = function(opts) { this.el = opts.el; diff --git a/js/views/headerBar.js b/js/views/headerBar.js index e69de29bb2..36894867ac 100644 --- a/js/views/headerBar.js +++ b/js/views/headerBar.js @@ -0,0 +1,20 @@ +(function(ionic) { + +ionic.views.HeaderBar = function(opts) { + this.el = opts.el; + + this._titleEl = this.el.querySelector('.title'); +}; + +ionic.views.NavBar.prototype = { + resizeTitle: function() { + var e, + children = this.el.children, + index = Array.prototype.indexOf.call(children, this.el); + + for(var i = 0; i < index; i++) { + e = children[i]; + } + } +}; +})(window.ionic); diff --git a/test/js/views/headerBar.unit.js b/test/js/views/headerBar.unit.js new file mode 100644 index 0000000000..26197860d8 --- /dev/null +++ b/test/js/views/headerBar.unit.js @@ -0,0 +1,13 @@ +describe('HeaderBar View', function() { + beforeEach(function() { + var h = document.createElement('header'); + h.innerHTML = 'Click