Giving radio buttons more descriptive ids

pull/1/head
Dave Hoover 9 years ago
parent 24cfd755cf
commit 7622bdd085
  1. 13
      index.html
  2. 6
      src/app/execution-context.js

@ -99,19 +99,18 @@
</div> </div>
<div id="envView"> <div id="envView">
<span id="executionContext"> <span id="executionContext">
<label for="vm"> <label for="vm-mode">
<input id="vm" type="radio" value="vm" checked name="executionContext"> <input id="vm-mode" type="radio" value="vm" checked name="executionContext">
<strong>JavaScript VM</strong> <strong>JavaScript VM</strong>
<p>Execution environment does not connect to any node, everything is local and in memory only.</p> <p>Execution environment does not connect to any node, everything is local and in memory only.</p>
</label> </label>
<label for="injected"> <label for="injected-mode">
<input id="injected" type="radio" value="injected" checked name="executionContext"> <input id="injected-mode" type="radio" value="injected" checked name="executionContext">
<strong>Injected Web3</strong> <strong>Injected Web3</strong>
<p>Execution environment has been provided by Mist or similar provider.</p> <p>Execution environment has been provided by Mist or similar provider.</p>
</label> </label>
<label for="_web3"> <label for="web3-mode">
<!-- This element cannot be named web3 due to this HTML quirk: http://www.2ality.com/2012/08/ids-are-global.html. In order to detect when web3 is injected by Mist, MetaMask, etc, there cannot be any HTML elements with and id of web3. --> <input id="web3-mode" type="radio" value="web3" name="executionContext">
<input id="_web3" type="radio" value="web3" name="executionContext">
<strong>Web3 Provider</strong> <strong>Web3 Provider</strong>
<p>Execution environment connects to node at localhost (or via IPC if available), transactions will be sent to the network and can cause loss of money or worse!<br/> <p>Execution environment connects to node at localhost (or via IPC if available), transactions will be sent to the network and can cause loss of money or worse!<br/>
<b>If this page is served via https and you access your node via http, it might not work. In this case, try cloning the repository and serving it via http.</b></p> <b>If this page is served via https and you access your node via http, it might not work. In this case, try cloning the repository and serving it via http.</b></p>

@ -21,9 +21,9 @@ function ExecutionContext (compiler) {
return web3; return web3;
}; };
var $injectedToggle = $('#injected'); var $injectedToggle = $('#injected-mode');
var $vmToggle = $('#vm'); var $vmToggle = $('#vm-mode');
var $web3Toggle = $('#web3'); var $web3Toggle = $('#web3-mode');
var $web3endpoint = $('#web3Endpoint'); var $web3endpoint = $('#web3Endpoint');
if (web3.providers && web3.currentProvider instanceof web3.providers.IpcProvider) { if (web3.providers && web3.currentProvider instanceof web3.providers.IpcProvider) {

Loading…
Cancel
Save