From 88b415a3dccefe80f52a05909e13b266a43939b4 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 29 Jan 2010 10:20:22 -0800 Subject: added bootstrap, fixed formatter --- angular-minified.js | 66 ++++++++++++++++++++++++++--------------------------- angular.js | 25 ++++++++++---------- 2 files changed, 46 insertions(+), 45 deletions(-) diff --git a/angular-minified.js b/angular-minified.js index 86bb47b5..cbaa88dc 100644 --- a/angular-minified.js +++ b/angular-minified.js @@ -4,24 +4,24 @@ default:return false}}function ha(a,b){if(ga(a))if(U)a.innerText=b;else a.textCo b.appendChild(a);var c=b.innerHTML;b.removeChild(a);return c}function V(a){var b=(""+a).toLowerCase();if(b=="f"||b=="0"||b=="false"||b=="no")a=false;return!!a}function W(a,b){for(var c in a){var d=b[c],e=typeof d;if(e=="undefined")b[c]=M(w(a[c]));else e=="object"&&d.constructor!=array&&c.substring(0,1)!="$"&&W(a[c],d)}}function ja(a){this.location=a;this.delay=25;this.setTimeout=function(b,c){o.setTimeout(b,c)};this.Ea=function(b){return b};this.N=a.href}function Ja(){var a=k.fn;a.scope=function(){for(var b= this;b&&b.get(0);){var c=b.data("scope");if(c)return c;b=b.parent()}return null};a.controller=function(){return this.data("controller")||R.Jb}}function Ka(a){if(a.Gc=="console"&&!Q){Q=y.createElement("div");Q.id="ng-console";y.getElementsByTagName("body")[0].appendChild(Q);L=function(){fa("ng-console-info",arguments)};console.error=function(){fa("ng-console-error",arguments)}}}function aa(a,b){var c={};p(b,function(d,e){c[e]=_(d).bind(a)});return c}function La(a,b){var c=new ka(b.server,b.database), d=new x(a[0],c,h,b.location,b);c=new S(a.find("body"),b.server,b.database);var e=b.database=="$MEMORY"?new ba(o):new la(b.server,k.getScript);e=new ma(e,new X(k(a.body)),function(){d.d()});var f=new na(e,c),g="/data/"+b.database,h=new Y(function(l,q){e.P("POST",g,l,q)},f,d.anchor);d.k=h;d.Va.push(function(){h.V()});var i=new v({$anchor:d.anchor,$updateView:_(d.d).bind(d),$config:b,$console:o.console,$datastore:aa(h,{load:h.load,loadMany:h.la,loadOrCreate:h.Ha,loadAll:h.Ga,save:h.save,remove:h.remove, -flush:h.V,query:h.Qa,entity:h.F,entities:h.entities,documentCountsByUser:h.xb,userDocumentIdsByEntity:h.sc,join:h.join}),$save:function(l){h.lc(i.w,l,d.anchor)},$window:o,$uid:function(){return""+(new Date).getTime()},$users:f},"ROOT");a.data("scope",i);d.F(i);d.compile();c.bind();(new A(a)).bind();var j=_(aa(i,{updateView:i.d,set:i.h,get:i.get,eval:i.eval})).extend({init:function(){b.location.listen(_(d.fc).bind(d));d.Na();d.Db();d.d();return j},element:a[0],config:b});return j}function G(a,b,c){var d= -_.last(b);p(c,function(e){d[e]=_[e]});m[a]=m[a]||{};p(b,function(e){B(m[a],e)})}function x(a,b,c,d,e){this.D=a;this.location=d;this.k=c;this.anchor={};this.xc=b;this.rb=e||{};this.Va=[]}function S(a,b,c){this.eb=a;this.ea=b;this.ja=c;this.ib=o;this.H=[]}function Y(a,b,c){this.post=a;this.Xa=b;this.K=[];this.fa={$collections:this.K};this.anchor=c;this.R=[]}function oa(a){return""+a}function w(a,b){var c=[];ca(c,a,b?"\n ":null,_([]));return c.join("")}function M(a){try{var b=new E(a,true),c=b.ca(); +flush:h.V,query:h.Qa,entity:h.G,entities:h.entities,documentCountsByUser:h.xb,userDocumentIdsByEntity:h.sc,join:h.join}),$save:function(l){h.lc(i.w,l,d.anchor)},$window:o,$uid:function(){return""+(new Date).getTime()},$users:f},"ROOT");a.data("scope",i);d.G(i);d.compile();c.bind();(new A(a)).bind();var j=_(aa(i,{updateView:i.d,set:i.h,get:i.get,eval:i.eval})).extend({init:function(){b.location.listen(_(d.fc).bind(d));d.Na();d.Db();d.d();return j},element:a[0],config:b});return j}function G(a,b,c){var d= +_.last(b);p(c,function(e){d[e]=_[e]});m[a]=m[a]||{};p(b,function(e){B(m[a],e)})}function x(a,b,c,d,e){this.F=a;this.location=d;this.k=c;this.anchor={};this.xc=b;this.rb=e||{};this.Va=[]}function S(a,b,c){this.eb=a;this.ea=b;this.ja=c;this.ib=o;this.H=[]}function Y(a,b,c){this.post=a;this.Xa=b;this.K=[];this.fa={$collections:this.K};this.anchor=c;this.R=[]}function oa(a){return""+a}function w(a,b){var c=[];ca(c,a,b?"\n ":null,_([]));return c.join("")}function M(a){try{var b=new E(a,true),c=b.ca(); b.L();return c()}catch(d){$("fromJson error: ",a,d);throw d;}}function ca(a,b,c,d){if(typeof b=="object"){if(d.include(b)){a.push("RECURSION");return}d.push(b)}var e=typeof b;if(b===null)a.push("null");else if(e==="function")return;else if(e==="boolean")a.push(""+b);else if(e==="number")isNaN(b)?a.push("null"):a.push(""+b);else if(e==="string")return a.push(m.String.quoteUnicode(b));else if(e==="object")if(b instanceof Array){a.push("[");var f=b.length;e=false;for(var g=0;g>2;c=(c&3)<<4|d>>4;g=(d&15)<<2|e>>6;h=e&63;if(isNaN(d))g=h=64;else if(isNaN(e))h=64;b=b+this.A.charAt(f)+this.A.charAt(c)+this.A.charAt(g)+this.A.charAt(h)}return b},Hc:function(a){var b="",c,d,e,f,g,h=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");h>4;d=(d&15)<<4|f>>2;e=(f&3)<<6|g;b+=String.fromCharCode(c);if(f!=64)b+=String.fromCharCode(d);if(g!=64)b+= -String.fromCharCode(e)}return b=da.gb(b)},hb:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c127&&d<2048)b+=String.fromCharCode(d>>6|192);else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128)}b+=String.fromCharCode(d&63|128)}}return b},gb:function(a){for(var b="",c=0,d=c1=c2=0;c191&&d<224){c2=a.charCodeAt(c+1); -b+=String.fromCharCode((d&31)<<6|c2&63);c+=2}else{c2=a.charCodeAt(c+1);c3=a.charCodeAt(c+2);b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63);c+=3}}return b}};if(typeof y.getAttribute=="undefined")y.getAttribute=K();if(typeof Node=="undefined")Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};o.console||(o.console= -{log:n,error:n});var Q,U,k=o.jQuery||o.$,p=_.each,B=_.extend,Da=_.identity,m=o.angular||(o.angular={}),Ea=m.validator||(m.validator={}),r=m.filter||(m.filter={}),ea=m.formatter||(m.formatter={}),O=m.callbacks||(m.callbacks={});m.alert||(m.alert=function(){L(arguments);o.alert.apply(o,arguments)});ja.prototype={Ob:function(a){this.Ea=a},watch:function(){var a=this;function b(){if(a.N!==a.location.href){var c=a.location.hash.match(/^#\$iframe_notify=(.*)$/);if(c){a.N.match(/#/)||(a.N+="#");a.location.href= -a.N;c="_iframe_notify_"+c[1];var d=O[c];delete O[c];try{(d||n)()}catch(e){alert(e)}}else{a.Ea(a.location.href);a.N=a.location.href}}a.setTimeout(b,a.delay)}b()},h:function(a){var b=this.location.href;b.match(/#/)||(b+="#");if(b!=a)this.location.href=a;this.Kc=a},get:function(){return o.location.href}};m.startUrlWatcher=function(){var a=new ja(o.location);a.watch();return aa(a,{listen:a.Ob,set:a.h,get:a.get})};m.compile=function(a,b){k=o.jQuery;U=k.browser.msie;b=_({server:"",location:{get:n,set:n, -listen:n}}).extend(b||{});Ka(b);Ja();return La(k(a),b)};var I={typeOf:function(a){if(a===null)return"null";var b=typeof a;if(b=="object"){if(a instanceof Array)return"array";if(a instanceof Date)return"date";if(a.nodeType==1)return"element"}return b}},Z={},Fa={includeIf:function(a,b,c){var d=_.indexOf(a,b);if(c)d==-1&&a.push(b);else a.splice(d,1);return a},sum:function(a,b){b=m.Function.compile(b);for(var c=0,d=0;d=0&&a.splice(c,1);return b},find:function(a,b,c){if(b){var d=m.Function.compile(b);_.detect(a,function(e){if(d(e)){c=e;return true}});return c}},findById:function(a,b){return m.zc.find(a,function(c){return c.Za==b},null)},filter:function(a,b){var c=[];c.qb=function(j){for(var l=0;l --1;case "object":for(var q in j)if(q.charAt(0)!=="$"&&e(j[q],l))return true;return false;case "array":for(q=0;q>2;c=(c&3)<<4|d>>4;g=(d&15)<<2|e>>6;h=e&63;if(isNaN(d))g=h=64;else if(isNaN(e))h=64;b=b+this.B.charAt(f)+this.B.charAt(c)+this.B.charAt(g)+this.B.charAt(h)}return b},Hc:function(a){var b="",c,d,e,f,g,h=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");h>4;d=(d&15)<<4|f>>2;e=(f&3)<<6| +g;b+=String.fromCharCode(c);if(f!=64)b+=String.fromCharCode(d);if(g!=64)b+=String.fromCharCode(e)}return b=da.gb(b)},hb:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c127&&d<2048)b+=String.fromCharCode(d>>6|192);else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128)}b+=String.fromCharCode(d&63|128)}}return b},gb:function(a){for(var b="",c=0,d=c1=c2=0;c191&&d<224){c2=a.charCodeAt(c+1);b+=String.fromCharCode((d&31)<<6|c2&63);c+=2}else{c2=a.charCodeAt(c+1);c3=a.charCodeAt(c+2);b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63);c+=3}}return b}};if(typeof y.getAttribute=="undefined")y.getAttribute=K();if(typeof Node=="undefined")Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10, +DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};o.console||(o.console={log:n,error:n});var Q,U,k=o.jQuery||o.$,p=_.each,B=_.extend,Da=_.identity,m=o.angular||(o.angular={}),Ea=m.validator||(m.validator={}),r=m.filter||(m.filter={}),ea=m.formatter||(m.formatter={}),O=m.callbacks||(m.callbacks={});m.alert||(m.alert=function(){L(arguments);o.alert.apply(o,arguments)});ja.prototype={Ob:function(a){this.Ea=a},watch:function(){var a=this;function b(){if(a.N!==a.location.href){var c=a.location.hash.match(/^#\$iframe_notify=(.*)$/); +if(c){a.N.match(/#/)||(a.N+="#");a.location.href=a.N;c="_iframe_notify_"+c[1];var d=O[c];delete O[c];try{(d||n)()}catch(e){alert(e)}}else{a.Ea(a.location.href);a.N=a.location.href}}a.setTimeout(b,a.delay)}b()},h:function(a){var b=this.location.href;b.match(/#/)||(b+="#");if(b!=a)this.location.href=a;this.Kc=a},get:function(){return o.location.href}};m.startUrlWatcher=function(){var a=new ja(o.location);a.watch();return aa(a,{listen:a.Ob,set:a.h,get:a.get})};m.compile=function(a,b){k=o.jQuery;U=k.browser.msie; +b=_({server:"",location:{get:n,set:n,listen:n}}).extend(b||{});Ka(b);Ja();return La(k(a),b)};var I={typeOf:function(a){if(a===null)return"null";var b=typeof a;if(b=="object"){if(a instanceof Array)return"array";if(a instanceof Date)return"date";if(a.nodeType==1)return"element"}return b}},Z={},Fa={includeIf:function(a,b,c){var d=_.indexOf(a,b);if(c)d==-1&&a.push(b);else a.splice(d,1);return a},sum:function(a,b){b=m.Function.compile(b);for(var c=0,d=0;d=0&&a.splice(c,1);return b},find:function(a,b,c){if(b){var d=m.Function.compile(b);_.detect(a,function(e){if(d(e)){c=e;return true}});return c}},findById:function(a,b){return m.zc.find(a,function(c){return c.Za==b},null)},filter:function(a,b){var c=[];c.qb=function(j){for(var l=0;l-1;case "object":for(var q in j)if(q.charAt(0)!=="$"&&e(j[q],l))return true;return false;case "array":for(q=0;q=0&&a.splice(d,1);a.unshift((c?"-":"+")+b);return a},orderByDirection:function(a,b,c,d){c=c||"ng-ascend";d=d||"ng-descend";a=a[0]||"";var e=true;if(a.charAt(0)=="-"){a=a.substring(1);e=false}else if(a.charAt(0)=="+")a=a.substring(1);return a==b?e?c:d:""},merge:function(a,b,c){var d=a[b];if(!d){d={};a[b]=d}W(c,d);return a}},Ma={quote:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\f/g, "\\f").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v")+'"'},quoteUnicode:function(a){a=m.String.quote(a);for(var b=[],c=0;c-1;){c1||x.M(a[0])!==null};x.M=function(a){return(a=a.replace(/\n/gm," ").match(/^\{\{(.*)\}\}$/))?a[1]:null};x.prototype={gc:function(a){var b={};a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,d,e){if(d)b[decodeURIComponent(d)]=decodeURIComponent(e)});return b},Na:function(){var a=this,b=this.location.get()|| "",c=b.indexOf("#");if(!(c<0)){b=this.gc(b.substring(c+1));p(a.anchor,function(d,e){delete a.anchor[e]});p(b,function(d,e){a.anchor[e]=d})}},fc:function(){this.Na();this.d()},qc:function(){var a=this.location.get()||"",b=a.indexOf("#");if(b>-1)a=a.substring(0,b);a+="#";b="";for(var c in this.anchor){var d=this.anchor[c];if(typeof d==="undefined"||d===null)delete this.anchor[c];else{a+=b+encodeURIComponent(c);if(d!==true)a+="="+encodeURIComponent(d);b="&"}}this.location.set(a);return a},d:function(){(new Date).getTime(); -var a=k(this.D).scope();a.h("$invalidWidgets",[]);a.d();(new Date).getTime();this.qc();_.each(this.Va,function(b){b()})},T:function(a){var b=k(this.D),c=b.find(a);if(b.is(a))c=c.andSelf();return c},Db:function(){this.T("[ng-init]").each(function(){var a=k(this),b=a.scope();try{b.eval(a.attr("ng-init"))}catch(c){alert("EVAL ERROR:\n"+a.attr("ng-init")+"\n"+w(c,true))}})},F:function(a){var b=this;this.T("[ng-entity]").attr("ng-watch",function(){try{var c=k(this);return a.F(c.attr("ng-entity"),b.k)+ -(c.attr("ng-watch")||"")}catch(d){L(d);alert(d)}})},compile:function(){var a=k(this.D);if(this.rb.autoSubmit){var b=this.T(":submit").not("[ng-action]");b.attr("ng-action","$save()");b.not(":disabled").not("ng-bind-attr").attr("ng-bind-attr",'{disabled:"{{$invalidWidgets}}"}')}this.Oa(this.D)(this.D,a.scope(),"");this.T("a[ng-action]").live("click",function(){var c=k(this),d=c.scope();try{d.eval(c.attr("ng-action"));c.removeAttr("ng-error");c.removeClass("ng-exception")}catch(e){c.addClass("ng-exception"); +var a=k(this.F).scope();a.h("$invalidWidgets",[]);a.d();(new Date).getTime();this.qc();_.each(this.Va,function(b){b()})},T:function(a){var b=k(this.F),c=b.find(a);if(b.is(a))c=c.andSelf();return c},Db:function(){this.T("[ng-init]").each(function(){var a=k(this),b=a.scope();try{b.eval(a.attr("ng-init"))}catch(c){alert("EVAL ERROR:\n"+a.attr("ng-init")+"\n"+w(c,true))}})},G:function(a){var b=this;this.T("[ng-entity]").attr("ng-watch",function(){try{var c=k(this);return a.G(c.attr("ng-entity"),b.k)+ +(c.attr("ng-watch")||"")}catch(d){L(d);alert(d)}})},compile:function(){var a=k(this.F);if(this.rb.autoSubmit){var b=this.T(":submit").not("[ng-action]");b.attr("ng-action","$save()");b.not(":disabled").not("ng-bind-attr").attr("ng-bind-attr",'{disabled:"{{$invalidWidgets}}"}')}this.Oa(this.F)(this.F,a.scope(),"");this.T("a[ng-action]").live("click",function(){var c=k(this),d=c.scope();try{d.eval(c.attr("ng-action"));c.removeAttr("ng-error");c.removeClass("ng-exception")}catch(e){c.addClass("ng-exception"); c.attr("ng-error",w(e,true))}d.get("$updateView")();return false})},pc:function(a,b,c){b=b.concat();var d=b.pop(),e=x.aa(a.nodeValue);if(e.length>1||x.M(e[0])){var f=a.parentNode;if(ga(f)){f.setAttribute("ng-bind-template",a.nodeValue);c.push({path:b,b:function(l){return new N(l,l.getAttribute("ng-bind-template"))}})}else for(var g=0;g2&&a.setAttribute("ng-bind-attr",d)}a.getAttribute||L(a);var j=a.getAttribute("ng-repeat");if(j){a.removeAttribute("ng-repeat");var l=this.Oa(a);d=y.createComment("ng-repeat: "+j);e=a.parentNode;e.insertBefore(d,a);e.removeChild(a);function q(s, @@ -40,12 +40,12 @@ a.text;d=a.childNodes;for(e=0;e