ionic restructure

This commit is contained in:
Adam Bradley
2013-08-29 09:13:07 -05:00
parent 54e6d98343
commit 852613cb82
83 changed files with 7885 additions and 3564 deletions

23
js/ionic-list.js Normal file
View File

@ -0,0 +1,23 @@
(function(window, document, ion) {
ion.List = function() {}
ion.List.prototype._TAB_ITEM_CLASS = 'tab-item';
ion.List.prototype._onTouchStart = function(event) {
console.log('Touch start!', event);
if(event.target && event.target.parentNode.classList.contains(this._TAB_ITEM_CLASS)) {
event.target.classList.add('active');
}
};
ion.List.prototype._onTouchEnd = function(event) {
console.log('Touch end!', event);
if(event.target && event.target.parentNode.classList.contains(this._TAB_ITEM_CLASS)) {
event.target.classList.remove('active');
}
};
document.addEventListener('mousedown', ion.List.prototype._onTouchStart);
document.addEventListener('touchstart', ion.List.prototype._onTouchStart);
document.addEventListener('touchend', ion.List.prototype._onTouchEnd);
})(this, document, ion = this.ion || {});