aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/calculator.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/calculator.coffee')
-rw-r--r--public/js/calculator.coffee16
1 files changed, 8 insertions, 8 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee
index 6861bb16..01523d9a 100644
--- a/public/js/calculator.coffee
+++ b/public/js/calculator.coffee
@@ -7,7 +7,7 @@ g = exports ? this
$(->
g.websocket = null
- g.client = $('#client').val()
+ g.user = $('#user').val()
g.title = get('title')
g.address = get('address')
g.commission = get('commission')
@@ -18,8 +18,8 @@ $(->
setupQR()
setupSocket()
- if client? and client
- $.getJSON('client/' + client, (data) ->
+ if user? and user
+ $.getJSON(user + '.json', (data) ->
g.title = data.name
g.address = data.address
g.commission = data.commission
@@ -124,11 +124,11 @@ setupSocket = ->
$('#payment').hide()
$('#received').fadeIn('slow')
- $.get('record_transaction.php',
- address: from_address,
- date: moment().format("YYYY-MM-DD HH:mm:ss"),
- received: received,
- exchange: g.exchange
+ $.post("/#{g.user}/transactions",
+ address: from_address,
+ date: moment().format("YYYY-MM-DD HH:mm:ss"),
+ received: received,
+ exchange: g.exchange
)
get = (name) ->
eight: bold } /* Name.Exception */ .highlight .nf { color: #06B; font-weight: bold } /* Name.Function */ .highlight .nl { color: #369; font-style: italic } /* Name.Label */ .highlight .nn { color: #B06; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #369; font-weight: bold } /* Name.Property */ .highlight .nt { color: #B06; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #369 } /* Name.Variable */ .highlight .ow { color: #080 } /* Operator.Word */ .highlight .w { color: #BBB } /* Text.Whitespace */ .highlight .mb { color: #00D; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #00D; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #00D; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #00D; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #00D; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #D20; background-color: #FFF0F0 } /* Literal.String.Affix */ .highlight .sb { color: #D20; background-color: #FFF0F0 } /* Literal.String.Backtick */ .highlight .sc { color: #D20; background-color: #FFF0F0 } /* Literal.String.Char */ .highlight .dl { color: #D20; background-color: #FFF0F0 } /* Literal.String.Delimiter */ .highlight .sd { color: #D20; background-color: #FFF0F0 } /* Literal.String.Doc */ .highlight .s2 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Double */ .highlight .se { color: #04D; background-color: #FFF0F0 } /* Literal.String.Escape */ .highlight .sh { color: #D20; background-color: #FFF0F0 } /* Literal.String.Heredoc */ .highlight .si { color: #33B; background-color: #FFF0F0 } /* Literal.String.Interpol */ .highlight .sx { color: #2B2; background-color: #F0FFF0 } /* Literal.String.Other */ .highlight .sr { color: #080; background-color: #FFF0FF } /* Literal.String.Regex */ .highlight .s1 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Single */ .highlight .ss { color: #A60; background-color: #FFF0F0 } /* Literal.String.Symbol */ .highlight .bp { color: #038 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #06B; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #369 } /* Name.Variable.Class */ .highlight .vg { color: #D70 } /* Name.Variable.Global */ .highlight .vi { color: #33B } /* Name.Variable.Instance */ .highlight .vm { color: #369 } /* Name.Variable.Magic */ .highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */
@import "bootstrap.min.css";
@import "bootstrap-responsive.min.css";
@import "jquery-ui-1.9.0.custom.min.css";

body { text-align: center; }
body { line-height: 100%; }
h1 { width: 100%; margin-top: 0; }
	
div.container-fluid {
  width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-align:left;
  padding-bottom: 50px;
}

.navbar-toggle { background-color: #428bca; width: 480px; position: absolute; top: 0px; height: 20px; padding: 0 10px 10px 0; margin: 0; float: none; z-index: 1; }
.navbar { margin: 0; padding: 0; }
.navbar-collapse { padding: 0; } 
.navbar-collapse.in { overflow-y: visible; }
.nav { margin-top: 20px; padding: 0; }
.nav li { margin-left: 15px; width: 480px; }

.form-group {
  .form-control { height: 40px; padding: 3px; } 
  label { font-weight: normal; font-size: 14px; display: block; }
  p, span, input[type="text"], select { font-size: 18px; }
  span, label { color: #999; }
  .form-control { display: inline-block; }
}

form#setup, form#register {
  .form-control { width: 400px; }
}


div#calculator {
  #exchange, #amount { width: 5em; }
  span.btn { font-size: 1.4em; width: 80%; }
  strong#total { font-size: 2em; }
  #title { display: none; }
  #logo { display: none; padding: 10px 0; margin-bottom: 10px; max-height: 250px; }
  #error { margin-top: 10px; }
}

td#total { font-weight: bold; text-align: right; }
div#calculator p#address { font-size: 1em; margin-top: 20px; }


#main-logo {
  background-image: url('../img/coinos_logo.png');
  width: 300px;
  height: 80px;
  margin-top: 10px;
}
.svg #main-logo {
  background-image: url('../img/coinos_logo.svg') !important;
  background-size: 300px 80px;
}