From a6d9c76af2b4c7f3accf27fce5ecd83fbdcaf0c1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 6 Aug 2014 00:25:02 -0700 Subject: Tidy up transactions list --- public/css/calculator.css | 4 ++-- public/css/calculator.less | 2 +- public/js/report.coffee | 7 +++---- public/js/report.js | 6 +++--- views/transactions/index.html | 7 +++---- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/public/css/calculator.css b/public/css/calculator.css index e0a85748..89cc758e 100644 --- a/public/css/calculator.css +++ b/public/css/calculator.css @@ -71,8 +71,8 @@ div#calculator #amount { width: 5em; } div#calculator span.btn { - font-size: 1.4em; - width: 80%; + font-size: 16px; + width: 100%; } div#calculator strong#total { font-size: 30px; diff --git a/public/css/calculator.less b/public/css/calculator.less index 66aa48a4..da7b7fab 100644 --- a/public/css/calculator.less +++ b/public/css/calculator.less @@ -32,7 +32,7 @@ div.container-fluid { div#calculator { #exchange, #amount { width: 5em; } - span.btn { font-size: 1.4em; width: 80%; } + span.btn { font-size: 16px; width: 100%; } strong#total { font-size: 30px; } p#address { padding-top: 10px; } #title { display: none; } diff --git a/public/js/report.coffee b/public/js/report.coffee index 9f8a011b..37c5276d 100644 --- a/public/js/report.coffee +++ b/public/js/report.coffee @@ -63,8 +63,7 @@ display = (transactions) -> $('.report tbody').append(""" - #{this.date} - #{this.address} + #{moment(this.date, 'YYYY-MM-DD h:mm:ss').format('MMM D h:mma')} #{exchange.toFixed(2)} #{received.toFixed(5)} #{amount.toFixed(2)} @@ -73,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)) diff --git a/public/js/report.js b/public/js/report.js index 09d16a6f..69794ad5 100644 --- a/public/js/report.js +++ b/public/js/report.js @@ -63,15 +63,15 @@ received = parseFloat(this.received); amount = received * exchange; received *= 1000; - return $('.report tbody').append("\n " + this.date + "\n " + this.address + "\n " + (exchange.toFixed(2)) + "\n " + (received.toFixed(5)) + "\n " + (amount.toFixed(2)) + "\n"); + return $('.report tbody').append("\n " + (moment(this.date, 'YYYY-MM-DD h:mm:ss').format('MMM D h:mma')) + "\n " + (exchange.toFixed(2)) + "\n " + (received.toFixed(5)) + "\n " + (amount.toFixed(2)) + "\n"); }); btc = 0; - $('table.report td:nth-child(4)').each(function() { + $('table.report tbody td:nth-child(3)').each(function() { return btc += parseFloat($(this).html()); }); $('#btc').html(btc.toFixed(5)); cad = 0; - $('table.report td:nth-child(5)').each(function() { + $('table.report tbody td:nth-child(4)').each(function() { return cad += parseFloat($(this).html()); }); return $('#cad').html(cad.toFixed(2)); diff --git a/views/transactions/index.html b/views/transactions/index.html index 3cd88d1f..281f2292 100644 --- a/views/transactions/index.html +++ b/views/transactions/index.html @@ -18,11 +18,10 @@ - +
- - + @@ -32,7 +31,7 @@ - + -- cgit v1.2.3
DateAddressTime Rate mBTC CAD
Totals:Total: