diff options
| author | Adam Soltys <[email protected]> | 2014-07-13 22:27:18 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2014-07-13 22:48:43 -0700 |
| commit | 60029a8f0aa6c8263c0d04e13f00b5c17e8293b3 (patch) | |
| tree | 07cda37f934bea0d22241acc2031cd3528e2dd59 /public/js/calculator.coffee | |
| parent | 5285fd7af9a5ac71c75bdd6b0fa72de213792e50 (diff) | |
| download | coinos-server-60029a8f0aa6c8263c0d04e13f00b5c17e8293b3.tar.gz coinos-server-60029a8f0aa6c8263c0d04e13f00b5c17e8293b3.zip | |
Update bootstrap CSS
Diffstat (limited to 'public/js/calculator.coffee')
| -rw-r--r-- | public/js/calculator.coffee | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee index db073210..99560e86 100644 --- a/public/js/calculator.coffee +++ b/public/js/calculator.coffee @@ -43,10 +43,16 @@ $(-> else setup() - $('.tipSelect').click(-> - activateTip(this.id.substring(3)) + $('#tip button').click(-> + value = $(this).html().slice(0, -1) + $(this).siblings().css('font-weight','normal').removeClass('active') + $(this).css('font-weight','bold') + tip = 1 + (parseFloat(value)/100) updateTotal() ) + + $('#tip button').first().click() + $('#amount').keyup(updateTotal) $('#amount').focus(-> $('#received').hide() @@ -57,11 +63,6 @@ $(-> ) activateTip = (p) -> - $('.tipSelect').css('font-weight','normal') - $('.tipSelect').removeClass('active') - $('#tip'+p).css('font-weight','bold') - $('#tip'+p).addClass('active') - tip = 1+(parseFloat(p)/100) setup = -> g.address or= '' @@ -86,11 +87,11 @@ setup = -> else fail(ADDRESS_FAIL) - $('#symbol').html(g.currency) + $('#symbol').html(g.symbol + " bid") $('#currency').html(g.currency) $('#received').hide() - setupSocket() + # setupSocket() fetchExchangeRate() fetchExchangeRate = -> |
