mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
Removed photos example app
This commit is contained in:
158
dist/ionic.js
vendored
158
dist/ionic.js
vendored
@ -1666,6 +1666,36 @@ window.ionic = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
})(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) {
|
;(function(ionic) {
|
||||||
|
|
||||||
ionic.views.NavBar = function(opts) {
|
ionic.views.NavBar = function(opts) {
|
||||||
@ -1710,34 +1740,29 @@ ionic.views.NavBar.prototype = {
|
|||||||
})(window.ionic);
|
})(window.ionic);
|
||||||
;(function(ionic) {
|
;(function(ionic) {
|
||||||
|
|
||||||
ionic.views.HeaderBar = function(opts) {
|
ionic.views = ionic.views || {};
|
||||||
|
|
||||||
|
ionic.views.SideMenu = function(opts) {
|
||||||
this.el = opts.el;
|
this.el = opts.el;
|
||||||
|
this.width = opts.width;
|
||||||
|
this.isEnabled = opts.isEnabled || true;
|
||||||
|
};
|
||||||
|
|
||||||
this._titleEl = this.el.querySelector('.title');
|
ionic.views.SideMenu.prototype = {
|
||||||
};
|
getFullWidth: function() {
|
||||||
|
return this.width;
|
||||||
ionic.views.NavBar.prototype = {
|
},
|
||||||
resizeTitle: function() {
|
setIsEnabled: function(isEnabled) {
|
||||||
var
|
this.isEnabled = isEnabled;
|
||||||
e,
|
},
|
||||||
j,
|
bringUp: function() {
|
||||||
i,
|
this.el.style.zIndex = 0;
|
||||||
title,
|
},
|
||||||
titleWidth,
|
pushDown: function() {
|
||||||
children = this.el.children;
|
this.el.style.zIndex = -1;
|
||||||
|
|
||||||
for(i = 0, j = children.length; i < j; i++) {
|
|
||||||
e = children[i];
|
|
||||||
if(/h\d/.test(e.nodeName.toLowerCase())) {
|
|
||||||
title = e;
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
})(window.ionic);
|
||||||
titleWidth = title.offsetWidth;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
})(ionic);
|
|
||||||
;(function(ionic) {
|
;(function(ionic) {
|
||||||
|
|
||||||
ionic.views.TabBarItem = function(el) {
|
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);
|
})(window.ionic);
|
||||||
;
|
;
|
||||||
(function(ionic) {
|
(function(ionic) {
|
||||||
@ -2410,61 +2410,3 @@ ionic.controllers.TabBarController.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
})(ionic = window.ionic || {});
|
})(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);
|
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
angular.module('ionic.photos', [])
|
|
||||||
|
|
||||||
.controller('PhotosCtrl', function($scope) {
|
|
||||||
$scope.photos = [];
|
|
||||||
for(var i = 0; i < 100; i++) {
|
|
||||||
$scope.photos.push({});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
<html ng-app="ionic.photos">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Photos</title>
|
|
||||||
|
|
||||||
<!-- Sets initial viewport load and disables zooming -->
|
|
||||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
||||||
<link rel="stylesheet" href="../../dist/ionic.css">
|
|
||||||
<link rel="stylesheet" href="app.css">
|
|
||||||
<style>
|
|
||||||
.swiperight {
|
|
||||||
-webkit-transition: 0.1s ease-in-out all;
|
|
||||||
-webkit-transform:translate3d(120%,0,0) ;
|
|
||||||
}
|
|
||||||
#remove-box {
|
|
||||||
width: 200px;
|
|
||||||
height: 200px;
|
|
||||||
}
|
|
||||||
.relative {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
.overlay {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 2;
|
|
||||||
background-color: red;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script src="/vendor/angular/1.2.0rc2/angular-1.2.0rc2.min.js"></script>
|
|
||||||
<script src="/vendor/angular/1.2.0rc2/angular-touch.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<tab-controller>
|
|
||||||
<div title="Home" icon="icon-home" class="tab-content">
|
|
||||||
<header class="bar bar-header bar-default">
|
|
||||||
<h1 class="title">Photos</h1>
|
|
||||||
<a href="#" class="button button-clear">Select</a>
|
|
||||||
</header>
|
|
||||||
<content has-header="true" has-tabs="true" ng-controller="PhotosCtrl">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-3" ng-repeat="photo in photos">
|
|
||||||
Photo
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</content>
|
|
||||||
</div>
|
|
||||||
</tab-controller>
|
|
||||||
<script src="app.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Reference in New Issue
Block a user