aboutsummaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/calculator.coffee2
-rw-r--r--public/js/report.coffee6
2 files changed, 5 insertions, 3 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee
index fd5244c6..c4b5f6d3 100644
--- a/public/js/calculator.coffee
+++ b/public/js/calculator.coffee
@@ -41,6 +41,8 @@ $(->
$(this).val('')
updateTotal()
)
+
+ $('#received').click(-> window.location = "/#{g.user.username}/report")
)
setup = ->
diff --git a/public/js/report.coffee b/public/js/report.coffee
index 7989c211..ed0cb232 100644
--- a/public/js/report.coffee
+++ b/public/js/report.coffee
@@ -86,7 +86,7 @@ display = (transactions) ->
$('#modal').modal()
$('#modal textarea').val('')
- $('#modal .btn-primary').toggle(address?)
+ $('#modal .btn-primary').toggle(txid? and txid.length > 5)
$('#modal .btn-danger').off().click(->
$('#yousure, #confirm').show()
@@ -96,11 +96,11 @@ display = (transactions) ->
$('#confirm .btn-danger').click(->
$.ajax(type: 'delete', url: "/#{$('#user').val()}/transactions/#{txid}")
$('#modal').modal('hide')
- row.remove()
+ row.fadeOut('slow')
)
$('#modal .btn-primary').off().click(->
- window.open("https://blockchain.info/address/#{address}", '_blank')
+ window.open("https://blockchain.info/tx/#{txid}", '_blank')
$('#modal').modal('hide')
)