Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Fix edit bitcoin address
Browse files Browse the repository at this point in the history
  • Loading branch information
kyungmin committed Feb 22, 2014
1 parent cecb027 commit b41e913
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
10 changes: 5 additions & 5 deletions js/gittip/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,12 @@ Gittip.profile.init = function() {
$('a.bitcoin').text(d.bitcoin_address);
$('.bitcoin').toggle();
if (d.bitcoin_address === '') {
html = "Add a <a href=\"javascript:;\" class=\"toggle-bitcoin\">Bitcoin address</a>.";
html = '<span class="none">none</span><a class="btn small toggle-bitcoin" href="javascript:;">+ Add</a>';
} else {
html = "<a rel=\"me\" href=\"http://blockchain.info/address/";
html += d.bitcoin_address + "\">" + d.bitcoin_address + "</a>";
html += "<div class=\"edit-bitcoin\"><a href=\"javascript:;\" class=\"toggle-bitcoin\">Edit</a> bitcoin address ";
html += "</div>";
html = '<a class="address" rel="me" href="http://blockchain.info/address/';
html += d.bitcoin_address + '">' + d.bitcoin_address + '</a>';
html += '<a href="javascript:;" class="edit-bitcoin btn small toggle-bitcoin">Edit</a>';
html += '</div>';
}
$('div.bitcoin').html(html);
$this.text('Save');
Expand Down
5 changes: 3 additions & 2 deletions scss/profile-edit.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@
}
}
.bitcoin {
font-size: 13px;
.address {
font-size: 13px;
}


.edit-bitcoin {
text-transform: uppercase;
font-weight: bold;
Expand Down
25 changes: 13 additions & 12 deletions templates/connected-accounts.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,22 @@ <h2>One-off {{ 'Receiving' if user.participant == participant else 'Giving' }} O
{% else %}
<div>
{% endif %}
{% if participant.bitcoin_address %}
<a rel="me" href="http://blockchain.info/address/{{ participant.bitcoin_address }}">
{{ participant.bitcoin_address }}
</a>
{% if not user.ANON and user.participant == participant %}

<a href="javascript:;" class="edit-bitcoin btn small toggle-bitcoin">Edit</a>
{% endif %}
{% if participant.bitcoin_address %}
<a class="address" rel="me" href="http://blockchain.info/address/{{ participant.bitcoin_address }}">
{{ participant.bitcoin_address }}
</a>
{% if not user.ANON and user.participant == participant %}

{% else %}
<span class="none">none</span>
{% if not user.ANON and user.participant == participant %}
<a class="btn small toggle-bitcoin" href="javascript:;">+ Add</a>
{% endif %}
<a href="javascript:;" class="edit-bitcoin btn small toggle-bitcoin">Edit</a>
{% endif %}

{% else %}
<span class="none">none</span>
{% if not user.ANON and user.participant == participant %}
<a class="btn small toggle-bitcoin" href="javascript:;">+ Add</a>
{% endif %}
{% endif %}
</div>
<form class="bitcoin-submit">
<div class="address">
Expand Down

1 comment on commit b41e913

@kyungmin
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolves #2065

Please sign in to comment.