diff --git a/dist/css/ionic-ios7.css b/dist/css/ionic-ios7.css index c9612662171..424d2be6926 100644 --- a/dist/css/ionic-ios7.css +++ b/dist/css/ionic-ios7.css @@ -182,7 +182,7 @@ sub { fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid #c0c0c0; } + border: 1px solid silver; } /** * 1. Correct `color` not being inherited in IE 8/9. @@ -386,6 +386,17 @@ body, .ionic-body { .has-tabs { bottom: 84px; } +.pane { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + background-color: #fff; } + .page, .full-section { position: fixed; top: 0; @@ -1730,7 +1741,7 @@ input[type="file"] { line-height: 34px; } select { - border: 1px solid #ccc; + border: 1px solid #cccccc; background-color: white; } select[multiple], @@ -1802,7 +1813,7 @@ input[type="checkbox"][readonly] { right: 20px; transition: 0.2s ease; transition-property: left, right; - transition-delay: 0s, .05s; } + transition-delay: 0s, 0.05s; } .toggle :checked + .track { /* When the toggle is "on" */ @@ -1817,7 +1828,7 @@ input[type="checkbox"][readonly] { right: 0; left: 20px; -webkit-transform: none; - transition-delay: .05s, 0s; } + transition-delay: 0.05s, 0s; } .item-radio { padding: 0; } @@ -2102,7 +2113,7 @@ input[type="range"] { .button.button-icon:active, .button.button-icon.active { background: none; box-shadow: none; - text-shadow: 0px 0px 10px #fff; } + text-shadow: 0px 0px 10px white; } .button.block, .button.button-full { margin-top: 10px; margin-bottom: 10px; } @@ -2446,9 +2457,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin .75s linear infinite; - -moz-animation: spin .75s linear infinite; - animation: spin .75s linear infinite; } + -webkit-animation: spin 0.75s linear infinite; + -moz-animation: spin 0.75s linear infinite; + animation: spin 0.75s linear infinite; } .ion-loading:before { content: "\e144"; } @@ -2461,9 +2472,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin .75s linear infinite; - -moz-animation: spin .75s linear infinite; - animation: spin .75s linear infinite; } + -webkit-animation: spin 0.75s linear infinite; + -moz-animation: spin 0.75s linear infinite; + animation: spin 0.75s linear infinite; } .ion-refreshing:before { content: "\e144"; } diff --git a/dist/css/ionic-scoped.css b/dist/css/ionic-scoped.css index dc4fe96012f..541aaa483da 100644 --- a/dist/css/ionic-scoped.css +++ b/dist/css/ionic-scoped.css @@ -210,7 +210,7 @@ transform: rotate(360deg); } } } .ionic .ion { - font-family: 'Ionicons' !important; + font-family: "Ionicons" !important; speak: none !important; font-style: normal !important; font-weight: normal !important; @@ -1192,7 +1192,7 @@ .ionic fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid #c0c0c0; } + border: 1px solid silver; } .ionic legend { padding: 0; /* 2 */ @@ -1317,6 +1317,16 @@ bottom: 44px; } .ionic .has-tabs { bottom: 84px; } + .ionic .pane { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + background-color: #fff; } .ionic .page, .ionic .full-section { position: fixed; top: 0; @@ -2546,7 +2556,7 @@ .ionic input[type="file"] { line-height: 34px; } .ionic select { - border: 1px solid #ccc; + border: 1px solid #cccccc; background-color: white; } .ionic select[multiple], .ionic select[size] { @@ -2595,7 +2605,7 @@ border-radius: 50%; background: white; content: ' '; - transition: background-color .1s ease-in-out; } + transition: background-color 0.1s ease-in-out; } .ionic .checkbox input:after { position: absolute; top: 34%; @@ -2608,7 +2618,7 @@ border-right: 0; content: ' '; opacity: 0; - transition: opacity .05s ease-in-out; + transition: opacity 0.05s ease-in-out; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); } .ionic .checkbox input:checked:before { @@ -2960,7 +2970,7 @@ .ionic .button.button-icon:active, .ionic .button.button-icon.active { background: none; box-shadow: none; - text-shadow: 0px 0px 10px #fff; } + text-shadow: 0px 0px 10px white; } .ionic .button.block, .ionic .button.button-full { margin-top: 10px; margin-bottom: 10px; } @@ -3210,9 +3220,9 @@ line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin .75s linear infinite; - -moz-animation: spin .75s linear infinite; - animation: spin .75s linear infinite; } + -webkit-animation: spin 0.75s linear infinite; + -moz-animation: spin 0.75s linear infinite; + animation: spin 0.75s linear infinite; } .ionic .ion-loading:before { content: "\e144"; } .ionic .ion-refreshing { @@ -3224,9 +3234,9 @@ line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin .75s linear infinite; - -moz-animation: spin .75s linear infinite; - animation: spin .75s linear infinite; } + -webkit-animation: spin 0.75s linear infinite; + -moz-animation: spin 0.75s linear infinite; + animation: spin 0.75s linear infinite; } .ionic .ion-refreshing:before { content: "\e144"; } .ionic .hidden, diff --git a/dist/css/ionic.css b/dist/css/ionic.css index 758ebbe55b9..02e5970bc4e 100644 --- a/dist/css/ionic.css +++ b/dist/css/ionic.css @@ -7,7 +7,7 @@ font-style: normal; } .ion { - font-family: 'Ionicons' !important; + font-family: "Ionicons" !important; speak: none !important; font-style: normal !important; font-weight: normal !important; @@ -1521,7 +1521,7 @@ sub { fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid #c0c0c0; } + border: 1px solid silver; } /** * 1. Correct `color` not being inherited in IE 8/9. @@ -1725,6 +1725,17 @@ body, .ionic-body { .has-tabs { bottom: 84px; } +.pane { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + background-color: #fff; } + .page, .full-section { position: fixed; top: 0; @@ -3133,7 +3144,7 @@ input[type="file"] { line-height: 34px; } select { - border: 1px solid #ccc; + border: 1px solid #cccccc; background-color: white; } select[multiple], @@ -3188,7 +3199,7 @@ input[type="checkbox"][readonly] { border-radius: 50%; background: white; content: ' '; - transition: background-color .1s ease-in-out; } + transition: background-color 0.1s ease-in-out; } /* the checkmark within the box */ .checkbox input:after { @@ -3203,7 +3214,7 @@ input[type="checkbox"][readonly] { border-right: 0; content: ' '; opacity: 0; - transition: opacity .05s ease-in-out; + transition: opacity 0.05s ease-in-out; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); } @@ -3583,7 +3594,7 @@ input[type="range"] { .button.button-icon:active, .button.button-icon.active { background: none; box-shadow: none; - text-shadow: 0px 0px 10px #fff; } + text-shadow: 0px 0px 10px white; } .button.block, .button.button-full { margin-top: 10px; margin-bottom: 10px; } @@ -4105,9 +4116,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin .75s linear infinite; - -moz-animation: spin .75s linear infinite; - animation: spin .75s linear infinite; } + -webkit-animation: spin 0.75s linear infinite; + -moz-animation: spin 0.75s linear infinite; + animation: spin 0.75s linear infinite; } .ion-loading:before { content: "\e144"; } @@ -4120,9 +4131,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin .75s linear infinite; - -moz-animation: spin .75s linear infinite; - animation: spin .75s linear infinite; } + -webkit-animation: spin 0.75s linear infinite; + -moz-animation: spin 0.75s linear infinite; + animation: spin 0.75s linear infinite; } .ion-refreshing:before { content: "\e144"; } diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js index ff695210dfe..69fb8635e4d 100644 --- a/dist/js/ionic-angular.js +++ b/dist/js/ionic-angular.js @@ -340,6 +340,15 @@ angular.module('ionic.ui.checkbox', []) angular.module('ionic.ui.content', []) +.directive('pane', function() { + return { + restrict: 'E', + replace: true, + transclude: true, + template: '
' + } +}) + // The content directive is a core scrollable content area // that is part of many View hierarchies .directive('content', function() { @@ -858,17 +867,20 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture']) $scope.sideMenuCtrl = this; }) -.directive('sideMenuCtrl', function() { +.directive('sideMenus', function() { return { - restrict: 'CA', + restrict: 'ECA', controller: 'SideMenuCtrl', + replace: true, + transclude: true, + template: '
' }; }) .directive('sideMenuContent', ['Gesture', function(Gesture) { return { restrict: 'CA', - require: '^sideMenuCtrl', + require: '^sideMenus', scope: true, compile: function(element, attr, transclude) { return function($scope, $element, $attr, sideMenuCtrl) { @@ -911,7 +923,7 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture']) .directive('menu', function() { return { restrict: 'E', - require: '^sideMenuCtrl', + require: '^sideMenus', replace: true, transclude: true, scope: { diff --git a/example/angular/app.css b/example/angular/app.css deleted file mode 100644 index c4e72c03ae9..00000000000 --- a/example/angular/app.css +++ /dev/null @@ -1,68 +0,0 @@ -.pane { - position: fixed; - width: 100%; -} -.reveal-animation { - /* - -webkit-transform: translate3d(0%, 0, 0); - transform: translate3d(0%, 0, 0); - - -webkit-transition: -webkit-transform 1s ease-in-out; - transition: transform 1s ease-in-out; - */ -} -.reveal-animation > .ng-enter { - -webkit-transition: 0.2s linear all; - -webkit-transform:translate3d(100%,0,0) ; -} -.reveal-animation > .ng-enter-active { - -webkit-transform:translate3d(0,0,0) ; -} -.reveal-animation > .ng-leave { - -webkit-transition: 0.2s linear all; - -webkit-transform:translate3d(0,0,0); -} -.reveal-animation > .ng-leave-active { - -webkit-transform:translate3d(-100%,0,0); -} - - -.animate-switch-container { - position:relative; - background:white; - border:1px solid black; - height:40px; - overflow:hidden; -} - -.animate-switch-container > div { - padding:10px; -} - -.animate-switch-container > .ng-enter, -.animate-switch-container > .ng-leave { - -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; - -moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; - -o-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; - transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; - - position:absolute; - top:0; - left:0; - right:0; - bottom:0; -} - -.animate-switch-container > .ng-enter { - top:-50px; -} -.animate-switch-container > .ng-enter.ng-enter-active { - top:0; -} - -.animate-switch-container > .ng-leave { - top:0; -} -.animate-switch-container > .ng-leave.ng-leave-active { - top:50px; -} diff --git a/example/angular/app.js b/example/angular/app.js deleted file mode 100644 index 4d7b3877c01..00000000000 --- a/example/angular/app.js +++ /dev/null @@ -1,50 +0,0 @@ - -/* -document.addEventListener('touchstart', function() {}); - -var app = angular.module('peopleApp', ['ngRoute', 'ngAnimate']); - -app.config( ["$routeProvider", function($routeProvider){ - $routeProvider.when("/customers", {"templateUrl" : "customers.html", controller: 'CustomersCtrl'}); - $routeProvider.when("/customer/:id", {"templateUrl" : "customer.html", controller: 'CustomerCtrl'}); - $routeProvider.otherwise({"redirectTo":"/customers"}); - - }] -); - -app.provider('Customers', function() { - var customers = [ - {'name': 'Max Lynch', id: 1}, - {'name': 'Max Lynch', id: 2}, - {'name': 'Max Lynch', id: 3}, - {'name': 'Max Lynch', id: 4}, - {'name': 'Max Lynch', id: 5}, - {'name': 'Max Lynch', id: 6}, - {'name': 'Max Lynch', id: 7}, - {'name': 'Max Lynch', id: 8}, - {'name': 'Max Lynch', id: 9}, - {'name': 'Max Lynch', id: 10}, - {'name': 'Max Lynch', id: 11}, - ]; - - this.$get = function() { - return { - list: customers, - getById: function(id) { - for(var i = 0; i < this.list.length; i++) { if(this.list[i].id == id) return this.list[i]; } - } - } - } -}); - -app.controller('CustomersCtrl', function($scope, Customers) { - $scope.customers = Customers; -}); - -app.controller('CustomerCtrl', function($scope, $routeParams, Customers) { - var id = $routeParams.id; - var customer = Customers.getById(id); - $scope.customer = customer; - console.log('Showing user', id, customer); -}); -*/ diff --git a/example/angular/chat/angular-1.2.0rc1.min.js b/example/angular/chat/angular-1.2.0rc1.min.js deleted file mode 100644 index 8c5e2d8e765..00000000000 --- a/example/angular/chat/angular-1.2.0rc1.min.js +++ /dev/null @@ -1,182 +0,0 @@ -/* - AngularJS v1.2.0rc1 - (c) 2010-2012 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(T,N,v){'use strict';function M(a){return function(){for(var b=arguments[0],c=1,b="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.2.0rc1/"+(a?a+"/":"")+b;c").append(a).html();try{return 3===a[0].nodeType?G(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(b,a){return"<"+G(a)})}catch(d){return G(c)}}function Jb(a){try{return decodeURIComponent(a)}catch(b){}}function Kb(a){var b={},c,d;q((a||"").split("&"),function(a){a&&(c=a.split("="),d=Jb(c[0]),A(d)&&(a=A(c[1])? -Jb(c[1]):!0,b[d]?I(b[d])?b[d].push(a):b[d]=[b[d],a]:b[d]=a))});return b}function Lb(a){var b=[];q(a,function(a,d){I(a)?q(a,function(a){b.push(ta(d,!0)+(!0===a?"":"="+ta(a,!0)))}):b.push(ta(d,!0)+(!0===a?"":"="+ta(a,!0)))});return b.length?b.join("&"):""}function ob(a){return ta(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ta(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,b?"%20":"+")} -function Hc(a,b){function c(a){a&&d.push(a)}var d=[a],e,g,k=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;q(k,function(b){k[b]=!0;c(N.getElementById(b));b=b.replace(":","\\:");a.querySelectorAll&&(q(a.querySelectorAll("."+b),c),q(a.querySelectorAll("."+b+"\\:"),c),q(a.querySelectorAll("["+b+"]"),c))});q(d,function(b){if(!e){var a=f.exec(" "+b.className+" ");a?(e=b,g=(a[2]||"").replace(/\s+/g,",")):q(b.attributes,function(a){!e&&k[a.name]&&(e=b,g=a.value)})}}); -e&&b(e,g?[g]:[])}function Mb(a,b){var c=function(){a=C(a);if(a.injector()){var c=a[0]===N?"document":ga(a);throw Xa("btstrpd",c);}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);b.unshift("ng");c=Nb(b);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(b,a,c,d,e){b.$apply(function(){a.data("$injector",d);c(a)(b)});e.enabled(!0)}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(T&&!d.test(T.name))return c();T.name=T.name.replace(d,"");Ha.resumeBootstrap= -function(a){q(a,function(a){b.push(a)});c()}}function pb(a,b){b=b||"_";return a.replace(Ic,function(a,d){return(d?b:"")+a.toLowerCase()})}function qb(a,b,c){if(!a)throw Xa("areq",b||"?",c||"required");return a}function Ia(a,b,c){c&&I(a)&&(a=a[a.length-1]);qb(H(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a));return a}function rb(a,b,c){if(!b)return a;b=b.split(".");for(var d,e=a,g=b.length,k=0;k "+a;b.removeChild(b.firstChild);ub(this,b.childNodes);C(N.createDocumentFragment()).append(this)}else ub(this, -a)}function vb(a){return a.cloneNode(!0)}function Ka(a){Ob(a);var b=0;for(a=a.childNodes||[];b=R?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)}; -c.elem=a;return c}function za(a){var b=typeof a,c;"object"==b&&null!==a?"function"==typeof(c=a.$$hashKey)?c=a.$$hashKey():c===v&&(c=a.$$hashKey=Ua()):c=a;return b+":"+c}function Ma(a){q(a,this.put,this)}function Wb(a){var b,c;"function"==typeof a?(b=a.$inject)||(b=[],c=a.toString().replace(Oc,""),c=c.match(Pc),q(c[1].split(Qc),function(a){a.replace(Rc,function(a,c,d){b.push(d)})}),a.$inject=b):I(a)?(c=a.length-1,Ia(a[c],"fn"),b=a.slice(0,c)):Ia(a,"fn",!0);return b}function Nb(a){function b(a){return function(b, -c){if(Q(b))q(b,Gb(a));else return a(b,c)}}function c(a,b){if(H(b)||I(b))b=p.instantiate(b);if(!b.$get)throw Na("pget",a);return m[a+f]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[];q(a,function(a){if(!h.get(a)){h.put(a,!0);try{if(z(a)){var c=Oa(a);b=b.concat(e(c.requires)).concat(c._runBlocks);for(var d=c._invokeQueue,c=0,f=d.length;c 4096 bytes)!"));else{if(l.cookie!==ia)for(ia=l.cookie,d=ia.split("; "),V={},f=0;fh&&this.remove(n.key),b},get:function(a){var b=m[a];if(b)return e(b),l[a]},remove:function(a){var b=m[a];b&&(b==p&&(p=b.p),b==n&&(n=b.n),g(b.n,b.p),delete m[a],delete l[a],k--)},removeAll:function(){l={};k=0;m={};p=n=null},destroy:function(){m=f=l=null;delete b[a]},info:function(){return F({},f,{size:k})}}}var b={};a.info=function(){var a={};q(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}} -function Xc(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Xb(a){var b={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g=/^\s*(https?|ftp|mailto|file):/,k=/^\s*(https?|ftp|file):|data:image\//,f=/^(on[a-z]*|formaction)$/;this.directive=function h(d,e){z(d)?(qb(e,"directiveFactory"),b.hasOwnProperty(d)||(b[d]=[],a.factory(d+c,["$injector","$exceptionHandler",function(a,c){var e=[];q(b[d],function(b){try{var f=a.invoke(b);H(f)? -f={compile:W(f)}:!f.compile&&f.link&&(f.compile=W(f.link));f.priority=f.priority||0;f.name=f.name||d;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(g){c(g)}});return e}])),b[d].push(e)):q(d,Gb(h));return this};this.aHrefSanitizationWhitelist=function(a){return A(a)?(g=a,this):g};this.imgSrcSanitizationWhitelist=function(a){return A(a)?(k=a,this):k};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope", -"$document","$sce","$$urlUtils","$animate",function(a,m,p,n,s,r,y,u,da,x,B,t){function P(a,b,c,d){a instanceof C||(a=C(a));q(a,function(b,c){3==b.nodeType&&b.nodeValue.match(/\S+/)&&(a[c]=C(b).wrap("").parent()[0])});var e=V(a,b,a,c,d);return function(b,c){qb(b,"scope");for(var d=c?Pa.clone.call(a):a,f=0,g=d.length;ft.priority)break;if(L=t.scope)E("isolated scope",D,t,B),Q(L)&&(na(B,"ng-isolate-scope"),D=t),na(B,"ng-scope"),u=u||t;x=t.name;if(L=t.controller)oa= -oa||{},E("'"+x+"' controller",oa[x],t,B),oa[x]=t;if(L=t.transclude)E("transclusion",da,t,B),da=t,n=t.priority,"element"==L?(L=X(b,Qa,A),B=c.$$element=C(N.createComment(" "+x+": "+c[x]+" ")),b=B[0],bb(e,C(sa.call(L,0)),b),pa=P(L,d,n,f&&f.name)):(L=C(vb(b)).contents(),B.html(""),pa=P(L,d));if(t.template)if(E("template",Y,t,B),Y=t,L=H(t.template)?t.template(B,c):t.template,L=Yb(L),t.replace){f=t;L=C("
"+Z(L)+"
").contents();b=L[0];if(1!=L.length||1!==b.nodeType)throw ea("tplrt",x,"");bb(e,B, -b);w={$attr:{}};a=a.concat(ia(b,a.splice(K+1,a.length-(K+1)),w));ua(c,w);w=a.length}else B.html(L);if(t.templateUrl)E("template",Y,t,B),Y=t,t.replace&&(f=t),k=Uc(a.splice(K,a.length-K),k,B,c,e,pa),w=a.length;else if(t.compile)try{ja=t.compile(B,c,pa),H(ja)?g(null,ja,Qa,A):ja&&g(ja.pre,ja.post,Qa,A)}catch(F){p(F,ga(B))}t.terminal&&(k.terminal=!0,n=Math.max(n,t.priority))}k.scope=u&&u.scope;k.transclude=da&&pa;return k}function D(d,e,f,g,m,k,n){if(e===m)return null;m=null;if(b.hasOwnProperty(e)){var s; -e=a.get(e+c);for(var r=0,E=e.length;rs.priority)&&-1!=s.restrict.indexOf(f)&&(k&&(s=Cc(s,{$$start:k,$$end:n})),d.push(s),m=s)}catch(t){p(t)}}return m}function ua(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,f){"class"==f?(na(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?e.attr("style",e.attr("style")+";"+b):"$"==f.charAt(0)||a.hasOwnProperty(f)|| -(a[f]=b,d[f]=c[f])})}function Uc(a,b,c,d,e,f){var g=[],m,h,k=c[0],p=a.shift(),r=F({},p,{controller:null,templateUrl:null,transclude:null,scope:null,replace:null}),E=H(p.templateUrl)?p.templateUrl(c,d):p.templateUrl;c.html("");n.get(x.getTrustedResourceUrl(E),{cache:s}).success(function(n){var s;n=Yb(n);if(p.replace){n=C("
"+Z(n)+"
").contents();s=n[0];if(1!=n.length||1!==s.nodeType)throw ea("tplrt",p.name,E);n={$attr:{}};bb(e,c,s);ia(s,a,n);ua(d,n)}else s=k,c.html(n);a.unshift(r);m=ja(a, -s,d,f,c,p);q(e,function(a,b){a==s&&(e[b]=c[0])});for(h=V(c[0].childNodes,f);g.length;){n=g.shift();var t=g.shift(),u=g.shift(),y=g.shift(),B=c[0];t!==k&&(B=vb(s),bb(u,C(t),B));m(b(h,n,B,e,y),n,B,e,y)}g=null}).error(function(a,b,c,d){throw ea("tpload",d.url);});return function(a,c,d,e,f){g?(g.push(c),g.push(d),g.push(e),g.push(f)):m(function(){b(h,c,d,e,f)},c,d,e,f)}}function K(a,b){return b.priority-a.priority}function E(a,b,c,d){if(b)throw ea("multidir",b.name,c.name,a,ga(d));}function Y(a,b){var c= -m(b,!0);c&&a.push({priority:0,compile:W(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);na(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function L(a,b){if("xlinkHref"==b||"IMG"!=Aa(a)&&("src"==b||"ngSrc"==b))return x.RESOURCE_URL}function oa(a,b,c,d){var e=m(c,!0);if(e){if("multiple"===d&&"SELECT"===Aa(a))throw ea("selmulti",ga(a));b.push({priority:100,compile:W(function(b,c,g){c=g.$$observers||(g.$$observers={});if(f.test(d))throw ea("nodomevents"); -if(e=m(g[d],!0,L(a,d)))g[d]=e(b),(c[d]||(c[d]=[])).$$inter=!0,(g.$$observers&&g.$$observers[d].$$scope||b).$watch(e,function(a){g.$set(d,a)})})})}}function bb(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,m;if(a)for(g=0,m=a.length;ga.status?b:p.reject(b)}var d={transformRequest:e.transformRequest,transformResponse:e.transformResponse},f=function(a){function b(a){var c;q(a,function(b,d){H(b)&&(c=b(),null!=c?a[d]=c:delete a[d])})}var c=e.headers,d=F({},a.headers),f,g,c=F({},c.common,c[G(a.method)]);b(c);b(d);a:for(f in c){a=G(f);for(g in d)if(G(g)===a)continue a;d[f]=c[f]}return d}(a);F(d,a);d.headers=f;d.method=Ba(d.method);(a=s.isSameOrigin(d.url)?b.cookies()[d.xsrfCookieName||e.xsrfCookieName]:v)&& -(f[d.xsrfHeaderName||e.xsrfHeaderName]=a);var g=[function(a){f=a.headers;var b=ac(a.data,$b(f),a.transformRequest);J(a.data)&&q(f,function(a,b){"content-type"===G(b)&&delete f[b]});J(a.withCredentials)&&!J(e.withCredentials)&&(a.withCredentials=e.withCredentials);return y(a,b,f).then(c,c)},v],m=p.when(d);for(q(x,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){a=g.shift();var h=g.shift(),m=m.then(a, -h)}m.success=function(a){m.then(function(b){a(b.data,b.status,b.headers,d)});return m};m.error=function(a){m.then(null,function(b){a(b.data,b.status,b.headers,d)});return m};return m}function y(b,c,g){function h(a,b,c){y&&(200<=a&&300>a?y.put(x,[a,b,Zb(c)]):y.remove(x));l(b,a,c);d.$$phase||d.$apply()}function l(a,c,d){c=Math.max(c,0);(200<=c&&300>c?k.resolve:k.reject)({data:a,status:c,headers:$b(d),config:b})}function n(){var a=Wa(r.pendingRequests,b);-1!==a&&r.pendingRequests.splice(a,1)}var k=p.defer(), -s=k.promise,y,q,x=u(b.url,b.params);r.pendingRequests.push(b);s.then(n,n);(b.cache||e.cache)&&(!1!==b.cache&&"GET"==b.method)&&(y=Q(b.cache)?b.cache:Q(e.cache)?e.cache:da);if(y)if(q=y.get(x)){if(q.then)return q.then(n,n),q;I(q)?l(q[1],q[0],aa(q[2])):l(q,200,{})}else y.put(x,s);q||a(b.method,x,c,h,g,b.timeout,b.withCredentials,b.responseType);return s}function u(a,b){if(!b)return a;var c=[];Bc(b,function(a,b){null!=a&&a!=v&&(I(a)||(a=[a]),q(a,function(a){Q(a)&&(a=ma(a));c.push(ta(b)+"="+ta(a))}))}); -return a+(-1==a.indexOf("?")?"?":"&")+c.join("&")}var da=c("$http"),x=[];q(g,function(a){x.unshift(z(a)?n.get(a):n.invoke(a))});q(k,function(a,b){var c=z(a)?n.get(a):n.invoke(a);x.splice(b,0,{response:function(a){return c(p.when(a))},responseError:function(a){return c(p.reject(a))}})});r.pendingRequests=[];(function(a){q(arguments,function(a){r[a]=function(b,c){return r(F(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){r[a]=function(b,c,d){return r(F(d|| -{},{method:a,url:b,data:c}))}})})("post","put");r.defaults=e;return r}]}function dd(){this.$get=["$browser","$window","$document",function(a,b,c){return ed(a,fd,a.defer,b.angular.callbacks,c[0],b.location.protocol.replace(":",""))}]}function ed(a,b,c,d,e,g){function k(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;R?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=d;e.body.appendChild(c); -return d}return function(e,l,h,m,p,n,s,r){function y(){v=-1;B&&B();t&&t.abort()}function u(b,d,e,f){var m=(l.match(bc)||["",g])[1];P&&c.cancel(P);B=t=null;d="file"==m?e?200:404:d;b(1223==d?204:d,e,f);a.$$completeOutstandingRequest(w)}var v;a.$$incOutstandingRequestCount();l=l||a.url();if("jsonp"==G(e)){var x="_"+(d.counter++).toString(36);d[x]=function(a){d[x].data=a};var B=k(l.replace("JSON_CALLBACK","angular.callbacks."+x),function(){d[x].data?u(m,200,d[x].data):u(m,v||-2);delete d[x]})}else{var t= -new b;t.open(e,l,!0);q(p,function(a,b){a&&t.setRequestHeader(b,a)});t.onreadystatechange=function(){if(4==t.readyState){var a=t.getAllResponseHeaders(),b="Cache-Control Content-Language Content-Type Expires Last-Modified Pragma".split(" ");a||(a="",q(b,function(b){var c=t.getResponseHeader(b);c&&(a+=b+": "+c+"\n")}));u(m,v||t.status,t.responseType?t.response:t.responseText,a)}};s&&(t.withCredentials=!0);r&&(t.responseType=r);t.send(h||"")}if(0=a}function g(a){return" "==a||"\r"==a||"\t"==a||"\n"==a||"\v"==a||"\u00a0"==a}function k(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"==a||"$"==a}function f(a){return"-"==a||"+"==a||e(a)}function l(b,c,d){d=d||r;c=A(c)?"s "+c+"-"+r+" ["+a.substring(c,d)+"]":" "+d;throw Sa("lexerr",b,c,a);}function h(){for(var b= -"",c=r;r","<=",">="))a=p(a,b.fn,x());return a}function B(){for(var a=t(),b;b=f("*","/","%");)a=p(a,b.fn,t());return a}function t(){var a;return f("+")?P():(a=f("-"))?p(ia,a.fn,t()):(a=f("!"))?h(a.fn,t()):P()}function P(){var a; -if(f("("))a=K(),l(")");else if(f("["))a=C();else if(f("{"))a=A();else{var b=f();(a=b.fn)||e("not a primary expression",b);b.json&&(a.constant=a.literal=!0)}for(var c;b=f("(","[",".");)"("===b.text?(a=D(a,c),c=null):"["===b.text?(c=a,a=I(a)):"."===b.text?(c=a,a=ua(a)):e("IMPOSSIBLE");return a}function C(){var a=[],b=!0;if("]"!=g().text){do{var c=z();a.push(c);c.constant||(b=!1)}while(f(","))}l("]");return F(function(b,c){for(var d=[],e=0;ee?mc(d[0],d[1],d[2],d[3],d[4],c):function(a,b){var g=0,h;do h=mc(d[g++],d[g++],d[g++],d[g++],d[g++],c)(a, -b),b=v,a=h;while(ga)for(b in g++,d)d.hasOwnProperty(b)&&!f.hasOwnProperty(b)&&(q--,delete d[b])}else d!==f&&(d=f,g++);return g},function(){b(f,d,c)})},$digest:function(){var c,e,f,g,r=this.$$asyncQueue,q,u,v=a,x,B=[],t,w;k("$digest");do{u=!1;for(x=this;r.length;)try{x.$eval(r.shift())}catch(C){d(C)}do{if(g=x.$$watchers)for(q=g.length;q--;)try{(c=g[q])&& -((e=c.get(x))!==(f=c.last)&&!(c.eq?xa(e,f):"number"==typeof e&&"number"==typeof f&&isNaN(e)&&isNaN(f)))&&(u=!0,c.last=c.eq?aa(e):e,c.fn(e,f===l?e:f,x),5>v&&(t=4-v,B[t]||(B[t]=[]),w=H(c.exp)?"fn: "+(c.exp.name||c.exp.toString()):c.exp,w+="; newVal: "+ma(e)+"; oldVal: "+ma(f),B[t].push(w)))}catch(z){d(z)}if(!(g=x.$$childHead||x!==this&&x.$$nextSibling))for(;x!==this&&!(g=x.$$nextSibling);)x=x.$parent}while(x=g);if(u&&!v--)throw h.$$phase=null,b("infdig",a,ma(B));}while(u||r.length);h.$$phase=null}, -$destroy:function(){if(h!=this&&!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return e(a)(this, -b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return k("$apply"),this.$eval(a)}catch(b){d(b)}finally{h.$$phase=null;try{h.$digest()}catch(c){throw d(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[Wa(c,b)]=null}},$emit:function(a,b){var c=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=[h].concat(sa.call(arguments, -1)),l,q;do{e=f.$$listeners[a]||c;h.currentScope=f;l=0;for(q=e.length;lc))throw Ca("iequirks");var e=aa(ca);e.isEnabled=function(){return a};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;a||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf= -wa);e.parseAs=function(a,c){var d=b(c);return d.literal&&d.constant?d:function(b,c){return e.getTrusted(a,d(b,c))}};var g=e.parseAs,k=e.getTrusted,f=e.trustAs;Ha.forEach(ca,function(a,b){var c=G(b);e[Ja("parse_as_"+c)]=function(b){return g(a,b)};e[Ja("get_trusted_"+c)]=function(b){return k(a,b)};e[Ja("trust_as_"+c)]=function(b){return f(a,b)}});return e}]}function ud(){this.$get=["$window","$document",function(a,b){var c={},d=U((/android (\d+)/.exec(G((a.navigator||{}).userAgent))||[])[1]),e=b[0]|| -{},g,k=/^(Moz|webkit|O|ms)(?=[A-Z])/,f=e.body&&e.body.style,l=!1,h=!1;if(f){for(var m in f)if(l=k.exec(m)){g=l[0];g=g.substr(0,1).toUpperCase()+g.substr(1);break}l=!!("transition"in f||g+"Transition"in f);h=!!("animation"in f||g+"Animation"in f);!d||l&&h||(l=z(e.body.style.webkitTransition),h=z(e.body.style.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>d),hashchange:"onhashchange"in a&&(!e.documentMode||7a;a=Math.abs(a);var k=a+"",f="",l=[],h=!1;if(-1!==k.indexOf("e")){var m=k.match(/([\d\.]+)e(-?)(\d+)/);m&&"-"==m[2]&&m[3]>e+1?k="0":(f=k,h=!0)}if(h)0a)&&(f=a.toFixed(e));else{k=(k.split(tc)[1]||"").length;J(e)&&(e=Math.min(Math.max(b.minFrac,k),b.maxFrac));k=Math.pow(10,e);a=Math.round(a*k)/k;a=(""+a).split(tc);k=a[0];a=a[1]|| -"";var h=0,m=b.lgSize,p=b.gSize;if(k.length>=m+p)for(var h=k.length-m,n=0;na&&(d="-",a=-a);for(a=""+a;a.length-c)e+=c;0===e&&-12==c&&(e=12);return Cb(e,b,d)}}function eb(a,b){return function(c,d){var e=c["get"+a](),g=Ba(b?"SHORT"+a:a);return d[g][e]}}function pc(a){function b(a){var b;if(b=a.match(c)){a=new Date(0);var g=0,k=0,f=b[8]?a.setUTCFullYear:a.setFullYear,l=b[8]?a.setUTCHours:a.setHours;b[9]&&(g=U(b[9]+b[10]),k=U(b[9]+b[11]));f.call(a,U(b[1]),U(b[2])-1,U(b[3]));g=U(b[4]||0)-g;k=U(b[5]||0)-k;f=U(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));l.call(a,g,k,f,b)}return a} -var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g="",k=[],f,l;e=e||"mediumDate";e=a.DATETIME_FORMATS[e]||e;z(c)&&(c=Dd.test(c)?U(c):b(c));lb(c)&&(c=new Date(c));if(!Ea(c))return c;for(;e;)(l=Ed.exec(e))?(k=k.concat(sa.call(l,1)),e=k.pop()):(k.push(e),e=null);q(k,function(b){f=Fd[b];g+=f?f(c,a.DATETIME_FORMATS):b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function zd(){return function(a){return ma(a,!0)}} -function Ad(){return function(a,b){if(!I(a)&&!z(a))return a;b=U(b);if(z(a))return b?0<=b?a.slice(0,b):a.slice(b,a.length):"";var c=[],d,e;b>a.length?b=a.length:b<-a.length&&(b=-a.length);0a||37<=a&&40>=a)||l()});b.on("change",k);if(e.hasEvent("paste"))b.on("paste cut",l)}d.$render=function(){b.val($(d.$viewValue)?"":d.$viewValue)};var h=c.ngPattern,m=function(a,b){if($(b)||a.test(b))return d.$setValidity("pattern",!0),b;d.$setValidity("pattern", -!1);return v};h&&((e=h.match(/^\/(.*)\/([gim]*)$/))?(h=RegExp(e[1],e[2]),e=function(a){return m(h,a)}):e=function(c){var d=a.$eval(h);if(!d||!d.test)throw M("ngPattern")("noregexp",h,d,ga(b));return m(d,c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var p=U(c.ngMinlength);e=function(a){if(!$(a)&&a.lengthn)return d.$setValidity("maxlength",!1),v;d.$setValidity("maxlength",!0);return a};d.$parsers.push(e);d.$formatters.push(e)}}function Db(a,b){a="ngClass"+a;return function(){return{restrict:"AC",link:function(c,d,e){function g(a){if(!0===b||c.$index%2===b)f&&!xa(a,f)&&e.$removeClass(k(f)),e.$addClass(k(a));f=aa(a)}function k(a){if(I(a))return a.join(" ");if(Q(a)){var b=[];q(a,function(a,c){a&&b.push(c)});return b.join(" ")}return a}var f=v;c.$watch(e[a],g,!0);e.$observe("class",function(b){g(c.$eval(e[a]))}); -"ngClass"!==a&&c.$watch("$index",function(d,f){var g=d&1;g!==f&1&&(g===b?(g=c.$eval(e[a]),e.$addClass(k(g))):(g=c.$eval(e[a]),e.$removeClass(k(g))))})}}}}var G=function(a){return z(a)?a.toLowerCase():a},Ba=function(a){return z(a)?a.toUpperCase():a},R=U((/msie (\d+)/.exec(G(navigator.userAgent))||[])[1]),C,ya,sa=[].slice,Gd=[].push,Va=Object.prototype.toString,Xa=M("ng"),Ha=T.angular||(T.angular={}),Oa,Aa,fa=["0","0","0"];w.$inject=[];wa.$inject=[];var Z=function(){return String.prototype.trim?function(a){return z(a)? -a.trim():a}:function(a){return z(a)?a.replace(/^\s*/,"").replace(/\s*$/,""):a}}();Aa=9>R?function(a){a=a.nodeName?a:a[0];return a.scopeName&&"HTML"!=a.scopeName?Ba(a.scopeName+":"+a.nodeName):a.nodeName}:function(a){return a.nodeName?a.nodeName:a[0].nodeName};var Ic=/[A-Z]/g,Hd={full:"1.2.0rc1",major:1,minor:2,dot:0,codeName:"spooky-giraffe"},La=O.cache={},Ya=O.expando="ng-"+(new Date).getTime(),Mc=1,vc=T.document.addEventListener?function(a,b,c){a.addEventListener(b,c,!1)}:function(a,b,c){a.attachEvent("on"+ -b,c)},wb=T.document.removeEventListener?function(a,b,c){a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent("on"+b,c)},Kc=/([\:\-\_]+(.))/g,Lc=/^moz([A-Z])/,tb=M("jqLite"),Pa=O.prototype={ready:function(a){function b(){c||(c=!0,a())}var c=!1;"complete"===N.readyState?setTimeout(b):(this.on("DOMContentLoaded",b),O(T).on("load",b))},toString:function(){var a=[];q(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?C(this[a]):C(this[this.length+a])},length:0, -push:Gd,sort:[].sort,splice:[].splice},ab={};q("multiple selected checked disabled readOnly required open".split(" "),function(a){ab[G(a)]=a});var Vb={};q("input select option textarea button form details".split(" "),function(a){Vb[Ba(a)]=!0});q({data:Qb,inheritedData:$a,scope:function(a){return $a(a,"$scope")},controller:Tb,injector:function(a){return $a(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Za,css:function(a,b,c){b=Ja(b);if(A(c))a.style[b]=c;else{var d;8>=R&&(d= -a.currentStyle&&a.currentStyle[b],""===d&&(d="auto"));d=d||a.style[b];8>=R&&(d=""===d?v:d);return d}},attr:function(a,b,c){var d=G(b);if(ab[d])if(A(c))c?(a[b]=!0,a.setAttribute(b,d)):(a[b]=!1,a.removeAttribute(d));else return a[b]||(a.attributes.getNamedItem(b)||w).specified?d:v;else if(A(c))a.setAttribute(b,c);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?v:a},prop:function(a,b,c){if(A(c))a[b]=c;else return a[b]},text:function(){function a(a,d){var e=b[a.nodeType];if(J(d))return e? -a[e]:"";a[e]=d}var b=[];9>R?(b[1]="innerText",b[3]="nodeValue"):b[1]=b[3]="textContent";a.$dv="";return a}(),val:function(a,b){if(J(b)){if("SELECT"===Aa(a)&&a.multiple){var c=[];q(a.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return a.value}a.value=b},html:function(a,b){if(J(b))return a.innerHTML;for(var c=0,d=a.childNodes;c":function(b,c,d,e){return d(b,c)>e(b,c)},"<=":function(b,c,d,e){return d(b,c)<=e(b,c)},">=":function(b,c,d,e){return d(b,c)>=e(b,c)},"&&":function(b,c,d,e){return d(b,c)&&e(b,c)},"||":function(b,c,d,e){return d(b,c)||e(b,c)},"&":function(b,c,d,e){return d(b,c)&e(b,c)},"|":function(b,c,d,e){return e(b,c)(b,c,d(b,c))},"!":function(b,c,d){return!d(b,c)}},md={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Bb={},Ca=M("$sce"),ca={HTML:"html", -CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};nc.$inject=["$provide"];oc.$inject=["$locale"];qc.$inject=["$locale"];var tc=".",Fd={yyyy:S("FullYear",4),yy:S("FullYear",2,0,!0),y:S("FullYear",1),MMMM:eb("Month"),MMM:eb("Month",!0),MM:S("Month",2,1),M:S("Month",1,1),dd:S("Date",2),d:S("Date",1),HH:S("Hours",2),H:S("Hours",1),hh:S("Hours",2,-12),h:S("Hours",1,-12),mm:S("Minutes",2),m:S("Minutes",1),ss:S("Seconds",2),s:S("Seconds",1),sss:S("Milliseconds",3),EEEE:eb("Day"),EEE:eb("Day",!0),a:function(b, -c){return 12>b.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(b){b=-1*b.getTimezoneOffset();return b=(0<=b?"+":"")+(Cb(Math[0=R&&(c.href||c.name||c.$set("href",""),b.append(N.createComment("IE fix")));return function(b,c){c.on("click",function(b){c.attr("href")|| -b.preventDefault()})}}}),Eb={};q(ab,function(b,c){if("multiple"!=b){var d=ka("ng-"+c);Eb[d]=function(){return{priority:100,compile:function(){return function(b,g,k){b.$watch(k[d],function(b){k.$set(c,!!b)})}}}}}});q(["src","srcset","href"],function(b){var c=ka("ng-"+b);Eb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(b,c),R&&e.prop(b,g[b]))})}}}});var hb={$addControl:w,$removeControl:w,$setValidity:w,$setDirty:w,$setPristine:w};uc.$inject=["$element","$attrs", -"$scope"];var wc=function(b){return["$timeout",function(c){var d={name:"form",restrict:"E",controller:uc,compile:function(){return{pre:function(b,d,k,f){if(!k.action){var l=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1};vc(d[0],"submit",l);d.on("$destroy",function(){c(function(){wb(d[0],"submit",l)},0,!1)})}var h=d.parent().controller("form"),m=k.name||k.ngForm;m&&db(b,m,f,m);if(h)d.on("$destroy",function(){h.$removeControl(f);m&&db(b,m,v,m);F(f,hb)})}}}};return b?F(aa(d),{restrict:"EAC"}): -d}]},Ld=wc(),Md=wc(!0),Nd=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Od=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/,Pd=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,xc={text:jb,number:function(b,c,d,e,g,k){jb(b,c,d,e,g,k);e.$parsers.push(function(b){var c=$(b);if(c||Pd.test(b))return e.$setValidity("number",!0),""===b?null:c?b:parseFloat(b);e.$setValidity("number",!1);return v});e.$formatters.push(function(b){return $(b)?"":""+b});if(d.min){var f=parseFloat(d.min); -b=function(b){if(!$(b)&&bl)return e.$setValidity("max",!1),v;e.$setValidity("max",!0);return b};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(b){if($(b)||lb(b))return e.$setValidity("number",!0),b;e.$setValidity("number",!1);return v})},url:function(b,c,d,e,g,k){jb(b,c,d,e,g,k);b=function(b){if($(b)||Nd.test(b))return e.$setValidity("url", -!0),b;e.$setValidity("url",!1);return v};e.$formatters.push(b);e.$parsers.push(b)},email:function(b,c,d,e,g,k){jb(b,c,d,e,g,k);b=function(b){if($(b)||Od.test(b))return e.$setValidity("email",!0),b;e.$setValidity("email",!1);return v};e.$formatters.push(b);e.$parsers.push(b)},radio:function(b,c,d,e){J(d.name)&&c.attr("name",Ua());c.on("click",function(){c[0].checked&&b.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)}, -checkbox:function(b,c,d,e){var g=d.ngTrueValue,k=d.ngFalseValue;z(g)||(g=!0);z(k)||(k=!1);c.on("click",function(){b.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(b){return b===g});e.$parsers.push(function(b){return b?g:k})},hidden:w,button:w,submit:w,reset:w},yc=["$browser","$sniffer",function(b,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,k){k&&(xc[G(g.type)]||xc.text)(d,e,g,k,c,b)}}}],gb="ng-valid", -fb="ng-invalid",Da="ng-pristine",ib="ng-dirty",Qd=["$scope","$exceptionHandler","$attrs","$element","$parse",function(b,c,d,e,g){function k(b,c){c=c?"-"+pb(c,"-"):"";e.removeClass((b?fb:gb)+c).addClass((b?gb:fb)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),l=f.assign;if(!l)throw M("ngModel")("nonassign",d.ngModel,ga(e));this.$render= -w;var h=e.inheritedData("$formController")||hb,m=0,p=this.$error={};e.addClass(Da);k(!0);this.$setValidity=function(b,c){p[b]!==!c&&(c?(p[b]&&m--,m||(k(!0),this.$valid=!0,this.$invalid=!1)):(k(!1),this.$invalid=!0,this.$valid=!1,m++),p[b]=!c,k(c,b),h.$setValidity(b,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;e.removeClass(ib).addClass(Da)};this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,e.removeClass(Da).addClass(ib),h.$setDirty()); -q(this.$parsers,function(b){d=b(d)});this.$modelValue!==d&&(this.$modelValue=d,l(b,d),q(this.$viewChangeListeners,function(b){try{b()}catch(d){c(d)}}))};var n=this;b.$watch(function(){var c=f(b);if(n.$modelValue!==c){var d=n.$formatters,e=d.length;for(n.$modelValue=c;e--;)c=d[e](c);n.$viewValue!==c&&(n.$viewValue=c,n.$render())}})}],Rd=function(){return{require:["ngModel","^?form"],controller:Qd,link:function(b,c,d,e){var g=e[0],k=e[1]||hb;k.$addControl(g);c.on("$destroy",function(){k.$removeControl(g)})}}}, -Sd=W({require:"ngModel",link:function(b,c,d,e){e.$viewChangeListeners.push(function(){b.$eval(d.ngChange)})}}),zc=function(){return{require:"?ngModel",link:function(b,c,d,e){if(e){d.required=!0;var g=function(b){if(d.required&&($(b)||!1===b))e.$setValidity("required",!1);else return e.$setValidity("required",!0),b};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},Td=function(){return{require:"ngModel",link:function(b,c,d,e){var g=(b=/\/(.*)\//.exec(d.ngList))&& -RegExp(b[1])||d.ngList||",";e.$parsers.push(function(b){var c=[];b&&q(b.split(g),function(b){b&&c.push(Z(b))});return c});e.$formatters.push(function(b){return I(b)?b.join(", "):v})}}},Ud=/^(true|false|\d+)$/,Vd=function(){return{priority:100,compile:function(b,c){return Ud.test(c.ngValue)?function(b,c,g){g.$set("value",b.$eval(g.ngValue))}:function(b,c,g){b.$watch(g.ngValue,function(b){g.$set("value",b)})}}}},Wd=ra(function(b,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);b.$watch(d.ngBind, -function(b){c.text(b==v?"":b)})}),Xd=["$interpolate",function(b){return function(c,d,e){c=b(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(b){d.text(b)})}}],Yd=["$sce",function(b){return function(c,d,e){d.addClass("ng-binding").data("$binding",e.ngBindHtml);c.$watch(b.parseAsHtml(e.ngBindHtml),function(b){d.html(b||"")})}}],Zd=Db("",!0),$d=Db("Odd",0),ae=Db("Even",1),be=ra({compile:function(b,c){c.$set("ngCloak",v);b.removeClass("ng-cloak")}}), -ce=[function(){return{scope:!0,controller:"@"}}],de=["$sniffer",function(b){return{priority:1E3,compile:function(){b.csp=!0}}}],Ac={};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur".split(" "),function(b){var c=ka("ng-"+b);Ac[c]=["$parse",function(d){return function(e,g,k){var f=d(k[c]);g.on(G(b),function(b){e.$apply(function(){f(e,{$event:b})})})}}]});var ee=["$animate",function(b){return{transclude:"element",priority:1E3, -terminal:!0,restrict:"A",compile:function(c,d,e){return function(c,d,f){var l,h;c.$watch(f.ngIf,function(f){l&&(b.leave(l),l=v);h&&(h.$destroy(),h=v);Ga(f)&&(h=c.$new(),e(h,function(c){l=c;b.enter(c,d.parent(),d)}))})}}}}],fe=["$http","$templateCache","$anchorScroll","$compile","$animate","$sce",function(b,c,d,e,g,k){return{restrict:"ECA",terminal:!0,priority:500,compile:function(f,l){var h=l.ngInclude||l.src,m=l.onload||"",p=l.autoscroll;f.html("");var n=C(N.createComment(" ngInclude: "+h+" ")); -f.replaceWith(n);return function(l){var q=0,v,u,w=function(){v&&(v.$destroy(),v=null);u&&(g.leave(u),u=null)};l.$watch(k.parseAsResourceUrl(h),function(k){var h=++q;k?(b.get(k,{cache:c}).success(function(b){if(h===q){var c=l.$new();w();v=c;u=f.clone();u.html(b);g.enter(u,null,n);e(u,!1,499)(v);!A(p)||p&&!l.$eval(p)||d();v.$emit("$includeContentLoaded");l.$eval(m)}}).error(function(){h===q&&w()}),l.$emit("$includeContentRequested")):w()})}}}}],ge=ra({compile:function(){return{pre:function(b,c,d){b.$eval(d.ngInit)}}}}), -he=ra({terminal:!0,priority:1E3}),ie=["$locale","$interpolate",function(b,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,k){var f=k.count,l=k.$attr.when&&g.attr(k.$attr.when),h=k.offset||0,m=e.$eval(l)||{},p={},n=c.startSymbol(),s=c.endSymbol(),r=/^when(Minus)?(.+)$/;q(k,function(b,c){r.test(c)&&(m[G(c.replace("when","").replace("Minus","-"))]=g.attr(k.$attr[c]))});q(m,function(b,e){p[e]=c(b.replace(d,n+f+"-"+h+s))});e.$watch(function(){var c=parseFloat(e.$eval(f));if(isNaN(c))return"";c in -m||(c=b.pluralCat(c-h));return p[c](e,g,!0)},function(b){g.text(b)})}}}],je=["$parse","$animate",function(b,c){var d=M("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,compile:function(e,g,k){return function(e,g,h){var m=h.ngRepeat,p=m.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),n,s,r,v,u,w,x,B={$id:za};if(!p)throw d("iexp",m);h=p[1];u=p[2];(p=p[4])?(n=b(p),s=function(b,c,d){x&&(B[x]=b);B[w]=c;B.$index=d;return n(e,B)}):(r=function(b,c){return za(c)},v=function(b){return b}); -p=h.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!p)throw d("iidexp",h);w=p[3]||p[1];x=p[2];var t={};e.$watchCollection(u,function(b){var h,n,p=g[0],u,B={},z,D,A,I,K,E,F=[];if(kb(b))K=b,s=s||r;else{s=s||v;K=[];for(A in b)b.hasOwnProperty(A)&&"$"!=A.charAt(0)&&K.push(A);K.sort()}z=K.length;n=F.length=K.length;for(h=0;hG;)z.pop().element.remove()}for(;A.length>D;)A.pop()[0].element.remove()}var h;if(!(h=w.match(d)))throw M("ngOptions")("iexp",w,ga(f));var l=c(h[2]||h[1]),m=h[4]||h[6],n=h[5],p=c(h[3]||""),q=c(h[2]?h[1]:m),t=c(h[7]), -s=h[8]?c(h[8]):null,A=[[{element:f,label:""}]];u&&(b(u)(e),u.removeClass("ng-scope"),u.remove());f.html("");f.on("change",function(){e.$apply(function(){var b,c=t(e)||[],d={},h,k,l,p,u,w;if(r)for(k=[],p=0,w=A.length;p@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}'); diff --git a/example/angular/chat/angular-touch.js b/example/angular/chat/angular-touch.js deleted file mode 100644 index 22f86ca1ef5..00000000000 --- a/example/angular/chat/angular-touch.js +++ /dev/null @@ -1,536 +0,0 @@ -/** - * @license AngularJS v1.2.0rc1 - * (c) 2010-2012 Google, Inc. http://angularjs.org - * License: MIT - */ -(function(window, angular, undefined) {'use strict'; - -/** - * @ngdoc overview - * @name ngTouch - * @description - * Touch events and other mobile helpers. - * Based on jQuery Mobile touch event handling (jquerymobile.com) - */ - -// define ngTouch module -var ngTouch = angular.module('ngTouch', []); - -/** - * @ngdoc object - * @name ngTouch.$swipe - * - * @description - * The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe - * behavior, to make implementing swipe-related directives more convenient. - * - * It is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`, and by - * `ngCarousel` in a separate component. - * - * # Usage - * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element - * which is to be watched for swipes, and an object with four handler functions. See the - * documentation for `bind` below. - */ - -ngTouch.factory('$swipe', [function() { - // The total distance in any direction before we make the call on swipe vs. scroll. - var MOVE_BUFFER_RADIUS = 10; - - function getCoordinates(event) { - var touches = event.touches && event.touches.length ? event.touches : [event]; - var e = (event.changedTouches && event.changedTouches[0]) || - (event.originalEvent && event.originalEvent.changedTouches && - event.originalEvent.changedTouches[0]) || - touches[0].originalEvent || touches[0]; - - return { - x: e.clientX, - y: e.clientY - }; - } - - return { - /** - * @ngdoc method - * @name ngTouch.$swipe#bind - * @methodOf ngTouch.$swipe - * - * @description - * The main method of `$swipe`. It takes an element to be watched for swipe motions, and an - * object containing event handlers. - * - * The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end` - * receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }`. - * - * `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is - * watching for `touchmove` or `mousemove` events. These events are ignored until the total - * distance moved in either dimension exceeds a small threshold. - * - * Once this threshold is exceeded, either the horizontal or vertical delta is greater. - * - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow. - * - If the vertical distance is greater, this is a scroll, and we let the browser take over. - * A `cancel` event is sent. - * - * `move` is called on `mousemove` and `touchmove` after the above logic has determined that - * a swipe is in progress. - * - * `end` is called when a swipe is successfully completed with a `touchend` or `mouseup`. - * - * `cancel` is called either on a `touchcancel` from the browser, or when we begin scrolling - * as described above. - * - */ - bind: function(element, eventHandlers) { - // Absolute total movement, used to control swipe vs. scroll. - var totalX, totalY; - // Coordinates of the start position. - var startCoords; - // Last event's position. - var lastPos; - // Whether a swipe is active. - var active = false; - - element.on('touchstart mousedown', function(event) { - startCoords = getCoordinates(event); - active = true; - totalX = 0; - totalY = 0; - lastPos = startCoords; - eventHandlers['start'] && eventHandlers['start'](startCoords); - }); - - element.on('touchcancel', function(event) { - active = false; - eventHandlers['cancel'] && eventHandlers['cancel'](); - }); - - element.on('touchmove mousemove', function(event) { - if (!active) return; - - // Android will send a touchcancel if it thinks we're starting to scroll. - // So when the total distance (+ or - or both) exceeds 10px in either direction, - // we either: - // - On totalX > totalY, we send preventDefault() and treat this as a swipe. - // - On totalY > totalX, we let the browser handle it as a scroll. - - if (!startCoords) return; - var coords = getCoordinates(event); - - totalX += Math.abs(coords.x - lastPos.x); - totalY += Math.abs(coords.y - lastPos.y); - - lastPos = coords; - - if (totalX < MOVE_BUFFER_RADIUS && totalY < MOVE_BUFFER_RADIUS) { - return; - } - - // One of totalX or totalY has exceeded the buffer, so decide on swipe vs. scroll. - if (totalY > totalX) { - // Allow native scrolling to take over. - active = false; - eventHandlers['cancel'] && eventHandlers['cancel'](); - return; - } else { - // Prevent the browser from scrolling. - event.preventDefault(); - - eventHandlers['move'] && eventHandlers['move'](coords); - } - }); - - element.on('touchend mouseup', function(event) { - if (!active) return; - active = false; - eventHandlers['end'] && eventHandlers['end'](getCoordinates(event)); - }); - } - }; -}]); - -/** - * @ngdoc directive - * @name ngTouch.directive:ngClick - * - * @description - * A more powerful replacement for the default ngClick designed to be used on touchscreen - * devices. Most mobile browsers wait about 300ms after a tap-and-release before sending - * the click event. This version handles them immediately, and then prevents the - * following click event from propagating. - * - * This directive can fall back to using an ordinary click event, and so works on desktop - * browsers as well as mobile. - * - * This directive also sets the CSS class `ng-click-active` while the element is being held - * down (by a mouse click or touch) so you can restyle the depressed element if you wish. - * - * @element ANY - * @param {expression} ngClick {@link guide/expression Expression} to evaluate - * upon tap. (Event object is available as `$event`) - * - * @example - - - - count: {{ count }} - - - */ - -ngTouch.config(['$provide', function($provide) { - $provide.decorator('ngClickDirective', ['$delegate', function($delegate) { - // drop the default ngClick directive - $delegate.shift(); - return $delegate; - }]); -}]); - -ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement', - function($parse, $timeout, $rootElement) { - var TAP_DURATION = 750; // Shorter than 750ms is a tap, longer is a taphold or drag. - var MOVE_TOLERANCE = 12; // 12px seems to work in most mobile browsers. - var PREVENT_DURATION = 2500; // 2.5 seconds maximum from preventGhostClick call to click - var CLICKBUSTER_THRESHOLD = 25; // 25 pixels in any dimension is the limit for busting clicks. - - var ACTIVE_CLASS_NAME = 'ng-click-active'; - var lastPreventedTime; - var touchCoordinates; - - - // TAP EVENTS AND GHOST CLICKS - // - // Why tap events? - // Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're - // double-tapping, and then fire a click event. - // - // This delay sucks and makes mobile apps feel unresponsive. - // So we detect touchstart, touchmove, touchcancel and touchend ourselves and determine when - // the user has tapped on something. - // - // What happens when the browser then generates a click event? - // The browser, of course, also detects the tap and fires a click after a delay. This results in - // tapping/clicking twice. So we do "clickbusting" to prevent it. - // - // How does it work? - // We attach global touchstart and click handlers, that run during the capture (early) phase. - // So the sequence for a tap is: - // - global touchstart: Sets an "allowable region" at the point touched. - // - element's touchstart: Starts a touch - // (- touchmove or touchcancel ends the touch, no click follows) - // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold - // too long) and fires the user's tap handler. The touchend also calls preventGhostClick(). - // - preventGhostClick() removes the allowable region the global touchstart created. - // - The browser generates a click event. - // - The global click handler catches the click, and checks whether it was in an allowable region. - // - If preventGhostClick was called, the region will have been removed, the click is busted. - // - If the region is still there, the click proceeds normally. Therefore clicks on links and - // other elements without ngTap on them work normally. - // - // This is an ugly, terrible hack! - // Yeah, tell me about it. The alternatives are using the slow click events, or making our users - // deal with the ghost clicks, so I consider this the least of evils. Fortunately Angular - // encapsulates this ugly logic away from the user. - // - // Why not just put click handlers on the element? - // We do that too, just to be sure. The problem is that the tap event might have caused the DOM - // to change, so that the click fires in the same position but something else is there now. So - // the handlers are global and care only about coordinates and not elements. - - // Checks if the coordinates are close enough to be within the region. - function hit(x1, y1, x2, y2) { - return Math.abs(x1 - x2) < CLICKBUSTER_THRESHOLD && Math.abs(y1 - y2) < CLICKBUSTER_THRESHOLD; - } - - // Checks a list of allowable regions against a click location. - // Returns true if the click should be allowed. - // Splices out the allowable region from the list after it has been used. - function checkAllowableRegions(touchCoordinates, x, y) { - for (var i = 0; i < touchCoordinates.length; i += 2) { - if (hit(touchCoordinates[i], touchCoordinates[i+1], x, y)) { - touchCoordinates.splice(i, i + 2); - return true; // allowable region - } - } - return false; // No allowable region; bust it. - } - - // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick - // was called recently. - function onClick(event) { - if (Date.now() - lastPreventedTime > PREVENT_DURATION) { - return; // Too old. - } - - var touches = event.touches && event.touches.length ? event.touches : [event]; - var x = touches[0].clientX; - var y = touches[0].clientY; - // Work around desktop Webkit quirk where clicking a label will fire two clicks (on the label - // and on the input element). Depending on the exact browser, this second click we don't want - // to bust has either (0,0) or negative coordinates. - if (x < 1 && y < 1) { - return; // offscreen - } - - // Look for an allowable region containing this click. - // If we find one, that means it was created by touchstart and not removed by - // preventGhostClick, so we don't bust it. - if (checkAllowableRegions(touchCoordinates, x, y)) { - return; - } - - // If we didn't find an allowable region, bust the click. - event.stopPropagation(); - event.preventDefault(); - - // Blur focused form elements - event.target && event.target.blur(); - } - - - // Global touchstart handler that creates an allowable region for a click event. - // This allowable region can be removed by preventGhostClick if we want to bust it. - function onTouchStart(event) { - var touches = event.touches && event.touches.length ? event.touches : [event]; - var x = touches[0].clientX; - var y = touches[0].clientY; - touchCoordinates.push(x, y); - - $timeout(function() { - // Remove the allowable region. - for (var i = 0; i < touchCoordinates.length; i += 2) { - if (touchCoordinates[i] == x && touchCoordinates[i+1] == y) { - touchCoordinates.splice(i, i + 2); - return; - } - } - }, PREVENT_DURATION, false); - } - - // On the first call, attaches some event handlers. Then whenever it gets called, it creates a - // zone around the touchstart where clicks will get busted. - function preventGhostClick(x, y) { - if (!touchCoordinates) { - $rootElement[0].addEventListener('click', onClick, true); - $rootElement[0].addEventListener('touchstart', onTouchStart, true); - touchCoordinates = []; - } - - lastPreventedTime = Date.now(); - - checkAllowableRegions(touchCoordinates, x, y); - } - - // Actual linking function. - return function(scope, element, attr) { - var clickHandler = $parse(attr.ngClick), - tapping = false, - tapElement, // Used to blur the element after a tap. - startTime, // Used to check if the tap was held too long. - touchStartX, - touchStartY; - - function resetState() { - tapping = false; - element.removeClass(ACTIVE_CLASS_NAME); - } - - element.on('touchstart', function(event) { - tapping = true; - tapElement = event.target ? event.target : event.srcElement; // IE uses srcElement. - // Hack for Safari, which can target text nodes instead of containers. - if(tapElement.nodeType == 3) { - tapElement = tapElement.parentNode; - } - - element.addClass(ACTIVE_CLASS_NAME); - - startTime = Date.now(); - - var touches = event.touches && event.touches.length ? event.touches : [event]; - var e = touches[0].originalEvent || touches[0]; - touchStartX = e.clientX; - touchStartY = e.clientY; - }); - - element.on('touchmove', function(event) { - resetState(); - }); - - element.on('touchcancel', function(event) { - resetState(); - }); - - element.on('touchend', function(event) { - var diff = Date.now() - startTime; - - var touches = (event.changedTouches && event.changedTouches.length) ? event.changedTouches : - ((event.touches && event.touches.length) ? event.touches : [event]); - var e = touches[0].originalEvent || touches[0]; - var x = e.clientX; - var y = e.clientY; - var dist = Math.sqrt( Math.pow(x - touchStartX, 2) + Math.pow(y - touchStartY, 2) ); - - if (tapping && diff < TAP_DURATION && dist < MOVE_TOLERANCE) { - // Call preventGhostClick so the clickbuster will catch the corresponding click. - preventGhostClick(x, y); - - // Blur the focused element (the button, probably) before firing the callback. - // This doesn't work perfectly on Android Chrome, but seems to work elsewhere. - // I couldn't get anything to work reliably on Android Chrome. - if (tapElement) { - tapElement.blur(); - } - - if (!angular.isDefined(attr.disabled) || attr.disabled === false) { - element.triggerHandler('click', event); - } - } - - resetState(); - }); - - // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click - // something else nearby. - element.onclick = function(event) { }; - - // Actual click handler. - // There are three different kinds of clicks, only two of which reach this point. - // - On desktop browsers without touch events, their clicks will always come here. - // - On mobile browsers, the simulated "fast" click will call this. - // - But the browser's follow-up slow click will be "busted" before it reaches this handler. - // Therefore it's safe to use this directive on both mobile and desktop. - element.on('click', function(event) { - scope.$apply(function() { - clickHandler(scope, {$event: event}); - }); - }); - - element.on('mousedown', function(event) { - element.addClass(ACTIVE_CLASS_NAME); - }); - - element.on('mousemove mouseup', function(event) { - element.removeClass(ACTIVE_CLASS_NAME); - }); - - }; -}]); - -/** - * @ngdoc directive - * @name ngTouch.directive:ngSwipeLeft - * - * @description - * Specify custom behavior when an element is swiped to the left on a touchscreen device. - * A leftward swipe is a quick, right-to-left slide of the finger. - * Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag too. - * - * @element ANY - * @param {expression} ngSwipeLeft {@link guide/expression Expression} to evaluate - * upon left swipe. (Event object is available as `$event`) - * - * @example - - -
- Some list content, like an email in the inbox -
-
- - -
-
-
- */ - -/** - * @ngdoc directive - * @name ngTouch.directive:ngSwipeRight - * - * @description - * Specify custom behavior when an element is swiped to the right on a touchscreen device. - * A rightward swipe is a quick, left-to-right slide of the finger. - * Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag too. - * - * @element ANY - * @param {expression} ngSwipeRight {@link guide/expression Expression} to evaluate - * upon right swipe. (Event object is available as `$event`) - * - * @example - - -
- Some list content, like an email in the inbox -
-
- - -
-
-
- */ - -function makeSwipeDirective(directiveName, direction, eventName) { - ngTouch.directive(directiveName, ['$parse', '$swipe', function($parse, $swipe) { - // The maximum vertical delta for a swipe should be less than 75px. - var MAX_VERTICAL_DISTANCE = 75; - // Vertical distance should not be more than a fraction of the horizontal distance. - var MAX_VERTICAL_RATIO = 0.3; - // At least a 30px lateral motion is necessary for a swipe. - var MIN_HORIZONTAL_DISTANCE = 30; - - return function(scope, element, attr) { - var swipeHandler = $parse(attr[directiveName]); - - var startCoords, valid; - - function validSwipe(coords) { - // Check that it's within the coordinates. - // Absolute vertical distance must be within tolerances. - // Horizontal distance, we take the current X - the starting X. - // This is negative for leftward swipes and positive for rightward swipes. - // After multiplying by the direction (-1 for left, +1 for right), legal swipes - // (ie. same direction as the directive wants) will have a positive delta and - // illegal ones a negative delta. - // Therefore this delta must be positive, and larger than the minimum. - if (!startCoords) return false; - var deltaY = Math.abs(coords.y - startCoords.y); - var deltaX = (coords.x - startCoords.x) * direction; - return valid && // Short circuit for already-invalidated swipes. - deltaY < MAX_VERTICAL_DISTANCE && - deltaX > 0 && - deltaX > MIN_HORIZONTAL_DISTANCE && - deltaY / deltaX < MAX_VERTICAL_RATIO; - } - - $swipe.bind(element, { - 'start': function(coords) { - startCoords = coords; - valid = true; - }, - 'cancel': function() { - valid = false; - }, - 'end': function(coords) { - if (validSwipe(coords)) { - scope.$apply(function() { - element.triggerHandler(eventName); - swipeHandler(scope); - }); - } - } - }); - }; - }]); -} - -// Left is negative X-coordinate, right is positive. -makeSwipeDirective('ngSwipeLeft', -1, 'swipeleft'); -makeSwipeDirective('ngSwipeRight', 1, 'swiperight'); - - - -})(window, window.angular); diff --git a/example/angular/chat/app.js b/example/angular/chat/app.js deleted file mode 100644 index ad091ad240e..00000000000 --- a/example/angular/chat/app.js +++ /dev/null @@ -1,27 +0,0 @@ -var chat = angular.module('Chat', ['ngTouch']); - -chat.controller('MenuCtrl', function($scope) { - $scope.isPanelShowing = false; -}); - -chat.controller('RoomsCtrl', function($scope) { - $scope.rooms = [ - { name: 'All', key: 'all' }, - { name: 'Marketing', key: 'marketing' } - ]; -}); - -// TODO: Move this to a directive corresponding to this panel -// Grab the sections -var page = document.getElementById('page'); -var leftPanel = document.getElementById('left-panel'); -var rightPanel = document.getElementById('right-panel'); -var controller = new ion.controllers.LeftRightPanelViewController({ - left: leftPanel, - leftWidth: 270, - right: rightPanel, - rightWidth: 270, - center: page, - animateClass: 'ion-panel-animated' -}); - diff --git a/example/angular/chat/index.html b/example/angular/chat/index.html deleted file mode 100644 index c608b5b1a07..00000000000 --- a/example/angular/chat/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - -
-
    -
  • - Max Lynch -
  • -
-
- -
-
    -
  • - Max Lynch -
  • -
-
- -
- -
- -

Feeds

-
- -
-
    -
  • - {{room.name}} -
  • -
-
-
- - - - - - - - - - diff --git a/example/angular/customer.html b/example/angular/customer.html deleted file mode 100644 index 8a55a6bbf94..00000000000 --- a/example/angular/customer.html +++ /dev/null @@ -1,5 +0,0 @@ -
-

{{customer.name}}

- Edit - Delete -
diff --git a/example/angular/customers.html b/example/angular/customers.html deleted file mode 100644 index 25e9bbf1ff7..00000000000 --- a/example/angular/customers.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/example/angular/test/menu.unit.js b/example/angular/test/menu.unit.js deleted file mode 100644 index c78143c2350..00000000000 --- a/example/angular/test/menu.unit.js +++ /dev/null @@ -1,5 +0,0 @@ -describe('Menu directive', function() { - - it('Adds a menu class to the panel element', function() { - }); -}); diff --git a/example/toderp/app.css b/example/toderp/app.css deleted file mode 100644 index 5c98e6bd239..00000000000 --- a/example/toderp/app.css +++ /dev/null @@ -1,55 +0,0 @@ -body { - background: url('bg-ex.jpg') no-repeat transparent; - background-size: cover; -} -.content { - background-color: transparent; -} -label { - background-color: rgba(255, 255, 255, 0.6); -} -input { - background-color: transparent !important; -} -/* -#signup-button { - position: fixed; - bottom: 10px; - z-index: 4; - width: auto; - left: 10px; - right: 10px; -} -*/ -.pane { - position: fixed; - width: 100%; - height: 100%; - left: 0; - top: 0; -} -.reveal-animation { - /* - -webkit-transform: translate3d(0%, 0, 0); - transform: translate3d(0%, 0, 0); - - -webkit-transition: -webkit-transform 1s ease-in-out; - transition: transform 1s ease-in-out; - */ -} -.reveal-animation > .ng-enter { - -webkit-transition: .2s ease-in-out all; - -webkit-transform:translate3d(100%,0,0) ; -} -.reveal-animation > .ng-enter-active { - -webkit-transform:translate3d(0,0,0) ; -} -.reveal-animation > .ng-leave { - -webkit-transition: .2s ease-in-out all; - -webkit-transform:translate3d(0%,0,0); -} -.reveal-animation > .ng-leave-active { - -webkit-transition: .2s ease-in-out all; - -webkit-transform:translate3d(-100%,0,0); -} - diff --git a/example/toderp/app.js b/example/toderp/app.js deleted file mode 100644 index 9fd01bce23b..00000000000 --- a/example/toderp/app.js +++ /dev/null @@ -1,132 +0,0 @@ -angular.module('toderp', ['firebase']) - -.factory('TaskStorageService', function() { - return { - getTasks: function() { - var tasks = window.localStorage['tasks']; - try { - return JSON.parse(tasks); - } catch(e) {} - return []; - }, - addTask: function(task) { - var tasks = window.localStorage['tasks'] || "[]"; - try { - var taskObj = JSON.parse(tasks); - taskObj && taskObj.push(task); - this.setTasks(taskObj); - } catch(e) {} - }, - deleteTask: function(index) { - var tasks = window.localStorage['tasks'] || "[]"; - try { - var taskObj = JSON.parse(tasks); - taskObj && taskObj.splice(index); - this.setTasks(taskObj); - } catch(e) {} - }, - setTasks: function(tasks) { - window.localStorage.setItem('tasks', JSON.stringify(tasks)); - } - } -}) - -.filter('todaysTasks', function() { - return function(value) { - return value.filter(function(a) { - return !a.isDone; - }).sort(function(a, b) { - if(a.priority > b.priority) return 1; - if(a.priority < b.priority) return -1; - return 0; - }).slice(0, 3); - } -}) - -.factory('TaskListService', ['TaskStorageService', function(TaskStorageService) { - - var tasks = Array.prototype.slice.call(TaskStorageService.getTasks()); - - return { - tasks: tasks, - - addTask: function(task) { - this.tasks.push(task); - TaskStorageService.addTask(task); - return task; - }, - deleteTask: function($index) { - var last = this.tasks.splice($index, 1); - TaskStorageService.deleteTask(task); - return last; - }, - getTasks: function() { - return this.tasks; - } - }; -}]) - -.controller('TodaysTaskListCtrl', ['$scope', 'TaskListService', function($scope, TaskListService) { - $scope.tasks = TaskListService.tasks; - - $scope.promptNewTask = function() { - var data = prompt('What do you need to do?') - - TaskListService.addTask({ - text: data - }); - }; -}]) - -.controller('TaskListCtrl', ['$scope', 'TaskListService', function($scope, TaskListService) { - $scope.tasks = TaskListService.tasks; -}]) - - -var ListViewController = function(options) { - var _this = this; - - this.list = options.list; - - window.ion.onGesture('release', function(e) { - _this._endDrag(e); - }, this.list); - - window.ion.onGesture('swiperight', function(e) { - _this._handleSwipeRight(e); - }, this.list); - - window.ion.onGesture('drag', function(e) { - _this._handleDrag(e); - }, this.list); -}; - -ListViewController.prototype = { - _endDrag: function(e) { - - }, - _handleDrag: function(e) { - console.log('Dragging', e); - }, - _handleSwipeRight: function(e) { - console.log('SWIPRIGHT', e); - } -}; - -var list = document.getElementById('tasks'); -var listViewController = new ListViewController({ - list: list -}); - -var page = document.getElementById('page'); -var leftPanel = document.getElementById('tasks-menu'); -var controller = new ion.controllers.LeftRightMenuViewController({ - isRightEnabled: false, - center: page, - left: leftPanel, - leftWidth: 270, - animateClass: 'menu-animated' -}); -window.ion.onGesture('tap', function(e) { - controller.toggleLeft(); -}, document.getElementById('menu-button')); diff --git a/example/toderp/bg-ex.jpg b/example/toderp/bg-ex.jpg deleted file mode 100644 index f064804af41..00000000000 Binary files a/example/toderp/bg-ex.jpg and /dev/null differ diff --git a/example/toderp/index.html b/example/toderp/index.html deleted file mode 100644 index 81ccfb11967..00000000000 --- a/example/toderp/index.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - ToDerp - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
-

ToDerp

-

Finish your Top Three Tasks Today

-
-
-
- - -
-
- -
Invalid email/password. Please try again.
-
-
- -
-
- -
-
- Back -

Sign up (it's free!)

-
-
-
-
- - -
-
- -
Unable to signup, please try again.
-
-
-
-
- -
-
- -

Your Tasks

-
-
-
- - -
-
-
    -
  • - {{task.text}} - -
  • -
-
-
-
-
- - - diff --git a/example/toderp/js/toderp.js b/example/toderp/js/toderp.js deleted file mode 100644 index 33b60026a13..00000000000 --- a/example/toderp/js/toderp.js +++ /dev/null @@ -1,104 +0,0 @@ -angular.module('toderp', ['firebase', 'ngRoute', 'ngAnimate']) - -.constant('FIREBASE_URL', 'https://ionic-todo-demo.firebaseio.com/') - -.controller('ToderpCtrl', function($scope, $rootScope, AuthService) { - $scope.display = { - screen: 'splash' - }; - $rootScope.$on('angularFireAuth:login', function(evt, user) { - $scope.display.screen = 'tasks'; - }); - $rootScope.$on('angularFireAuth:logout', function(evt, user) { - console.log('Logged out!', evt, user); - $scope.display.screen = 'login'; - }); - $rootScope.$on('angularFireAuth:error', function(evt, err) { - console.log('Login Error!', evt, err); - }); - - $scope.setScreen = function(screen) { - $scope.display.screen = screen; - }; -}) - -.factory('AuthService', function(angularFireAuth, $rootScope, FIREBASE_URL) { - var ref = new Firebase(FIREBASE_URL); - angularFireAuth.initialize(ref, { - scope: $rootScope, - callback: function(user, err) { - console.log('AUTH CHANGED', err, user); - }, - name: 'user' - }); - - return { - login: function(email, password) { - if(!email || !password) { - return; - } - console.log('Logging in', email, password); - return angularFireAuth.login('password', { - email: email, - password: password - }); - }, - signup: function(email, password) { - if(!email || !password) { - return; - } - console.log('Signing up', name, email, password); - - angularFireAuth.createUser(email, password, function(err, user) { - console.log('SIGED UP', err, user); - }); - } - }; -}) - -.controller('LoginCtrl', function($scope, AuthService) { - console.log('Created login Ctrl'); - - $scope.loginForm = { - email: 'max@drifty.com', - password: 'test' - }; - - $scope.tryLogin = function(data) { - $scope.loginError = false; - AuthService.login(data.email, data.password) - .then(function(e) { - $scope.loginError = false; - }, function(e) { - $scope.loginError = true; - }); - }; - - $scope.showSignup = function() { - $scope.setScreen('signup'); - }; -}) - -.controller('SignupCtrl', function($scope, AuthService) { - - $scope.trySignup = function(data) { - AuthService.signup(data.email, data.password); - }; -}) - -.controller('TasksCtrl', function($scope, angularFire, FIREBASE_URL) { - var taskRef = new Firebase(FIREBASE_URL + '/todos'); - $scope.todos = []; - angularFire(taskRef, $scope, 'todos'); - $scope.addTask = function(task) { - var t = {}; - t = angular.extend({ - id: $scope.user.id - }, task); - - console.log("Adding task:", t); - $scope.todos.push(t); - - $scope.task = {}; - }; -}); diff --git a/example/toderp2/index.html b/example/toderp2/index.html index 0d40e1faf26..a6fd20b9ff0 100644 --- a/example/toderp2/index.html +++ b/example/toderp2/index.html @@ -110,7 +110,7 @@

Log in

diff --git a/scss/ionic/_scaffolding.scss b/scss/ionic/_scaffolding.scss index c489f05fb39..304646bc752 100644 --- a/scss/ionic/_scaffolding.scss +++ b/scss/ionic/_scaffolding.scss @@ -94,6 +94,18 @@ body, .ionic-body { bottom: 84px; } +.pane { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + background-color: #fff; +} + .page, .full-section { position: fixed; top: 0; diff --git a/test/controllers/sideMenu.html b/test/controllers/sideMenu.html index 9d5ab7a81d2..b2492f522a2 100644 --- a/test/controllers/sideMenu.html +++ b/test/controllers/sideMenu.html @@ -10,7 +10,7 @@ -