Commit 478fe25f authored by chriseth's avatar chriseth Committed by GitHub

Merge pull request #352 from ethereum/payable-buttons

Payable buttons
parents 7c752f0b 1e3c6465
...@@ -223,8 +223,8 @@ ...@@ -223,8 +223,8 @@
} }
.udapp .contractProperty .call { .udapp .contractProperty .call {
background-color: #FF8B8B; background-color: #FFB9B9;
border-color: #FF8B8B; border-color: #FFB9B9;
} }
.udapp .contractProperty .debug { .udapp .contractProperty .debug {
...@@ -238,6 +238,12 @@ ...@@ -238,6 +238,12 @@
width: 25%; width: 25%;
} }
.udapp .contractProperty.payable .call {
background-color: #FF8B8B;
border-color: #FF8B8B;
width: 25%;
}
.udapp .contractProperty input { .udapp .contractProperty input {
display: none; display: none;
} }
...@@ -307,13 +313,17 @@ ...@@ -307,13 +313,17 @@
} }
.udapp .legend .attach:before { .udapp .legend .attach:before {
background-color: #62B762; background-color: #B1EAC5;
} }
.udapp .legend .transact:before { .udapp .legend .transact:before {
background-color: #D42828; background-color: #FFB9B9;
}
.udapp .legend .payable:before {
background-color: #FF8B8B;
} }
.udapp .legend .call:before { .udapp .legend .call:before {
background-color: #556DF3; background-color: #9DC1F5;
} }
...@@ -152,6 +152,7 @@ UniversalDApp.prototype.render = function () { ...@@ -152,6 +152,7 @@ UniversalDApp.prototype.render = function () {
var $legend = $('<div class="legend" />') var $legend = $('<div class="legend" />')
.append($('<div class="attach"/>').text('Attach')) .append($('<div class="attach"/>').text('Attach'))
.append($('<div class="transact"/>').text('Transact')) .append($('<div class="transact"/>').text('Transact'))
.append($('<div class="payable"/>').text('Transact (Payable)'))
.append($('<div class="call"/>').text('Call')) .append($('<div class="call"/>').text('Call'))
self.$el.append($legend) self.$el.append($legend)
...@@ -654,6 +655,10 @@ UniversalDApp.prototype.getCallButton = function (args) { ...@@ -654,6 +655,10 @@ UniversalDApp.prototype.getCallButton = function (args) {
$contractProperty.addClass('hasArgs') $contractProperty.addClass('hasArgs')
} }
if (args.abi.payable === true) {
$contractProperty.addClass('payable')
}
return $contractProperty.append(outputSpan) return $contractProperty.append(outputSpan)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment