Started header bar view

This commit is contained in:
Max Lynch
2013-09-26 22:38:25 -05:00
parent 07b32b566d
commit 7b792d7d49
3 changed files with 54 additions and 1 deletions

22
dist/ionic.js vendored
View File

@ -1692,7 +1692,27 @@ if ( document.readyState === "complete" ) {
} }
}; };
})(window.ionic); })(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) { ionic.views.NavBar = function(opts) {
this.el = opts.el; this.el = opts.el;

View File

@ -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);

View File

@ -0,0 +1,13 @@
describe('HeaderBar View', function() {
beforeEach(function() {
var h = document.createElement('header');
h.innerHTML = '<a class="button">Click</a><h2 class="title">What what what</h2>';
h.appendChild('h1');
});
it('Should init', function() {
var bar = new ionic.views.HeaderBar({
el: h
});
});
});