aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/report.coffee
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-08-08 11:33:43 -0700
committerAdam Soltys <[email protected]>2014-08-08 11:33:43 -0700
commit2cc86381a6f79cd729048b34a72b70562a7b0ace (patch)
treec42dda997719ce544a4dea2bf15937d293ebfd59 /public/js/report.coffee
parent3082e274b70a93fdac8a9a63934252ed914fe406 (diff)
parent6d5c3a56067b96bb5d97cca4a80bacbf78395b2c (diff)
downloadcoinos-server-2cc86381a6f79cd729048b34a72b70562a7b0ace.tar.gz
coinos-server-2cc86381a6f79cd729048b34a72b70562a7b0ace.zip
Merge branch 'code_reorg'
Diffstat (limited to 'public/js/report.coffee')
-rw-r--r--public/js/report.coffee14
1 files changed, 7 insertions, 7 deletions
diff --git a/public/js/report.coffee b/public/js/report.coffee
index c152e0d9..7bcfb8c3 100644
--- a/public/js/report.coffee
+++ b/public/js/report.coffee
@@ -1,6 +1,7 @@
-#= require jquery-1.8.2.min.js
-#= require jquery-ui-1.9.0.custom.min.js
-#= require moment.min.js
+#= require ../js/jquery-1.8.2.min.js
+#= require ../js/jquery-ui.min.js
+#= require ../js/bootstrap.min.js
+#= require ../js/moment.min.js
g = exports ? this
@@ -62,8 +63,7 @@ display = (transactions) ->
$('.report tbody').append("""
<tr>
- <td>#{this.date}</td>
- <td>#{this.address}</td>
+ <td>#{moment(this.date, 'YYYY-MM-DD h:mm:ss').format('MMM D h:mma')}</td>
<td>#{exchange.toFixed(2)}</td>
<td>#{received.toFixed(5)}</td>
<td>#{amount.toFixed(2)}</td>
@@ -72,13 +72,13 @@ display = (transactions) ->
)
btc = 0
- $('table.report td:nth-child(4)').each(->
+ $('table.report tbody td:nth-child(3)').each(->
btc += parseFloat($(this).html())
)
$('#btc').html(btc.toFixed(5))
cad = 0
- $('table.report td:nth-child(5)').each(->
+ $('table.report tbody td:nth-child(4)').each(->
cad += parseFloat($(this).html())
)
$('#cad').html(cad.toFixed(2))