aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--angular-minified.js42
-rw-r--r--angular.js6
-rw-r--r--example/tweeter/tweeter_addressbook.html10
-rw-r--r--src/Binder.js6
-rwxr-xr-xtest.sh2
5 files changed, 33 insertions, 33 deletions
diff --git a/angular-minified.js b/angular-minified.js
index ccceb4ec..2209c269 100644
--- a/angular-minified.js
+++ b/angular-minified.js
@@ -6,19 +6,19 @@ c;this.location=o.location}function ja(a){this.location=a;this.delay=25;this.set
function z(a,b){var c=[];$(c,a,b?"\n ":null);return c.join("")}function O(a){try{var b=new E(a,true),c=b.aa();b.I();return c()}catch(d){W("fromJson error: ",a,d);throw d;}}function $(a,b,c){var d=typeof b;if(b===null)a.push("null");else if(d!=="function")if(d==="boolean")a.push(""+b);else if(d==="number")isNaN(b)?a.push("null"):a.push(""+b);else if(d==="string")return a.push(m.String.quoteUnicode(b));else if(d==="object")if(b instanceof Array){a.push("[");var e=b.length;d=false;for(var f=0;f<e;f++){var g=
b[f];d&&a.push(",");typeof g=="function"||typeof g=="undefined"?a.push("null"):$(a,g,c);d=true}a.push("]")}else if(b instanceof Date)a.push(m.String.quoteUnicode(m.Date.toString(b)));else{a.push("{");c&&a.push(c);d=false;f=c?c+" ":false;g=[];for(var h in b)h.indexOf("$$")!==0&&g.push(h);g.sort();for(h=0;h<g.length;h++){var i=g[h];try{e=b[i];if(typeof e!="function"){if(d){a.push(",");c&&a.push(c)}a.push(m.String.quote(i));a.push(":");$(a,e,f);d=true}}catch(j){}}a.push("}")}}function F(a,b){this.$$entity=
a;this.R(b||{});this.Q=a.title;this.gb()}function G(a,b){this.text=a;this.Ib=b?20:-1;this.h=[];this.index=0}function E(a,b){this.text=a;this.h=(new G(a,b)).parse();this.index=0}function v(a,b){this.db=[];this.ra={};this.name=b;a=a||{};function c(){}c.prototype=a;this.q=new c;this.q.Uc=a;if(b=="ROOT")this.q.Vc=this.q}function ka(a,b){this.url=a;this.fc=0;this.getScript=b;this.Jc="_"+(""+Math.random()).substr(2)+"_";this.la=1800}function aa(a){this.frame=a}function la(a,b,c){this.Kb=a;this.update=c;
-this.status=b}function ma(a,b){this.H=a;this.fa=b}function na(a,b){this.gc=0;this.ca=a;this.F=b;this.Aa=o.Jd?swfobject.Aa:function(){alert("ERROR: swfobject not loaded!")};this.rc=K()}function M(a,b,c,d){this.view=a;this.Md=c;this.Ya=b;this.$c=d+"/_attachments";this.value=null;this.d=undefined}function Q(a){this.view=a}function oa(a,b){this.view=a;this.exp=b;this.O=a.getAttribute("ng-validate");this.zc=typeof a.attributes["ng-required"]!="undefined";this.Ja=null;this.d=undefined;this.p=a.value;a.getAttribute("ng-widget")===
-"datepicker"&&k(a).sd()}function pa(a,b){this.view=a;this.exp=b;this.d=undefined;this.p=a.checked?a.value:""}function qa(a,b){this.view=a;this.exp=b;this.d=undefined;this.p=a.value}function ra(a,b){this.view=a;this.exp=b;this.d=undefined;this.p=this.selected()}function sa(a,b){this.view=a;this.exp=b;this.d=this.ja=undefined;this.Ia=a.value;this.p=a.checked?a.value:null}function N(a,b){this.view=a;this.exp=x.Z(b);this.w=false;this.Bc={element:a}}function ta(a,b){this.view=a;this.ub=b}function ua(a,
+this.status=b}function ma(a,b){this.H=a;this.fa=b}function na(a,b){this.gc=0;this.ca=a;this.F=b;this.Aa=o.Jd?swfobject.Aa:function(){alert("ERROR: swfobject not loaded!")};this.rc=K()}function M(a,b,c,d){this.view=a;this.Md=c;this.Ya=b;this.$c=d+"/_attachments";this.value=null;this.c=undefined}function Q(a){this.view=a}function oa(a,b){this.view=a;this.exp=b;this.O=a.getAttribute("ng-validate");this.zc=typeof a.attributes["ng-required"]!="undefined";this.Ja=null;this.c=undefined;this.p=a.value;a.getAttribute("ng-widget")===
+"datepicker"&&k(a).sd()}function pa(a,b){this.view=a;this.exp=b;this.c=undefined;this.p=a.checked?a.value:""}function qa(a,b){this.view=a;this.exp=b;this.c=undefined;this.p=a.value}function ra(a,b){this.view=a;this.exp=b;this.c=undefined;this.p=this.selected()}function sa(a,b){this.view=a;this.exp=b;this.c=this.ja=undefined;this.Ia=a.value;this.p=a.checked?a.value:null}function N(a,b){this.view=a;this.exp=x.Z(b);this.w=false;this.Bc={element:a}}function ta(a,b){this.view=a;this.ub=b}function ua(a,
b){this.view=a;this.exp=b;this.w=false}function va(a,b){this.view=a;this.exp=b}function wa(a,b){this.view=a;this.exp=b}function xa(a,b){this.view=a;this.exp=b}function ya(a,b){this.view=a;this.exp=b}function za(a,b){this.view=a;this.exp=b}function Aa(a,b){this.view=a;this.exp=b}function Ba(a,b,c,d){this.view=a;this.template=c;this.prefix=d;this.children=[];a=b.match(/^\s*(.+)\s+in\s+(.*)\s*$/);if(!a)throw"Expected ng-repeat in form of 'item in collection' but got '"+b+"'.";b=a[1];this.X=a[2];a=b.match(/^([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\)$/);
if(!a)throw"'item' in 'item in collection' should be identifier or (key, value) but get '"+b+"'.";this.Lc=a[3]||a[1];this.$b=a[2]}function B(a){this.B=a}function U(a){this.Na=a.append(U.ib).find("#ng-loading");this.ba=0}var ba={u:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",Lb:function(a){var b="",c,d,e,f,g,h,i=0;for(a=ba.pb(a);i<a.length;){c=a.charCodeAt(i++);d=a.charCodeAt(i++);e=a.charCodeAt(i++);f=c>>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.u.charAt(f)+this.u.charAt(c)+this.u.charAt(g)+this.u.charAt(h)}return b},td:function(a){var b="",c,d,e,f,g,h=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<a.length;){c=this.u.indexOf(a.charAt(h++));d=this.u.indexOf(a.charAt(h++));f=this.u.indexOf(a.charAt(h++));g=this.u.indexOf(a.charAt(h++));c=c<<2|d>>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=ba.ob(b)},pb:function(a){a=a.replace(/\r\n/g,"\n");
for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128)b+=String.fromCharCode(d);else{if(d>127&&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},ob:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;){d=a.charCodeAt(c);if(d<128){b+=String.fromCharCode(d);c++}else if(d>191&&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 R,q=_.each,S=_.extend,k=o.jQuery,X=k.browser.msie,m=o.angular||(o.angular=
{}),Ca=m.validator||(m.validator={}),r=m.filter||(m.filter={}),ca=m.callbacks||(m.callbacks={});m.alert||(m.alert=function(){w(arguments);o.alert.apply(o,arguments)});ia.prototype={load:function(){this.Db();w("Server: "+this.j.H);this.Cb();this.Bb();this.xb()},Cb:function(){w("Angular.configureJQueryPlugins()");k.fn.scope=function(){for(var a=this;a&&a.get(0);){var b=a.data("scope");if(b)return b;a=a.parent()}return null};k.fn.controller=function(){return this.data("controller")||Q.Wb}},Gc:function(){return""+
-(new Date).getTime()},Bb:function(){var a=this.j;if(!a.F){var b=a.H.match(/https?:\/\/([\w]*)/);a.F=b?b[1]:"$MEMORY"}},xb:function(){function a(){g.Qb(function(l){!l&&c.find("[ng-auth=eager]").length&&g.ka()})}w("Angular.bindHtml()");var b=this.Nc=new ja(this.location),c=this.document,d=new na(this.j.H,this.j.F),e=new x(c[0],d,b,this.j);d.rc=Ea(e,e.e);b=new P(c.find("body"),this.j.H);var f=this.j.F=="$MEMORY"?new aa(this.window):new ka(this.j.H,k.getScript);f=new la(f,new U(k(c.body)),function(){e.c()});
+(new Date).getTime()},Bb:function(){var a=this.j;if(!a.F){var b=a.H.match(/https?:\/\/([\w]*)/);a.F=b?b[1]:"$MEMORY"}},xb:function(){function a(){g.Qb(function(l){!l&&c.find("[ng-auth=eager]").length&&g.ka()})}w("Angular.bindHtml()");var b=this.Nc=new ja(this.location),c=this.document,d=new na(this.j.H,this.j.F),e=new x(c[0],d,b,this.j);d.rc=Ea(e,e.e);b=new P(c.find("body"),this.j.H);var f=this.j.F=="$MEMORY"?new aa(this.window):new ka(this.j.H,k.getScript);f=new la(f,new U(k(c.body)),function(){e.d()});
var g=new ma(f,b),h="/data/"+this.j.F,i=new T(function(l,p){f.N("POST",h,l,p)},g,e.anchor);e.ab.push(function(){i.Ea()});var j=new v({$anchor:e.anchor,$binder:e,$config:this.j,$console:o.console,$datastore:i,$save:function(l){i.Ac(j.q,l,e.anchor)},$window:o,$uid:this.Gc,$users:g},"ROOT");c.data("scope",j);w("$binder.entity()");e.K(j);w("$binder.compile()");e.compile();w("ControlBar.bind()");b.bind();w("$users.fetchCurrentUser()");a();w("PopUp.bind()");(new B(c)).bind();w("$binder.parseAnchor()");
e.Ta();c.find("body").show();w("ready()")},Db:function(){var a=o.location.href+"#";a=a.split("#")[1];var b={Jb:null};a=a.split("&");for(var c=0;c<a.length;c++){var d=(a[c]+"=").split("=");b[d[0]]=d[1]}if(b.Jb=="console"){R=y.createElement("div");R.id="ng-console";y.getElementsByTagName("body")[0].appendChild(R);w=function(){da("ng-console-info",arguments)};console.error=function(){da("ng-console-error",arguments)}}}};ja.prototype={watch:function(){var a=this;function b(){if(a.L!==a.location.href){var c=
a.location.hash.match(/^#\$iframe_notify=(.*)$/);if(c){a.L.match(/#/)||(a.L+="#");a.location.href=a.L;c="_iframe_notify_"+c[1];var d=ca[c];delete ca[c];try{(d||n)()}catch(e){alert(e)}}else{a.Ka(a.location.href);a.L=a.location.href}}a.setTimeout(b,a.delay)}b()},Dc:function(a){var b=o.location.href;b.match(/#/)||(b+="#");if(b!=a)o.location.href=a;this.wd=a},Ga:function(){return o.location.href}};m.compile=function(a,b){b=b||{};var c={server:"",addUrlChangeListener:n},d=new ia(a,k("head"),_(c).extend(b));
-d.load();var e=k(a).scope();return{updateView:function(){return e.c()},set:function(){return e.i.apply(e,arguments)},get:function(){return e.get.apply(e,arguments)},init:function(){e.get("$binder.executeInit")();e.c()},watchUrl:function(){var f=e.get("$binder"),g=d.Nc;g.Ka=ga(f,f.tc,g);g.Bd=function(){alert("update")};g.watch()}}};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}},
+d.load();var e=k(a).scope();return{updateView:function(){return e.d()},set:function(){return e.i.apply(e,arguments)},get:function(){return e.get.apply(e,arguments)},init:function(){e.get("$binder.executeInit")();e.d()},watchUrl:function(){var f=e.get("$binder"),g=d.Nc;g.Ka=ga(f,f.tc,g);g.Bd=function(){alert("update")};g.watch()}}};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}},
V={},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<a.length;d++){var e=1*b(a[d]);isNaN(e)||(c+=e)}return c},remove:function(a,b){var c=_.indexOf(a,b);c>=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.Wc.find(a,function(c){return c.z==b},null)},filter:function(a,
b){var c=[];c.yb=function(j){for(var l=0;l<c.length;l++)if(!c[l](j))return false;return true};var d=v.M;function e(j,l){if(l.charAt(0)==="!")return!e(j,l.substr(1));switch(typeof j){case "boolean":case "number":case "string":return(""+j).toLowerCase().indexOf(l)>-1;case "object":for(var p in j)if(p.charAt(0)!=="$"&&e(j[p],l))return true;return false;case "array":for(p=0;p<j.length;p++)if(e(j[p],l))return true;return false;default:return false}}switch(typeof b){case "boolean":case "number":case "string":b=
{Qc:b};case "object":for(var f in b)f=="$"?function(){var j=(""+b[f]).toLowerCase();j&&c.push(function(l){return e(l,j)})}():function(){var j=f,l=(""+b[f]).toLowerCase();l&&c.push(function(p){return e(d(p,j),l)})}();break;case "function":c.push(b);break;default:return a}for(var g=[],h=0;h<a.length;h++){var i=a[h];c.yb(i)&&g.push(i)}return g},add:function(a,b){a.push(_.isUndefined(b)?{}:b);return a},count:function(a,b){if(!b)return a.length;var c=m.Function.compile(b);return _.reduce(a,0,function(d,
@@ -28,10 +28,10 @@ e=false}else if(a.charAt(0)=="+")a=a.substring(1);return a==b?e?c:d:""},merge:fu
4))}}return b.join("")},toDate:function(a){var b;if(typeof a=="string"&&(b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)Z$/))){a=new Date(0);a.setUTCFullYear(b[1],b[2]-1,b[3]);a.setUTCHours(b[4],b[5],b[6],0);return a}return a}},Ha={toString:function(a){function b(c){return c<10?"0"+c:c}return a.getUTCFullYear()+"-"+b(a.getUTCMonth()+1)+"-"+b(a.getUTCDate())+"T"+b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds())+"Z"}},Ia={compile:function(a){if(_.isFunction(a))return a;
else if(a){var b=new v;return function(c){b.q=c;return b.eval(a)}}else return function(c){return c}}};H("Global",[I],["extend","clone","isEqual","isElement","isArray","isFunction","isUndefined"]);H("Collection",[I,V],["each","map","reduce","reduceRight","detect","select","reject","all","any","include","invoke","pluck","max","min","sortBy","sortedIndex","toArray","size"]);H("Array",[I,V,Fa],["first","last","compact","flatten","without","uniq","intersect","zip","indexOf","lastIndexOf"]);H("Object",
[I,V,{}],["keys","values"]);H("String",[I,Ga],[]);H("Date",[I,Ha],[]);H("Function",[I,V,Ia],["bind","bindAll","delay","defer","wrap","compose"]);x.Z=function(a){for(var b=[],c=0,d;(d=a.indexOf("{{",c))>-1;){c<d&&b.push(a.substr(c,d-c));c=d;d=a.indexOf("}}",d);d=d<0?a.length:d+2;b.push(a.substr(c,d-c));c=d}c!=a.length&&b.push(a.substr(c,a.length-c));return b.length===0?[a]:b};x.Vb=function(a){a=x.Z(a);return a.length>1||x.J(a[0])!==null};x.J=function(a){return(a=a.replace(/\n/gm," ").match(/^\{\{(.*)\}\}$/))?
-a[1]:null};x.prototype={uc:function(a){var b={};a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,d,e){if(d)b[decodeURIComponent(d)]=decodeURIComponent(e)});return b},Ta:function(a){var b=this;a=a||this.qa.Ga();var c=a.indexOf("#");if(!(c<0)){a=this.uc(a.substring(c+1));q(b.anchor,function(d,e){delete b.anchor[e]});q(a,function(d,e){b.anchor[e]=d})}},tc:function(a){this.Ta(a);this.c()},Hc:function(){var a=this.qa.Ga(),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.qa.Dc(a);return a},c:function(){(new Date).getTime();var a=k(this.B).scope();a.i("$invalidWidgets",[]);a.c();(new Date).getTime();this.Hc();_.each(this.ab,function(b){b()})},ha:function(a){var b=k(this.B),c=b.find(a);if(b.is(a))c=c.andSelf();return c},K:function(a){this.ha("[ng-entity]").attr("ng-watch",function(){try{var b=k(this);return a.K(b.attr("ng-entity"))+
-(b.attr("ng-watch")||"")}catch(c){alert(c)}})},compile:function(){var a=k(this.B),b=this;if(this.j.ad){var c=this.ha(":submit").not("[ng-action]");c.attr("ng-action","$save()");c.not(":disabled").not("ng-bind-attr").attr("ng-bind-attr",'{disabled:"{{$invalidWidgets}}"}')}this.Ua(this.B)(this.B,a.scope(),"");this.ha("a[ng-action]").live("click",function(){var d=k(this);try{d.scope().eval(d.attr("ng-action"));d.removeAttr("ng-error");d.removeClass("ng-exception")}catch(e){d.addClass("ng-exception");
-d.attr("ng-error",z(e,true))}b.c();return false})},Fc:function(a,b,c){b=b.concat();var d=b.pop(),e=x.Z(a.nodeValue);if(e.length>1||x.J(e[0])){var f=a.parentNode;if(ea(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;g<e.length;g++){var h=e[g],i=x.J(h),j;if(i){j=y.createElement("span");k(j).attr("ng-bind",i);g===0&&c.push({path:b.concat(d+g),b:this.Ra})}else if(X&&h.charAt(0)==" "){j=y.createElement("span");
+a[1]:null};x.prototype={uc:function(a){var b={};a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,d,e){if(d)b[decodeURIComponent(d)]=decodeURIComponent(e)});return b},Ta:function(a){var b=this;a=a||this.qa.Ga();var c=a.indexOf("#");if(!(c<0)){a=this.uc(a.substring(c+1));q(b.anchor,function(d,e){delete b.anchor[e]});q(a,function(d,e){b.anchor[e]=d})}},tc:function(a){this.Ta(a);this.d()},Hc:function(){var a=this.qa.Ga(),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.qa.Dc(a);return a},d:function(){(new Date).getTime();var a=k(this.B).scope();a.i("$invalidWidgets",[]);a.d();(new Date).getTime();this.Hc();_.each(this.ab,function(b){b()})},ha:function(a){var b=k(this.B),c=b.find(a);if(b.is(a))c=c.andSelf();return c},K:function(a){this.ha("[ng-entity]").attr("ng-watch",function(){try{var b=k(this);return a.K(b.attr("ng-entity"))+
+(b.attr("ng-watch")||"")}catch(c){alert(c)}})},compile:function(){var a=k(this.B);if(this.j.ad){var b=this.ha(":submit").not("[ng-action]");b.attr("ng-action","$save()");b.not(":disabled").not("ng-bind-attr").attr("ng-bind-attr",'{disabled:"{{$invalidWidgets}}"}')}this.Ua(this.B)(this.B,a.scope(),"");this.ha("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",
+z(e,true))}d.eval("$binder.updateView()");return false})},Fc:function(a,b,c){b=b.concat();var d=b.pop(),e=x.Z(a.nodeValue);if(e.length>1||x.J(e[0])){var f=a.parentNode;if(ea(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;g<e.length;g++){var h=e[g],i=x.J(h),j;if(i){j=y.createElement("span");k(j).attr("ng-bind",i);g===0&&c.push({path:b.concat(d+g),b:this.Ra})}else if(X&&h.charAt(0)==" "){j=y.createElement("span");
j.innerHTML="&nbsp;"+h.substring(1)}else j=y.createTextNode(h);f.insertBefore(j,a)}f.removeChild(a)}},Ua:function(a){var b=[];this.Va(a,[],b);return function(c,d,e){for(var f=b.length,g=0;g<f;g++){for(var h=b[g],i=c,j=h.path,l=0;l<j.length;l++)i=i.childNodes[j[l]];try{d.sb(h.b(i,d,e))}catch(p){alert(p)}}}},Va:function(a,b,c){var d=a.nodeType;if(d==Node.TEXT_NODE)this.Fc(a,b,c);else if(!(d!=Node.ELEMENT_NODE&&d!=Node.DOCUMENT_NODE))if(a.getAttribute){d=a.getAttribute("ng-non-bindable");if(!(d||d===
"")){if(d=a.attributes){var e=a.getAttribute("ng-bind-attr");a.removeAttribute("ng-bind-attr");e=e?O(e):{};for(var f=d.length,g=0;g<f;g++){var h=d[g],i=h.name;h=X&&i=="href"?decodeURI(a.getAttribute(i,2)):h.value;if(x.Vb(h))e[i]=h}d=z(e);d.length>2&&a.setAttribute("ng-bind-attr",d)}a.getAttribute||w(a);var j=a.getAttribute("ng-repeat");if(j){a.removeAttribute("ng-repeat");var l=this.Ua(a);d=y.createComment("ng-repeat: "+j);e=a.parentNode;e.insertBefore(d,a);e.removeChild(a);function p(s,t,A){var J=
k(a).clone();J.css("display","");J.attr("ng-repeat-index",""+A);J.data("scope",s);l(J[0],s,t+A+":");return J}c.push({path:b,b:function(s,t,A){return new Ba(k(s),j,p,A)}})}else{a.getAttribute("ng-eval")&&c.push({path:b,b:this.lc});a.getAttribute("ng-bind")&&c.push({path:b,b:this.Ra});a.getAttribute("ng-bind-attr")&&c.push({path:b,b:this.hc});a.getAttribute("ng-hide")&&c.push({path:b,b:this.mc});a.getAttribute("ng-show")&&c.push({path:b,b:this.nc});a.getAttribute("ng-class")&&c.push({path:b,b:this.ic});
@@ -74,26 +74,26 @@ this.pa();this.k("}");return function(d){return function(e){var f=new v(d.scope.
while(this.a(","))}this.k(")");return function(c){for(var d=[],e=0;e<b.length;e++)d.push(b[e](c));e=a(c);if(typeof e==="function")return e.apply(c,d);else throw"Expression '"+a.V+"' is not a function.";}},tb:function(){var a=[];if(this.$().text!="]"){do a.push(this.o());while(this.a(","))}this.k("]");return function(b){for(var c=[],d=0;d<a.length;d++)c.push(a[d](b));return c}},object:function(){var a=[];if(this.$().text!="}"){do{var b=this.a().text;this.k(":");var c=this.o();a.push({Zb:b,value:c})}while(this.a(","))
}this.k("}");return function(d){for(var e={},f=0;f<a.length;f++){var g=a[f],h=g.value(d);e[g.Zb]=h}return e}},Ob:function(){for(var a=[];this.Ha();){a.push(this.Nb());this.a(";")||this.I()}return function(b){for(var c="",d=0;d<a.length;d++)c+=a[d](b);return c}},Nb:function(){var a=this.a().text,b,c;if(this.a("=")){b=a;a=this.a().text}if(this.a(":"))c=this.aa()(null);return function(d){var e=d.scope.get("$datastore").K(a,c);d.scope.i(a,e);if(b){e=e();e.ta=b;d.scope.i(b,e);return"$anchor."+b+":{"+b+
"="+a+".load($anchor."+b+");"+b+".$$anchor="+m.String.quote(b)+";};"}else return""}},watch:function(){for(var a=[];this.Ha();){a.push(this.Mc());this.a(";")||this.I()}this.I();return function(b){for(var c=0;c<a.length;c++){var d=a[c](b);b.qb(d.name,d.b)}}},Mc:function(){var a=this.a().text;this.k(":");var b;if(this.$().text=="{"){this.k("{");b=this.pa();this.k("}")}else b=this.o();return function(){return{name:a,b:b}}}};v.U={};v.M=function(a,b){if(!b)return a;for(var c=b.split("."),d,e=a,f=c.length,
-g=0;g<f;g++){d=c[g];if(!d.match(/^[\$\w][\$\w\d]*$/))throw"Expression '"+b+"' is not a valid expression for accesing variables.";if(a){e=a;a=a[d]}if(_.isUndefined(a)&&d.charAt(0)=="$"){var h=m.Global.typeOf(e);if(d=(h=m[h.charAt(0).toUpperCase()+h.substring(1)])?h[[d.substring(1)]]:undefined)return a=_.bind(d,e,e)}}if(typeof a==="function"&&!a.Sc)return ga(e,a);return a};v.prototype={c:function(){var a=this;this.Sb();_.each(this.db,function(b){a.l(b,"",{},function(){this.c(a)})})},sb:function(a){a&&
+g=0;g<f;g++){d=c[g];if(!d.match(/^[\$\w][\$\w\d]*$/))throw"Expression '"+b+"' is not a valid expression for accesing variables.";if(a){e=a;a=a[d]}if(_.isUndefined(a)&&d.charAt(0)=="$"){var h=m.Global.typeOf(e);if(d=(h=m[h.charAt(0).toUpperCase()+h.substring(1)])?h[[d.substring(1)]]:undefined)return a=_.bind(d,e,e)}}if(typeof a==="function"&&!a.Sc)return ga(e,a);return a};v.prototype={d:function(){var a=this;this.Sb();_.each(this.db,function(b){a.l(b,"",{},function(){this.d(a)})})},sb:function(a){a&&
this.db.push(a)},Xb:function(a){for(var b=0;b<a.length;b++){var c=a.charAt(b);if(c!="."&&!G.prototype.W(c))return false}return true},get:function(a){return v.M(this.q,a)},i:function(a,b){a=a.split(".");for(var c=this.q,d=0;a.length>1;d++){var e=a.shift(),f=c[e];if(!f){f={};c[e]=f}c=f}return c[a.shift()]=b},m:function(a,b){this.eval(a+"="+z(b))},eval:function(a,b){var c=v.U[a];if(!c){var d=new E(a);c=d.pa();d.I();v.U[a]=c}b=b||{};b.scope=this;return c(b)},l:function(a,b,c,d,e){try{var f=this.eval(b,
c);if(a.w){a.w=false;k(a.view).removeClass("ng-exception").removeAttr("ng-error")}d&&d.apply(a,[f]);return true}catch(g){W("Eval Widget Error:",g);b=z(g,true);a.w=true;k(a.view).addClass("ng-exception").attr("ng-error",b);e&&e.apply(a,[g,b]);return false}},Kc:function(a,b){var c=v.U[a];if(!c){c=(new E(a)).O();v.U[a]=c}a={scope:this};return c(a)(a,b)},K:function(a){return(new E(a)).Ob()({scope:this})},dc:function(a){this.q.Tc.push(a)},watch:function(a){var b=this;(new E(a)).watch()({scope:this,qb:function(c,
-d){b.rb(c,function(e,f){try{return d({scope:b},e,f)}catch(g){alert(g)}})}})},rb:function(a,b){var c=this.ra[a];if(!c){c={La:[],o:a};this.ra[a]=c}c.La.push(b)},Sb:function(){var a=this,b=false;q(this.ra,function(c){var d=a.eval(c.o);if(d!==c.d){q(c.La,function(e){e(d,c.d);b=true});c.d=d}});return b}};ka.prototype={vb:function(a){return ba.Lb(a)},N:function(a,b,c,d){var e=this.Jc+this.fc++;ca[e]=function(h){delete m[e];d(200,h)};a={Ld:b,Ad:a,Cd:c};a=this.vb(z(a));b=Math.ceil(a.length/this.la);c=this.url+
+d){b.rb(c,function(e,f){try{return d({scope:b},e,f)}catch(g){alert(g)}})}})},rb:function(a,b){var c=this.ra[a];if(!c){c={La:[],o:a};this.ra[a]=c}c.La.push(b)},Sb:function(){var a=this,b=false;q(this.ra,function(c){var d=a.eval(c.o);if(d!==c.c){q(c.La,function(e){e(d,c.c);b=true});c.c=d}});return b}};ka.prototype={vb:function(a){return ba.Lb(a)},N:function(a,b,c,d){var e=this.Jc+this.fc++;ca[e]=function(h){delete m[e];d(200,h)};a={Ld:b,Ad:a,Cd:c};a=this.vb(z(a));b=Math.ceil(a.length/this.la);c=this.url+
"/$/"+e+"/"+b+"/";for(var f=0;f<b;f++){var g=a.substr(f*this.la,this.la);this.getScript(c+(f+1)+"?h="+g,n)}}};aa.Yc="$DATASET:";aa.prototype={N:K()};la.prototype={N:function(a,b,c,d){var e=this;this.status.wb(c);this.Kb.N(a,b,c,function(){e.status.Mb();try{d.apply(this,arguments)}catch(f){alert(z(f))}e.update()})}};ma.prototype={fetchCurrentUser:function(a){var b=this;this.H.N("GET","/account.json",{},function(c,d){b.Gb=d.Ic;a(d.Ic)})},logout:function(a){var b=this;this.fa.cc(function(){delete b.Gb;
(a||n)()})},login:function(a){var b=this;this.fa.ka(function(){b.Qb(function(){(a||n)()})})},notAuthorized:function(){this.fa.Sa()}};q({regexp:function(a,b,c){return a.match(b)?null:c||"Value does not match expected format "+b+"."},number:function(a,b,c){var d=1*a;if(d==a){if(typeof b!="undefined"&&d<b)return"Value can not be less than "+b+".";if(typeof b!="undefined"&&d>c)return"Value can not be greater than "+c+".";return null}else return"Value is not a number."},integer:function(a,b,c){b=Ca.number(a,
b,c);if(b===null&&a!=Math.round(a))return"Value is not a whole number.";return b},date:function(a){if(a.match(/^\d\d?\/\d\d?\/\d\d\d\d$/))return null;return"Value is not a date. (Expecting format: 12/31/2009)."},ssn:function(a){if(a.match(/^\d\d\d-\d\d-\d\d\d\d$/))return null;return"SSN needs to be in 999-99-9999 format."},email:function(a){if(a.match(/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/))return null;return"Email needs to be in username@host.com format."},phone:function(a){if(a.match(/^1\(\d\d\d\)\d\d\d-\d\d\d\d$/))return null;
if(a.match(/^\+\d{2,3} (\(\d{1,5}\))?[\d ]+\d$/))return null;return"Phone number needs to be in 1(987)654-3210 format in North America or +999 (123) 45678 906 internationaly."},url:function(a){if(a.match(/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/))return null;return"URL needs to be in http://server[:port]/path format."},json:function(a){try{O(a);return null}catch(b){return b.toString()}}},function(a,b){Ca[b]=a});na.prototype={Eb:function(a,b){var c,d=a.attr("type").toLowerCase(),
e=a.attr("name");if(e)e=e.split(":").pop();var f="change",g=true;if(d=="button"||d=="submit"||d=="reset"||d=="image"){c=new Ja(a[0],e);f="click";g=false}else if(d=="text"||d=="textarea"||d=="hidden"||d=="password"){c=new oa(a[0],e);f="keyup change"}else if(d=="checkbox"){c=new pa(a[0],e);f="click"}else if(d=="radio"){c=new sa(a[0],e);f="click"}else if(d=="select-one")c=new qa(a[0],e);else if(d=="select-multiple")c=new ra(a[0],e);else if(d=="file")c=this.Fb(a,e);else throw"Unknown type: "+d;a.data("controller",
-c);var h=b.get("$binder");k(c.view,":input").bind(f,function(){if(c.e(b)){var i=k(c.view).attr("ng-action")||"";b.l(c,i)&&h.c(b)}return g});return c},Fb:function(a){var b="__uploadWidget_"+this.gc++,c=M.template(b);a.after(c);b=this.Aa({data:this.ca+"/admin/ServerAPI.swf",width:"95",height:"20",align:"top",Nd:"transparent"},{yd:"uploadWidgetId="+b,Zc:"always"},b);a.remove();a=new M(c,a[0].name,b,this.ca+"/data/"+this.F);k(b).data("controller",a);return a}};M.dispatchEvent=function(a,b,c){a=y.getElementById(a);
-a=k(a).data("controller");M.prototype["_on_"+b].apply(a,c)};M.template=function(a){return k('<span class="ng-upload-widget"><input type="checkbox" ng-non-bindable="true"/><object id="'+a+'" /><a></a><span/></span>')};M.prototype={e:function(a){var b=this.view.find("input").attr("checked")?this.value:null;if(this.d===b)return false;else{a.i(this.Ya,b);return true}},c:function(a){if((a=a.get(this.Ya))&&this.value!==a){this.value=a;this.view.find("a").attr("href",this.value.url).text(this.value.text);
-this.view.find("span").text(m.filter.bytes(this.value.size))}this.view.find("input").attr("checked",!!a)}};Q.prototype={e:L(true),c:n};Q.Wb=new Q;var Ja=Q;oa.prototype={e:function(a){var b=this.view.value;if(this.d===b)return false;else{a.m(this.exp,b);this.d=b;return true}},c:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}c=c?c:"";if(this.d!=c)this.d=b.value=c;var d=false;b.removeAttribute("ng-error");if(this.zc)d=!(c&&c.length>0);var e=d?"Required Value":
-null;if(!d&&this.O&&c){e=a.Kc(this.O,c);d=!!e}if(this.Ja!==e){this.Ja=d;if(e!==null){b.setAttribute("ng-error",e);a.dc(this)}k(b).toggleClass("ng-validation-error",d)}}};pa.prototype={e:function(a){var b=this.view;b=b.checked?b.value:"";if(this.d===b)return false;else{a.m(this.exp,b);this.d=b;return true}},c:function(a){var b=this.view,c=a.eval(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}b.checked=b.value==""+c}};qa.prototype={e:function(a){if(this.view.selectedIndex<0)a.m(this.exp,
-null);else{var b=this.view.value;if(this.d===b)return false;else{a.m(this.exp,b);this.d=b;return true}}},c:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}if(c!==this.d){b.value=c?c:"";this.d=c}}};ra.prototype={selected:function(){for(var a=[],b=this.view.options,c=0;c<b.length;c++){var d=b[c];d.selected&&a.push(d.value)}return a},e:function(a){var b=this.selected();if(this.d===b)return false;else{a.m(this.exp,b);this.d=b;return true}},c:function(a){var b=
-this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}if(c!==this.d){a=b.options;for(b=0;b<a.length;b++){var d=a[b];d.selected=_.include(c,d.value)}this.d=c}}};sa.prototype={e:function(a){var b=this.view;if(this.ja)return false;else{b.checked=true;this.d=a.m(this.exp,this.Ia);return this.ja=true}},c:function(a){var b=this.view,c=a.get(this.exp);if(this.p&&typeof c==="undefined"){c=this.p;a.m(this.exp,c)}if(this.d!=c){this.ja=b.checked=this.Ia==""+c;this.d=c}}};N.Za=function(a){switch(typeof a){case "string":case "boolean":case "number":return D(a);
+c);var h=b.get("$binder");k(c.view,":input").bind(f,function(){if(c.e(b)){var i=k(c.view).attr("ng-action")||"";b.l(c,i)&&h.d(b)}return g});return c},Fb:function(a){var b="__uploadWidget_"+this.gc++,c=M.template(b);a.after(c);b=this.Aa({data:this.ca+"/admin/ServerAPI.swf",width:"95",height:"20",align:"top",Nd:"transparent"},{yd:"uploadWidgetId="+b,Zc:"always"},b);a.remove();a=new M(c,a[0].name,b,this.ca+"/data/"+this.F);k(b).data("controller",a);return a}};M.dispatchEvent=function(a,b,c){a=y.getElementById(a);
+a=k(a).data("controller");M.prototype["_on_"+b].apply(a,c)};M.template=function(a){return k('<span class="ng-upload-widget"><input type="checkbox" ng-non-bindable="true"/><object id="'+a+'" /><a></a><span/></span>')};M.prototype={e:function(a){var b=this.view.find("input").attr("checked")?this.value:null;if(this.c===b)return false;else{a.i(this.Ya,b);return true}},d:function(a){if((a=a.get(this.Ya))&&this.value!==a){this.value=a;this.view.find("a").attr("href",this.value.url).text(this.value.text);
+this.view.find("span").text(m.filter.bytes(this.value.size))}this.view.find("input").attr("checked",!!a)}};Q.prototype={e:L(true),d:n};Q.Wb=new Q;var Ja=Q;oa.prototype={e:function(a){var b=this.view.value;if(this.c===b)return false;else{a.m(this.exp,b);this.c=b;return true}},d:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}c=c?c:"";if(this.c!=c)this.c=b.value=c;var d=false;b.removeAttribute("ng-error");if(this.zc)d=!(c&&c.length>0);var e=d?"Required Value":
+null;if(!d&&this.O&&c){e=a.Kc(this.O,c);d=!!e}if(this.Ja!==e){this.Ja=d;if(e!==null){b.setAttribute("ng-error",e);a.dc(this)}k(b).toggleClass("ng-validation-error",d)}}};pa.prototype={e:function(a){var b=this.view;b=b.checked?b.value:"";if(this.c===b)return false;else{a.m(this.exp,b);this.c=b;return true}},d:function(a){var b=this.view,c=a.eval(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}b.checked=b.value==""+c}};qa.prototype={e:function(a){if(this.view.selectedIndex<0)a.m(this.exp,
+null);else{var b=this.view.value;if(this.c===b)return false;else{a.m(this.exp,b);this.c=b;return true}}},d:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}if(c!==this.c){b.value=c?c:"";this.c=c}}};ra.prototype={selected:function(){for(var a=[],b=this.view.options,c=0;c<b.length;c++){var d=b[c];d.selected&&a.push(d.value)}return a},e:function(a){var b=this.selected();if(this.c===b)return false;else{a.m(this.exp,b);this.c=b;return true}},d:function(a){var b=
+this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.p;a.m(this.exp,c)}if(c!==this.c){a=b.options;for(b=0;b<a.length;b++){var d=a[b];d.selected=_.include(c,d.value)}this.c=c}}};sa.prototype={e:function(a){var b=this.view;if(this.ja)return false;else{b.checked=true;this.c=a.m(this.exp,this.Ia);return this.ja=true}},d:function(a){var b=this.view,c=a.get(this.exp);if(this.p&&typeof c==="undefined"){c=this.p;a.m(this.exp,c)}if(this.c!=c){this.ja=b.checked=this.Ia==""+c;this.c=c}}};N.Za=function(a){switch(typeof a){case "string":case "boolean":case "number":return D(a);
case "function":return N.Za(a());case "object":if(a&&a.tagName&&a.nodeName&&a.ownerDocument&&a.removeAttribute)return ha(a);else if(a instanceof m.filter.g){switch(typeof a.html){case "string":case "number":return a.html;case "function":return a.html();case "object":if(a.html&&a.html.tagName&&a.html.nodeName&&a.html.ownerDocument&&a.html.removeAttribute)return ha(a.html);default:break}switch(typeof a.text){case "string":case "number":return D(a.text);case "function":return D(a.text());default:break}}if(a===
-null)return"";return D(z(a,true));default:return""}};N.prototype={e:n,c:function(a){for(var b=[],c=this.exp,d=c.length,e=0;e<d;e++){var f=c[e],g=x.J(f);if(g){a.l(this,g,this.Bc,function(h){b.push(N.Za(h))},function(h,i){fa(this.view,i)});if(this.w)return}else b.push(D(f))}fa(this.view,b.join(""))}};ta.prototype={e:n,c:function(a){var b=k(this.view),c=this.ub;if(this.w){this.w=false;b.removeClass("ng-exception").removeAttr("ng-error")}var d=b.is("img");for(var e in c){for(var f=x.Z(c[e]),g=[],h=0;h<
-f.length;h++){var i=x.J(f[h]);if(i)try{var j=a.eval(i,{element:b[0],attrName:e});if(j&&(j.constructor!==array||j.length!==0))g.push(j)}catch(l){this.w=true;W("BindAttrUpdater",l);i=z(l,true);g.push("["+i+"]");b.addClass("ng-exception").attr("ng-error",i)}else g.push(f[h])}f=g.length?g.join(""):null;if(d&&e=="src"&&!f)f=a.get("config.server")+"/images/blank.gif";b.attr(e,f)}}};ua.prototype={e:n,c:function(a){a.l(this,this.exp)}};va.prototype={e:n,c:function(a){a.l(this,this.exp,{},function(b){var c=
-k(this.view);Y(b)?c.hide():c.show()})}};wa.prototype={e:n,c:function(a){a.l(this,this.exp,{},function(b){var c=k(this.view);Y(b)?c.show():c.hide()})}};xa.prototype={e:n,c:function(a){a.l(this,this.exp,{},function(b){if(b!==null&&b!==undefined)this.view.className=b})}};ya.prototype={e:n,c:function(a){a.l(this,this.exp,{},function(b){var c=a.get("$index");k(this.view).toggleClass(b,c%2===1)})}};za.prototype={e:n,c:function(a){a.l(this,this.exp,{},function(b){var c=a.get("$index");k(this.view).toggleClass(b,
-c%2===0)})}};Aa.prototype={e:n,c:function(a){a.l(this,this.exp,{},function(b){k(this.view).attr("style","").css(b)})}};Ba.prototype={e:n,c:function(a){a.l(this,this.X,{},function(b){var c=this;if(!b){b=[];a.Xb(this.X)&&a.i(this.X,b)}var d=b.length,e=this.children.length,f=this.view,g=0,h=null,i=this.$b,j=this.Lc,l=0;q(b,function(C,s){if(l<e){h=c.children[l];h.scope.i(j,C)}else{var t=new v(a.q,c.prefix+j+" in "+c.X+"["+l+"]");t.i("$index",l);i&&t.i(i,s);t.i(j,C);h={scope:t,element:c.template(t,c.prefix,
-l)};f.after(h.element);c.children.push(h)}f=h.element;C=(new Date).getTime();h.scope.c();g+=(new Date).getTime()-C;l++});for(b=e;b>d;--b){var p=this.children.pop().element[0];p.parentNode.removeChild(p)}if(h&&h.element[0].nodeName==="OPTION")if(d=k(h.element[0].parentNode).data("controller")){d.d=undefined;d.c(a)}})}};B.wa="mouseleave mouseout click dblclick keypress keyup";B.sc=function(){B.na();var a=k(this);a.bind(B.wa,B.na);var b=a.position(),c=y.documentElement,d=(self.innerWidth||c&&c.clientWidth||
+null)return"";return D(z(a,true));default:return""}};N.prototype={e:n,d:function(a){for(var b=[],c=this.exp,d=c.length,e=0;e<d;e++){var f=c[e],g=x.J(f);if(g){a.l(this,g,this.Bc,function(h){b.push(N.Za(h))},function(h,i){fa(this.view,i)});if(this.w)return}else b.push(D(f))}fa(this.view,b.join(""))}};ta.prototype={e:n,d:function(a){var b=k(this.view),c=this.ub;if(this.w){this.w=false;b.removeClass("ng-exception").removeAttr("ng-error")}var d=b.is("img");for(var e in c){for(var f=x.Z(c[e]),g=[],h=0;h<
+f.length;h++){var i=x.J(f[h]);if(i)try{var j=a.eval(i,{element:b[0],attrName:e});if(j&&(j.constructor!==array||j.length!==0))g.push(j)}catch(l){this.w=true;W("BindAttrUpdater",l);i=z(l,true);g.push("["+i+"]");b.addClass("ng-exception").attr("ng-error",i)}else g.push(f[h])}f=g.length?g.join(""):null;if(d&&e=="src"&&!f)f=a.get("config.server")+"/images/blank.gif";b.attr(e,f)}}};ua.prototype={e:n,d:function(a){a.l(this,this.exp)}};va.prototype={e:n,d:function(a){a.l(this,this.exp,{},function(b){var c=
+k(this.view);Y(b)?c.hide():c.show()})}};wa.prototype={e:n,d:function(a){a.l(this,this.exp,{},function(b){var c=k(this.view);Y(b)?c.show():c.hide()})}};xa.prototype={e:n,d:function(a){a.l(this,this.exp,{},function(b){if(b!==null&&b!==undefined)this.view.className=b})}};ya.prototype={e:n,d:function(a){a.l(this,this.exp,{},function(b){var c=a.get("$index");k(this.view).toggleClass(b,c%2===1)})}};za.prototype={e:n,d:function(a){a.l(this,this.exp,{},function(b){var c=a.get("$index");k(this.view).toggleClass(b,
+c%2===0)})}};Aa.prototype={e:n,d:function(a){a.l(this,this.exp,{},function(b){k(this.view).attr("style","").css(b)})}};Ba.prototype={e:n,d:function(a){a.l(this,this.X,{},function(b){var c=this;if(!b){b=[];a.Xb(this.X)&&a.i(this.X,b)}var d=b.length,e=this.children.length,f=this.view,g=0,h=null,i=this.$b,j=this.Lc,l=0;q(b,function(C,s){if(l<e){h=c.children[l];h.scope.i(j,C)}else{var t=new v(a.q,c.prefix+j+" in "+c.X+"["+l+"]");t.i("$index",l);i&&t.i(i,s);t.i(j,C);h={scope:t,element:c.template(t,c.prefix,
+l)};f.after(h.element);c.children.push(h)}f=h.element;C=(new Date).getTime();h.scope.d();g+=(new Date).getTime()-C;l++});for(b=e;b>d;--b){var p=this.children.pop().element[0];p.parentNode.removeChild(p)}if(h&&h.element[0].nodeName==="OPTION")if(d=k(h.element[0].parentNode).data("controller")){d.c=undefined;d.d(a)}})}};B.wa="mouseleave mouseout click dblclick keypress keyup";B.sc=function(){B.na();var a=k(this);a.bind(B.wa,B.na);var b=a.position(),c=y.documentElement,d=(self.innerWidth||c&&c.clientWidth||
y.body.clientWidth)-b.left;c=a.hasClass("ng-exception")?"EXCEPTION:":"Validation error...";a=a.attr("ng-error");d=d>375?"left":"right";c=k("<div id='ng-callout' style='width:300px'><div class='ng-arrow-"+d+"'/><div class='ng-title'>"+c+"</div><div class='ng-content'>"+a+"</div></div>");k("body").append(c);if(d==="left")a=b.left+this.offsetWidth+11;else{a=b.left-315;c.find(".ng-arrow-right").css({left:301})}c.css({left:a+"px",top:b.top-3+"px"});return true};B.na=function(){k("#ng-callout").unbind(B.wa,
B.na).remove();return true};B.prototype={bind:function(){this.B.find(".ng-validation-error,.ng-exception").live("mouseover",B.sc)}};U.ib='<div id="ng-spacer"></div><div id="ng-loading">loading....</div>';U.prototype={wb:function(){this.ba===0&&this.Na.show();this.ba++},Mb:function(){this.ba--;this.ba===0&&this.Na.hide("fold")}}})(window,document);
diff --git a/angular.js b/angular.js
index 755846ca..9609929c 100644
--- a/angular.js
+++ b/angular.js
@@ -1040,7 +1040,6 @@ Binder.prototype = {
compile: function() {
var jNode = jQuery(this.doc);
- var self = this;
if (this.config.autoSubmit) {
var submits = this.docFindWithSelf(":submit").not("[ng-action]");
submits.attr("ng-action", "$save()");
@@ -1049,15 +1048,16 @@ Binder.prototype = {
this.precompile(this.doc)(this.doc, jNode.scope(), "");
this.docFindWithSelf("a[ng-action]").live('click', function (event) {
var jNode = jQuery(this);
+ var scope = jNode.scope();
try {
- jNode.scope().eval(jNode.attr('ng-action'));
+ scope.eval(jNode.attr('ng-action'));
jNode.removeAttr('ng-error');
jNode.removeClass("ng-exception");
} catch (e) {
jNode.addClass("ng-exception");
jNode.attr('ng-error', toJson(e, true));
}
- self.updateView();
+ scope.eval('$binder.updateView()');
return false;
});
},
diff --git a/example/tweeter/tweeter_addressbook.html b/example/tweeter/tweeter_addressbook.html
index 91394552..64a3f95e 100644
--- a/example/tweeter/tweeter_addressbook.html
+++ b/example/tweeter/tweeter_addressbook.html
@@ -8,7 +8,7 @@
<script type="text/javascript" src="../../angular.js"></script>
<script type="text/javascript" src="tweeterclient.js"></script>
</head>
- <body ng-class="status" ng-init="muted={}" ng-watch="$anchor.user: tweets = fetchTweets($anchor.user)">
+ <body ng-class="status" ng-init="mute={}" ng-watch="$anchor.user: tweets = fetchTweets($anchor.user)">
<div class="addressbook box">
<h1>Address Book</h1>
[ Filter: <input type="text" name="userFilter"/>]
@@ -19,7 +19,7 @@
as <span class="nickname">{{user.name}}</span>
[ <a href="#" ng-action="$anchor.edituser=user.screen_name">edit</a>
| <a href="#" ng-action="users.$remove(user)">X</a>
- | <a href="#" ng-action="muted[user.screen_name] = !muted[user.screen_name]"><span ng-show="muted[user.screen_name]">un</span>mute</a>
+ | <a href="#" ng-action="mute[user.screen_name] = ! mute[user.screen_name]">mute</a>
]
<div class="notes">{{user.notes|linky}}</div>
<div class="clrleft"></div>
@@ -42,7 +42,7 @@
</div>
<hr/>
<div class="debug">
-muted={{muted}}
+mute={{mute|json}}
userFilter={{userFilter|json}}
@@ -62,7 +62,7 @@ tweets={{tweets}}
]
<div class="loading">Loading...</div>
<ul>
- <li ng-repeat="tweet in tweets.$filter(tweetFilter).$filter({:!muted[$.user.screen_name]})"
+ <li ng-repeat="tweet in tweets.$filter(tweetFilter).$filter({:!mute[$.user.screen_name]})"
ng-class-even="'even'" ng-class-odd="'odd'"
ng-eval="user = users.$find({: $.screen_name == tweet.user.screen_name}) || tweet.user">
<img src="{{user.profile_image_url}}"/>
@@ -71,7 +71,7 @@ tweets={{tweets}}
]:
{{tweet.text | linky}}
<span class="notes">{{tweet.created_at}}</span>
- <span class="notes">{{user.notes|linky}}</span>
+ <span class="notes">{{user.notes}}</span>
<div class="clrleft"></div>
</li>
</ul>
diff --git a/src/Binder.js b/src/Binder.js
index b29a07c6..b687fb77 100644
--- a/src/Binder.js
+++ b/src/Binder.js
@@ -137,7 +137,6 @@ Binder.prototype = {
compile: function() {
var jNode = jQuery(this.doc);
- var self = this;
if (this.config.autoSubmit) {
var submits = this.docFindWithSelf(":submit").not("[ng-action]");
submits.attr("ng-action", "$save()");
@@ -146,15 +145,16 @@ Binder.prototype = {
this.precompile(this.doc)(this.doc, jNode.scope(), "");
this.docFindWithSelf("a[ng-action]").live('click', function (event) {
var jNode = jQuery(this);
+ var scope = jNode.scope();
try {
- jNode.scope().eval(jNode.attr('ng-action'));
+ scope.eval(jNode.attr('ng-action'));
jNode.removeAttr('ng-error');
jNode.removeClass("ng-exception");
} catch (e) {
jNode.addClass("ng-exception");
jNode.attr('ng-error', toJson(e, true));
}
- self.updateView();
+ scope.eval('$binder.updateView()');
return false;
});
},
diff --git a/test.sh b/test.sh
index 32e8b4b7..c0d1e7ac 100755
--- a/test.sh
+++ b/test.sh
@@ -1,2 +1,2 @@
-java -jar lib/jstestdriver/JsTestDriver.jar --tests all 2>/dev/null | grep -v lib/jasmine
+java -jar lib/jstestdriver/JsTestDriver.jar --tests all | grep -v lib/jasmine