Upgrade to angularjs 1.2.0 rc1

This commit is contained in:
Colin Frei 2013-08-21 19:46:51 +02:00
parent d223dfd662
commit d6b021bfaf
674 changed files with 79667 additions and 62269 deletions

View file

@ -1,11 +1,14 @@
/*
AngularJS v1.1.4
AngularJS v1.2.0rc1
(c) 2010-2012 Google, Inc. http://angularjs.org
License: MIT
*/
(function(B,f,x){'use strict';f.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(y,z){function v(g,c){this.template=g+"#";this.defaults=c||{};this.urlParams={}}function w(g,c,d){function j(e,b){var p={},b=q({},c,b);k(b,function(a,b){l(a)&&(a=a());var h;a.charAt&&a.charAt(0)=="@"?(h=a.substr(1),h=z(h)(e)):h=a;p[b]=h});return p}function b(b){u(b||{},this)}var m=new v(g),d=q({},A,d);k(d,function(e,c){e.method=f.uppercase(e.method);var p=e.method=="POST"||e.method=="PUT"||e.method==
"PATCH";b[c]=function(a,c,h,g){function f(){i.$resolved=!0}var n={},d,o=r,s=null;switch(arguments.length){case 4:s=g,o=h;case 3:case 2:if(l(c)){if(l(a)){o=a;s=c;break}o=c;s=h}else{n=a;d=c;o=h;break}case 1:l(a)?o=a:p?d=a:n=a;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+arguments.length+" arguments.";}var i=this instanceof b?this:e.isArray?[]:new b(d),t={};k(e,function(a,b){b!="params"&&b!="isArray"&&(t[b]=u(a))});t.data=d;m.setUrlParams(t,q({},
j(d,e.params||{}),n),e.url);n=y(t);i.$resolved=!1;n.then(f,f);i.$then=n.then(function(a){var c=a.data,h=i.$then,d=i.$resolved;if(c)e.isArray?(i.length=0,k(c,function(a){i.push(new b(a))})):(u(c,i),i.$then=h,i.$resolved=d);(o||r)(i,a.headers);a.resource=i;return a},s).then;return i};b.prototype["$"+c]=function(a,e,h){var d=j(this),f=r,g;switch(arguments.length){case 3:d=a;f=e;g=h;break;case 2:case 1:l(a)?(f=a,g=e):(d=a,f=e||r);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+
arguments.length+" arguments.";}b[c].call(this,d,p?this:x,f,g)}});b.bind=function(b){return w(g,q({},c,b),d)};return b}var A={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},r=f.noop,k=f.forEach,q=f.extend,u=f.copy,l=f.isFunction;v.prototype={setUrlParams:function(g,c,d){var j=this,b=d||j.template,m,e,l=j.urlParams={};k(b.split(/\W/),function(c){c&&RegExp("(^|[^\\\\]):"+c+"(\\W|$)").test(b)&&(l[c]=!0)});b=b.replace(/\\:/g,
":");c=c||{};k(j.urlParams,function(d,a){m=c.hasOwnProperty(a)?c[a]:j.defaults[a];f.isDefined(m)&&m!==null?(e=encodeURIComponent(m).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),b=b.replace(RegExp(":"+a+"(\\W|$)","g"),e+"$1")):b=b.replace(RegExp("(/?):"+a+"(\\W|$)","g"),function(a,b,c){return c.charAt(0)=="/"?c:b+c})});g.url=b.replace(/\/?#$/,"").replace(/\/*$/,"");k(c,function(b,
a){if(!j.urlParams[a])g.params=g.params||{},g.params[a]=b})}};return w}])})(window,window.angular);
(function(H,g,C){'use strict';var A=g.$$minErr("$resource");g.module("ngResource",["ng"]).factory("$resource",["$http","$parse","$q",function(D,y,E){function n(g,h){this.template=g;this.defaults=h||{};this.urlParams={}}function u(l,h,d){function p(c,b){var e={};b=v({},h,b);q(b,function(a,b){t(a)&&(a=a());var m;a&&a.charAt&&"@"==a.charAt(0)?(m=a.substr(1),m=y(m)(c)):m=a;e[b]=m});return e}function b(c){return c.resource}function e(c){z(c||{},this)}var F=new n(l);d=v({},G,d);q(d,function(c,f){var h=
/^(POST|PUT|PATCH)$/i.test(c.method);e[f]=function(a,f,m,l){var d={},r,s,w;switch(arguments.length){case 4:w=l,s=m;case 3:case 2:if(t(f)){if(t(a)){s=a;w=f;break}s=f;w=m}else{d=a;r=f;s=m;break}case 1:t(a)?s=a:h?r=a:d=a;break;case 0:break;default:throw A("badargs",arguments.length);}var n=r instanceof e,k=n?r:c.isArray?[]:new e(r),x={},u=c.interceptor&&c.interceptor.response||b,y=c.interceptor&&c.interceptor.responseError||C;q(c,function(a,c){"params"!=c&&("isArray"!=c&&"interceptor"!=c)&&(x[c]=z(a))});
x.data=r;F.setUrlParams(x,v({},p(r,c.params||{}),d),c.url);d=D(x).then(function(a){var b=a.data,f=k.$promise;if(b){if(g.isArray(b)!=!!c.isArray)throw A("badcfg",c.isArray?"array":"object",g.isArray(b)?"array":"object");c.isArray?(k.length=0,q(b,function(a){k.push(new e(a))})):(z(b,k),k.$promise=f)}k.$resolved=!0;(s||B)(k,a.headers);a.resource=k;return a},function(a){k.$resolved=!0;(w||B)(a);return E.reject(a)}).then(u,y);return n?d:(k.$promise=d,k.$resolved=!1,k)};e.prototype["$"+f]=function(a,c,
b){t(a)&&(b=c,c=a,a={});a=e[f](a,this,c,b);return a.$promise||a}});e.bind=function(c){return u(l,v({},h,c),d)};return e}var G={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},B=g.noop,q=g.forEach,v=g.extend,z=g.copy,t=g.isFunction;n.prototype={setUrlParams:function(l,h,d){var p=this,b=d||p.template,e,n,c=p.urlParams={};q(b.split(/\W/),function(f){!/^\d+$/.test(f)&&(f&&RegExp("(^|[^\\\\]):"+f+"(\\W|$)").test(b))&&(c[f]=!0)});
b=b.replace(/\\:/g,":");h=h||{};q(p.urlParams,function(c,d){e=h.hasOwnProperty(d)?h[d]:p.defaults[d];g.isDefined(e)&&null!==e?(n=encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),b=b.replace(RegExp(":"+d+"(\\W|$)","g"),n+"$1")):b=b.replace(RegExp("(/?):"+d+"(\\W|$)","g"),function(a,c,b){return"/"==b.charAt(0)?b:c+b})});b=b.replace(/\/+$/,"");b=b.replace(/\/\.(?=\w+($|\?))/,
".");l.url=b.replace(/\/\\\./,"/.");q(h,function(c,b){p.urlParams[b]||(l.params=l.params||{},l.params[b]=c)})}};return u}])})(window,window.angular);
/*
//@ sourceMappingURL=angular-resource.min.js.map
*/