@ -64,7 +64,7 @@ THE SOFTWARE.
< div id = "righthand-panel" >
< div id = "righthand-panel" >
< div id = "header" >
< div id = "header" >
< div id = "menu" >
< div id = "menu" >
< img id = "solIcon" title = "Solidity realtime compiler and runtime" src = "assets/img/sol.gif" >
< img id = "solIcon" title = "Solidity realtime compiler and runtime" src = "assets/img/sol.gif" alt = "Solidity realtime compiler and runtime" >
< ul id = "options" >
< ul id = "options" >
< li class = "txView active" > < i class = "fa fa-send" > < / i > < / li >
< li class = "txView active" > < i class = "fa fa-send" > < / i > < / li >
< li class = "envView" > < i class = "fa fa-tachometer" > < / i > < / li >
< li class = "envView" > < i class = "fa fa-tachometer" > < / i > < / li >
@ -74,10 +74,18 @@ THE SOFTWARE.
< / div >
< / div >
< div id = "optionViews" class = "txView" >
< div id = "optionViews" class = "txView" >
< div id = "txView" >
< div id = "txView" >
< select name = "origin" id = "txorigin" > < / select >
< div class = "row" >
< label for = "gas" > < input type = "number" id = "gas" > Gas< / label >
< label for = "txorigin" > < select name = "txorigin" id = "txorigin" > < / select > Transaction origin< / label >
< label for = "gasPrice" > < input type = "number" id = "gasPrice" > Gas Price< / label >
< / div >
< label for = "value" > < input type = "number" id = "value" > Value< / label >
< div class = "row" >
< label for = "gas" > < input type = "number" id = "gas" value = "0" > Gas< / label >
< / div >
< div class = "row" >
< label for = "gasPrice" > < input type = "number" id = "gasPrice" value = "0" > Gas Price< / label >
< / div >
< div class = "row" >
< label for = "value" > < input type = "number" id = "value" value = "0" > Value< / label >
< / div >
< / div >
< / div >
< div id = "settingsView" >
< div id = "settingsView" >
< div class = "version" > Solidity version: < span id = "version" > (loading)< / span > < br / > Change to: < select id = "versionSelector" > < / select > < / div >
< div class = "version" > Solidity version: < span id = "version" > (loading)< / span > < br / > Change to: < select id = "versionSelector" > < / select > < / div >
@ -85,9 +93,8 @@ THE SOFTWARE.
< label for = "optimize" > < input id = "optimize" type = "checkbox" > Enable Optimization< / label >
< label for = "optimize" > < input id = "optimize" type = "checkbox" > Enable Optimization< / label >
< / div >
< / div >
< div id = "publishView" >
< div id = "publishView" >
< p > < button id = "gist" title = "Publish all files as public gist on github.com" > < i class = "fa fa-github" > < / i > Publish gist< / button > Publish all open files to an anonymous github gist.< / p >
< p > Publish all open files to an anonymous github gist.< / p >
< button id = "gist" title = "Publish all files as public gist on github.com" > < i class = "fa fa-github" > < / i > Publish Gist< / button >
< p > Publish to ipfs ...< / p >
< / div >
< / div >
< div id = "envView" >
< div id = "envView" >
< span id = "executionContext" >
< span id = "executionContext" >
@ -188,13 +195,17 @@ THE SOFTWARE.
// ----------------- tabbed menu -------------------
// ----------------- tabbed menu -------------------
$('#options li').click(function(){
$('#options li').click(function(ev ){
var $el = $(this);
var $el = $(this);
var cls = /[a-z]+View/.exec( $el.get(0).className )[0];
var cls = /[a-z]+View/.exec( $el.get(0).className )[0];
$el.parent().find('li').removeClass('active');
if (!$el.hasClass('active')) {
$el.addClass('active');
$el.parent().find('li').removeClass('active');
$('#optionViews').attr('class', '').addClass(cls);
$('#optionViews').attr('class', '').addClass(cls);
console.log(cls)
$el.addClass('active');
} else {
$el.removeClass('active');
$('#optionViews').removeClass(cls);
}
});
});
// ----------------- execution context -------------
// ----------------- execution context -------------
@ -635,6 +646,7 @@ THE SOFTWARE.
var dapp = new UniversalDApp(udappContracts, {
var dapp = new UniversalDApp(udappContracts, {
vm: executionContext === 'vm',
vm: executionContext === 'vm',
removable: false,
removable: false,
getAddress: function(){ return $('txorigin').val(); },
removable_instances: true,
removable_instances: true,
renderOutputModifier: function(contractName, $contractOutput) {
renderOutputModifier: function(contractName, $contractOutput) {
var contract = data.contracts[contractName];
var contract = data.contracts[contractName];