From 28f9e17938daf8ab45c3855140e103a0a9ac359e Mon Sep 17 00:00:00 2001 From: d11e9 Date: Tue, 6 Oct 2015 10:27:31 +0100 Subject: [PATCH] fix contract output collapsing/hiding --- index.html | 1 + stylesheets/browser-solidity.css | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/index.html b/index.html index 520c6d1c46..7a727cf338 100644 --- a/index.html +++ b/index.html @@ -471,6 +471,7 @@ THE SOFTWARE. .append(textRow('uDApp', combined(contractName,contract['interface'],contract.bytecode), 'deploy')) .append(getDetails(contract, source, contractName)); $('#txorigin').text('0x' + dapp.address.toString('hex')); + $contractOutput.find('.title').click(function(ev){ $(this).closest('.udapp').toggleClass('hide') }); $('#output').append( $contractOutput ); } $('.col2 input,textarea').click(function() { this.select(); }); diff --git a/stylesheets/browser-solidity.css b/stylesheets/browser-solidity.css index f74bd69a9c..5f36a2cbe0 100644 --- a/stylesheets/browser-solidity.css +++ b/stylesheets/browser-solidity.css @@ -119,6 +119,37 @@ body { float: left; } +.udapp.hide { + padding-bottom: 0; +} + +.udapp.hide > *:not(.contract) { + display: none; +} + +.udapp.hide .contract { + margin: 0; +} + +.udapp.hide .contract > *:not(.title) { + display: none; +} + +.udapp .contract > .title { + cursor:pointer; +} + +.udapp .contract > .title:before { + content: "\25BC"; + opacity: 0.5; + margin-right: 0.4em; + font-size: 10px; +} + +.udapp.hide > .contract > .title:before { + content: "\25B6"; +} + #output .poweredBy, #output .legend { display: none; }