diff --git a/dist/ionic.js b/dist/ionic.js index c31ddfea4c..f86caafee0 100644 --- a/dist/ionic.js +++ b/dist/ionic.js @@ -1666,6 +1666,36 @@ window.ionic = { } }; })(window.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, + j, + i, + title, + titleWidth, + children = this.el.children; + + for(i = 0, j = children.length; i < j; i++) { + e = children[i]; + if(/h\d/.test(e.nodeName.toLowerCase())) { + title = e; + } + } + + titleWidth = title.offsetWidth; + } + }; + +})(ionic); ;(function(ionic) { ionic.views.NavBar = function(opts) { @@ -1710,34 +1740,29 @@ ionic.views.NavBar.prototype = { })(window.ionic); ;(function(ionic) { - ionic.views.HeaderBar = function(opts) { - this.el = opts.el; +ionic.views = ionic.views || {}; - this._titleEl = this.el.querySelector('.title'); - }; +ionic.views.SideMenu = function(opts) { + this.el = opts.el; + this.width = opts.width; + this.isEnabled = opts.isEnabled || true; +}; - ionic.views.NavBar.prototype = { - resizeTitle: function() { - var - e, - j, - i, - title, - titleWidth, - children = this.el.children; - - for(i = 0, j = children.length; i < j; i++) { - e = children[i]; - if(/h\d/.test(e.nodeName.toLowerCase())) { - title = e; - } - } - - titleWidth = title.offsetWidth; - } - }; - -})(ionic); +ionic.views.SideMenu.prototype = { + getFullWidth: function() { + return this.width; + }, + setIsEnabled: function(isEnabled) { + this.isEnabled = isEnabled; + }, + bringUp: function() { + this.el.style.zIndex = 0; + }, + pushDown: function() { + this.el.style.zIndex = -1; + } +}; +})(window.ionic); ;(function(ionic) { ionic.views.TabBarItem = function(el) { @@ -1938,31 +1963,6 @@ ionic.views.TabBar.prototype = { } }; -})(window.ionic); -;(function(ionic) { - -ionic.views = ionic.views || {}; - -ionic.views.SideMenu = function(opts) { - this.el = opts.el; - this.width = opts.width; - this.isEnabled = opts.isEnabled || true; -}; - -ionic.views.SideMenu.prototype = { - getFullWidth: function() { - return this.width; - }, - setIsEnabled: function(isEnabled) { - this.isEnabled = isEnabled; - }, - bringUp: function() { - this.el.style.zIndex = 0; - }, - pushDown: function() { - this.el.style.zIndex = -1; - } -}; })(window.ionic); ; (function(ionic) { @@ -2410,61 +2410,3 @@ ionic.controllers.TabBarController.prototype = { } })(ionic = window.ionic || {}); -;(function(window, document, ionic) { - - // polyfill use to simulate native "tap" - function inputTapPolyfill(ele, e) { - if(ele.type === "radio" || ele.type === "checkbox") { - ele.checked = !ele.checked; - } else if(ele.type === "submit" || ele.type === "button") { - ele.click(); - } else { - ele.focus(); - } - e.stopPropagation(); - e.preventDefault(); - return false; - } - - function tapPolyfill(e) { - // if the source event wasn't from a touch event then don't use this polyfill - if(!e.gesture || e.gesture.pointerType !== "touch") return; - - var - e = e.gesture.srcEvent, // evaluate the actual source event, not the created event by gestures.js - ele = e.target; - - if(!e) return; - - while(ele) { - if( ele.tagName === "INPUT" || ele.tagName === "TEXTAREA" || ele.tagName === "SELECT" ) { - return inputTapPolyfill(ele, e); - } else if( ele.tagName === "LABEL" ) { - if(ele.control) { - return inputTapPolyfill(ele.control, e); - } - } else if( ele.tagName === "A" || ele.tagName === "BUTTON" ) { - ele.click(); - e.stopPropagation(); - e.preventDefault(); - return false; - } - ele = ele.parentElement; - } - - // they didn't tap one of the above elements - // if the currently active element is an input, and they tapped outside - // of the current input, then unset its focus (blur) so the keyboard goes away - var activeElement = document.activeElement; - if(activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA" || activeElement.tagName === "SELECT")) { - activeElement.blur(); - e.stopPropagation(); - e.preventDefault(); - return false; - } - } - - // global tap event listener polyfill for HTML elements that were "tapped" by the user - ionic.on("tap", tapPolyfill, window); - -})(this, document, ionic); diff --git a/example/photos/app.css b/example/photos/app.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/example/photos/app.js b/example/photos/app.js deleted file mode 100644 index 2f9695fa43..0000000000 --- a/example/photos/app.js +++ /dev/null @@ -1,8 +0,0 @@ -angular.module('ionic.photos', []) - -.controller('PhotosCtrl', function($scope) { - $scope.photos = []; - for(var i = 0; i < 100; i++) { - $scope.photos.push({}); - } -}) diff --git a/example/photos/index.html b/example/photos/index.html deleted file mode 100644 index 566d6965ee..0000000000 --- a/example/photos/index.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - Photos - - - - - - - - - - - -
-
-

Photos

- Select -
- -
-
-
- Photo -
-
-
-
-
-
- - -