From 084ada7e6fa54daecde30782f164a355981bd608 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Fri, 3 Jul 2015 09:33:45 -0400 Subject: [PATCH] Initial JavaScript UI commit Definitely still a work in progress --- static/accounts.js | 26 + static/external/big/big.min.js | 1 + static/external/fonts/rw-widgets.eot | Bin 0 -> 5676 bytes static/external/fonts/rw-widgets.svg | 17 + static/external/fonts/rw-widgets.ttf | Bin 0 -> 5500 bytes static/external/fonts/rw-widgets.woff | Bin 0 -> 3204 bytes .../react-bootstrap/react-bootstrap.min.js | 4 + static/external/react-widgets/loader-big.gif | Bin 0 -> 23284 bytes static/external/react-widgets/loading.gif | Bin 0 -> 673 bytes .../external/react-widgets/react-widgets.css | 1 + .../external/react-widgets/react-widgets.js | 5 + static/index.html | 34 ++ static/models.js | 274 +++++++++ static/stylesheet.css | 5 + static/top_bar.js | 117 ++++ static/ui.js | 551 ++++++++++++++++++ 16 files changed, 1035 insertions(+) create mode 100644 static/accounts.js create mode 100644 static/external/big/big.min.js create mode 100644 static/external/fonts/rw-widgets.eot create mode 100644 static/external/fonts/rw-widgets.svg create mode 100644 static/external/fonts/rw-widgets.ttf create mode 100644 static/external/fonts/rw-widgets.woff create mode 100644 static/external/react-bootstrap/react-bootstrap.min.js create mode 100644 static/external/react-widgets/loader-big.gif create mode 100644 static/external/react-widgets/loading.gif create mode 100644 static/external/react-widgets/react-widgets.css create mode 100644 static/external/react-widgets/react-widgets.js create mode 100644 static/index.html create mode 100644 static/models.js create mode 100644 static/stylesheet.css create mode 100644 static/top_bar.js create mode 100644 static/ui.js diff --git a/static/accounts.js b/static/accounts.js new file mode 100644 index 0000000..f89f2e3 --- /dev/null +++ b/static/accounts.js @@ -0,0 +1,26 @@ +// Import all the objects we want to use from ReactBootstrap +var ListGroup = ReactBootstrap.ListGroup; +var ListGroupItem = ReactBootstrap.ListGroupItem; + +var AccountList = React.createClass({ + getInitialState: function() { + return { + }; + }, + render: function() { + var accounts = this.props.accounts; + var account_map = this.props.account_map; + + var listGroupItems; + + for (var i = 0; i < accounts.length; i++) { + listGroupItems += {accounts[i].Name}; + } + + return ( + + {listGroupItems} + + ); + } +}); diff --git a/static/external/big/big.min.js b/static/external/big/big.min.js new file mode 100644 index 0000000..83e9e8d --- /dev/null +++ b/static/external/big/big.min.js @@ -0,0 +1 @@ +/* big.js v3.1.3 https://github.com/MikeMcl/big.js/LICENCE */(function(global){"use strict";var DP=20,RM=1,MAX_DP=1e6,MAX_POWER=1e6,E_NEG=-7,E_POS=21,P={},isValid=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Big;function bigFactory(){function Big(n){var x=this;if(!(x instanceof Big)){return n===void 0?bigFactory():new Big(n)}if(n instanceof Big){x.s=n.s;x.e=n.e;x.c=n.c.slice()}else{parse(x,n)}x.constructor=Big}Big.prototype=P;Big.DP=DP;Big.RM=RM;Big.E_NEG=E_NEG;Big.E_POS=E_POS;return Big}function format(x,dp,toE){var Big=x.constructor,i=dp-(x=new Big(x)).e,c=x.c;if(c.length>++dp){rnd(x,i,Big.RM)}if(!c[0]){++i}else if(toE){i=dp}else{c=x.c;i=x.e+i+1}for(;c.length1?c[0]+"."+c.join("").slice(1):c[0])+(i<0?"e":"e+")+i:x.toString()}function parse(x,n){var e,i,nL;if(n===0&&1/n<0){n="-0"}else if(!isValid.test(n+="")){throwErr(NaN)}x.s=n.charAt(0)=="-"?(n=n.slice(1),-1):1;if((e=n.indexOf("."))>-1){n=n.replace(".","")}if((i=n.search(/e/i))>0){if(e<0){e=i}e+=+n.slice(i+1);n=n.substring(0,i)}else if(e<0){e=n.length}for(i=0;n.charAt(i)=="0";i++){}if(i==(nL=n.length)){x.c=[x.e=0]}else{for(;n.charAt(--nL)=="0";){}x.e=e-i-1;x.c=[];for(e=0;i<=nL;x.c[e++]=+n.charAt(i++)){}}return x}function rnd(x,dp,rm,more){var u,xc=x.c,i=x.e+dp+1;if(rm===1){more=xc[i]>=5}else if(rm===2){more=xc[i]>5||xc[i]==5&&(more||i<0||xc[i+1]!==u||xc[i-1]&1)}else if(rm===3){more=more||xc[i]!==u||i<0}else{more=false;if(rm!==0){throwErr("!Big.RM!")}}if(i<1||!xc[0]){if(more){x.e=-dp;x.c=[1]}else{x.c=[x.e=0]}}else{xc.length=i--;if(more){for(;++xc[i]>9;){xc[i]=0;if(!i--){++x.e;xc.unshift(1)}}}for(i=xc.length;!xc[--i];xc.pop()){}}return x}function throwErr(message){var err=new Error(message);err.name="BigError";throw err}P.abs=function(){var x=new this.constructor(this);x.s=1;return x};P.cmp=function(y){var xNeg,x=this,xc=x.c,yc=(y=new x.constructor(y)).c,i=x.s,j=y.s,k=x.e,l=y.e;if(!xc[0]||!yc[0]){return!xc[0]?!yc[0]?0:-j:i}if(i!=j){return i}xNeg=i<0;if(k!=l){return k>l^xNeg?1:-1}i=-1;j=(k=xc.length)<(l=yc.length)?k:l;for(;++iyc[i]^xNeg?1:-1}}return k==l?0:k>l^xNeg?1:-1};P.div=function(y){var x=this,Big=x.constructor,dvd=x.c,dvs=(y=new Big(y)).c,s=x.s==y.s?1:-1,dp=Big.DP;if(dp!==~~dp||dp<0||dp>MAX_DP){throwErr("!Big.DP!")}if(!dvd[0]||!dvs[0]){if(dvd[0]==dvs[0]){throwErr(NaN)}if(!dvs[0]){throwErr(s/0)}return new Big(s*0)}var dvsL,dvsT,next,cmp,remI,u,dvsZ=dvs.slice(),dvdI=dvsL=dvs.length,dvdL=dvd.length,rem=dvd.slice(0,dvsL),remL=rem.length,q=y,qc=q.c=[],qi=0,digits=dp+(q.e=x.e-y.e)+1;q.s=s;s=digits<0?0:digits;dvsZ.unshift(0);for(;remL++remL?1:-1}else{for(remI=-1,cmp=0;++remIrem[remI]?1:-1;break}}}if(cmp<0){for(dvsT=remL==dvsL?dvs:dvsZ;remL;){if(rem[--remL]digits){rnd(q,dp,Big.RM,rem[0]!==u)}return q};P.eq=function(y){return!this.cmp(y)};P.gt=function(y){return this.cmp(y)>0};P.gte=function(y){return this.cmp(y)>-1};P.lt=function(y){return this.cmp(y)<0};P.lte=function(y){return this.cmp(y)<1};P.sub=P.minus=function(y){var i,j,t,xLTy,x=this,Big=x.constructor,a=x.s,b=(y=new Big(y)).s;if(a!=b){y.s=-b;return x.plus(y)}var xc=x.c.slice(),xe=x.e,yc=y.c,ye=y.e;if(!xc[0]||!yc[0]){return yc[0]?(y.s=-b,y):new Big(xc[0]?x:0)}if(a=xe-ye){if(xLTy=a<0){a=-a;t=xc}else{ye=xe;t=yc}t.reverse();for(b=a;b--;t.push(0)){}t.reverse()}else{j=((xLTy=xc.length0){for(;b--;xc[i++]=0){}}for(b=i;j>a;){if(xc[--j]0){ye=xe;t=yc}else{a=-a;t=xc}t.reverse();for(;a--;t.push(0)){}t.reverse()}if(xc.length-yc.length<0){t=yc;yc=xc;xc=t}a=yc.length;for(b=0;a;){b=(xc[--a]=xc[a]+yc[a]+b)/10|0;xc[a]%=10}if(b){xc.unshift(b);++ye}for(a=xc.length;xc[--a]===0;xc.pop()){}y.c=xc;y.e=ye;return y};P.pow=function(n){var x=this,one=new x.constructor(1),y=one,isNeg=n<0;if(n!==~~n||n<-MAX_POWER||n>MAX_POWER){throwErr("!pow!")}n=isNeg?-n:n;for(;;){if(n&1){y=y.times(x)}n>>=1;if(!n){break}x=x.times(x)}return isNeg?one.div(y):y};P.round=function(dp,rm){var x=this,Big=x.constructor;if(dp==null){dp=0}else if(dp!==~~dp||dp<0||dp>MAX_DP){throwErr("!round!")}rnd(x=new Big(x),dp,rm==null?Big.RM:rm);return x};P.sqrt=function(){var estimate,r,approx,x=this,Big=x.constructor,xc=x.c,i=x.s,e=x.e,half=new Big("0.5");if(!xc[0]){return new Big(x)}if(i<0){throwErr(NaN)}i=Math.sqrt(x.toString());if(i===0||i===1/0){estimate=xc.join("");if(!(estimate.length+e&1)){estimate+="0"}r=new Big(Math.sqrt(estimate).toString());r.e=((e+1)/2|0)-(e<0||e&1)}else{r=new Big(i.toString())}i=r.e+(Big.DP+=4);do{approx=r;r=half.times(approx.plus(x.div(approx)))}while(approx.c.slice(0,i).join("")!==r.c.slice(0,i).join(""));rnd(r,Big.DP-=4,Big.RM);return r};P.mul=P.times=function(y){var c,x=this,Big=x.constructor,xc=x.c,yc=(y=new Big(y)).c,a=xc.length,b=yc.length,i=x.e,j=y.e;y.s=x.s==y.s?1:-1;if(!xc[0]||!yc[0]){return new Big(y.s*0)}y.e=i+j;if(ai;){b=c[j]+yc[i]*xc[j-i-1]+b;c[j--]=b%10;b=b/10|0}c[j]=(c[j]+b)%10}if(b){++y.e}if(!c[0]){c.shift()}for(i=c.length;!c[--i];c.pop()){}y.c=c;return y};P.toString=P.valueOf=P.toJSON=function(){var x=this,Big=x.constructor,e=x.e,str=x.c.join(""),strL=str.length;if(e<=Big.E_NEG||e>=Big.E_POS){str=str.charAt(0)+(strL>1?"."+str.slice(1):"")+(e<0?"e":"e+")+e}else if(e<0){for(;++e;str="0"+str){}str="0."+str}else if(e>0){if(++e>strL){for(e-=strL;e--;str+="0"){}}else if(e1){str=str.charAt(0)+"."+str.slice(1)}return x.s<0&&x.c[0]?"-"+str:str};P.toExponential=function(dp){if(dp==null){dp=this.c.length-1}else if(dp!==~~dp||dp<0||dp>MAX_DP){throwErr("!toExp!")}return format(this,dp,1)};P.toFixed=function(dp){var str,x=this,Big=x.constructor,neg=Big.E_NEG,pos=Big.E_POS;Big.E_NEG=-(Big.E_POS=1/0);if(dp==null){str=x.toString()}else if(dp===~~dp&&dp>=0&&dp<=MAX_DP){str=format(x,x.e+dp);if(x.s<0&&x.c[0]&&str.indexOf("-")<0){str="-"+str}}Big.E_NEG=neg;Big.E_POS=pos;if(!str){throwErr("!toFix!")}return str};P.toPrecision=function(sd){if(sd==null){return this.toString()}else if(sd!==~~sd||sd<1||sd>MAX_DP){throwErr("!toPre!")}return format(this,sd-1,2)};Big=bigFactory();if(typeof define==="function"&&define.amd){define(function(){return Big})}else if(typeof module!=="undefined"&&module.exports){module.exports=Big}else{global.Big=Big}})(this); diff --git a/static/external/fonts/rw-widgets.eot b/static/external/fonts/rw-widgets.eot new file mode 100644 index 0000000000000000000000000000000000000000..2736d0f41e3c93fa3d1008ad241fa5bfeaf6ea94 GIT binary patch literal 5676 zcmd^CTWlN06`k4TOQbBy7DYLs@+k*^e(VGTV{eCVo}zGo=44rE;3%n zUS}#xpP1_G9_~2S1I^#@JDpiF3b!KsPauurH^!^Y+-Kc>hw68Pf zDa;uw1?cP1z5?l*Tf96w+5Xq>BMR@}_m}yckyS6OBp9<_MSuT16wZYDBHFjnZk=B$ zUD^`_Vs_YM`xf&VgTJdp7;})ae#y90U_bTz3vJk7V%b>A{p8w#=h5!M{C_UwS4zLT z_U2vK-;4fip_nWD=A8N_W7rVJzRbAt4St>3nM?VS@?&V;s!INQc8FuUHus9?Tc5=2 zSeA|4WA|#+$p>fIj5@`>j{fzHV~Ae$x6jf|Lqom$n2ilWx|s{p!^S;+&vmc%!2{?R z=5ti>Ufy)SX>H4V=;h|3iT8i~m@!t4@DGrsj+<^9kA(YrkMjQRC%E6|(1I=Po;CM= z_nO=1{iN3G`>q#F_nK$F&u8tAGQ|H;9jjvO?%w`^V7K4l<&Kt4-tMpCAJzGlnl;Zp z&zgsS;Pr7oA^aigrfvST@*3L(+aA;Q?%rWerfGt9;*zy}{w)8<>r-k?S3IZz*4R1a z%BJ59rr&<&Zl7tpl?Lure4=K}&0q1N<*)msw$5L*?Pcu2S@i}oO=AaGn02zFEY2p_ zadv`Du@`ah&*6}-Fl|H>3(JdV=QA^>rzaCHJooIe@zL1Gk?yD->S%9$!sU&G8?ovm zysx*vsi)iD%zG@<)QDyiyrC!#^z>-#?busJkw!+gG0>u7bldG+1DYCd;wn$HclOLMu+ zS6`KULit5=sK2$J_qO$0BGi1puQ?QIzR|kcdgGk4mb+ay%=tdPWvcGqc~p;iQXf>* zmsJm|Wsjjmy59@6G}YIrD&@y8@7~Yrl$IzT@a^ZrN>r`mO^BEoz$2Uj=yQa5OMB^O zAKt#?Sp4N5e>Hz`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wi`F_e zmOP3jH&zcPKIJ%v4N-XrXL0Ni`f=1+?rV_U;7sVU7vdO2Z47Z0 + + +Copyright (C) 2014 by original authors @ fontello.com + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/external/fonts/rw-widgets.ttf b/static/external/fonts/rw-widgets.ttf new file mode 100644 index 0000000000000000000000000000000000000000..be01da44fb56ee146f0fa3761fdcf2e39a184c80 GIT binary patch literal 5500 zcmd^CTWlN06`k4TOQbBy7DYLsPqXAqtasAZ-{b^j}qd-w~D7T1Hw1rXlqd|+JU;gV8ZQ&MezS0&@_FInlIzwo-NERUAu83h4u}`JcT)9r2u_B+OI*n<`%EcPPYH``-~}X&mvIC3xjKSYgB8)jmS-)glDX^b<{)IMd zFtKbb<$iMg(DP__Vg5fC@++m^U4P>q?C(c^wouF!ese*6gRw>$|3$`?Z}1z;&RohD zlpjO$W>xavvm;!=49u<)@!=~mJC1HlW4;%OSeb@ck^>yeN=5ti>e%|z;X>Hql=;h|3iT8hfnK4$5@%NFXj$3XU zkA(YrkMsWSC%E6|(1I=Po;CMD_nO=1{kYca`>q#F_nPOR&u8tAGQ|H;9jjvO-roL! zV7K4l<&Kt4-tMpCAJ+Mmnl;Y>&zgt7@AYv%A^Z?^(>8xvd7bTnZI5YtZ|^WC(=