diff options
| author | Adam Soltys <[email protected]> | 2015-11-18 17:21:46 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2015-11-27 22:02:48 -0800 |
| commit | b2b8eeaa85c21e5319f903002b73c571d81b54f5 (patch) | |
| tree | 09d6112b6e712f531a3655556cbf80bac6cf1288 | |
| parent | c98e4b8f8b4b646ec3f92618f9f74fd35cabbde1 (diff) | |
| download | coinos-server-b2b8eeaa85c21e5319f903002b73c571d81b54f5.tar.gz coinos-server-b2b8eeaa85c21e5319f903002b73c571d81b54f5.zip | |
Max button
| -rw-r--r-- | public/js/wallet.coffee | 7 | ||||
| -rw-r--r-- | views/users/wallet.html | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/public/js/wallet.coffee b/public/js/wallet.coffee index 7399973d..606c1f7d 100644 --- a/public/js/wallet.coffee +++ b/public/js/wallet.coffee @@ -45,6 +45,13 @@ $(-> $(this).html('BTC') ) + + $('#max').click(-> + if $('#currency_toggle').html() is 'BTC' + $('#amount').val(g.balance) + else + $('#amount').val((g.balance * g.exchange).toFixed(2)) + ) ) diff --git a/views/users/wallet.html b/views/users/wallet.html index 0ea2d187..fac7ac4b 100644 --- a/views/users/wallet.html +++ b/views/users/wallet.html @@ -30,7 +30,7 @@ <button id="currency_toggle" type="button" class="btn">BTC</button> </span> <span class="input-group-btn"> - <button type="button" class="btn">Max</button> + <button id="max" type="button" class="btn">Max</button> </span> </div> </div> |
