Commit 157c5367 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Add publish button to udapp (triggers publishContract event)

parent 19ed87c3
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
.udapp input, .udapp input,
.udapp button { .udapp button {
width: 33%; width: 20%;
display: block; display: block;
float: left; float: left;
padding: 0.25em; padding: 0.25em;
...@@ -186,6 +186,13 @@ ...@@ -186,6 +186,13 @@
border-radius: 3px; border-radius: 3px;
} }
.udapp .publishContract {
background-color: #EC96EC;
border-color: #EC96EC;
margin-right: 1em;
border-radius: 3px;
}
.udapp input { .udapp input {
border-left: 0 none; border-left: 0 none;
} }
...@@ -312,6 +319,10 @@ ...@@ -312,6 +319,10 @@
width: 1em; width: 1em;
} }
.udapp .legend .publish:before {
background-color: #EC96EC;
}
.udapp .legend .attach:before { .udapp .legend .attach:before {
background-color: #B1EAC5; background-color: #B1EAC5;
} }
......
...@@ -146,6 +146,7 @@ UniversalDApp.prototype.render = function () { ...@@ -146,6 +146,7 @@ UniversalDApp.prototype.render = function () {
} }
var $legend = $('<div class="legend" />') var $legend = $('<div class="legend" />')
.append($('<div class="publish"/>').text('Publish'))
.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="payable"/>').text('Transact (Payable)'))
...@@ -189,6 +190,10 @@ UniversalDApp.prototype.getCreateInterface = function ($container, contract) { ...@@ -189,6 +190,10 @@ UniversalDApp.prototype.getCreateInterface = function ($container, contract) {
$close.click(function () { self.$el.remove() }) $close.click(function () { self.$el.remove() })
$createInterface.append($close) $createInterface.append($close)
} }
var $publishButton = $('<button class="publishContract"/>').text('Publish').click(function () { self.event.trigger('publishContract', [contract]) })
$createInterface.append($publishButton)
var $atButton = $('<button class="atAddress"/>').text('At Address').click(function () { self.clickContractAt(self, $container.find('.createContract'), contract) }) var $atButton = $('<button class="atAddress"/>').text('At Address').click(function () { self.clickContractAt(self, $container.find('.createContract'), contract) })
$createInterface.append($atButton) $createInterface.append($atButton)
......
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