Skip to content

Commit

Permalink
demo pages. ETH Signer. Disabled fields changed to readonly as it's m…
Browse files Browse the repository at this point in the history
…ore appropriate
  • Loading branch information
dtaipov committed Jan 31, 2019
1 parent e675fd8 commit 0a00443
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions docs/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ke
<div class="column col-6 col-xs-12">
<div class="input-group">
<span class="input-group-addon">selected key: </span>
<input type="text" class="form-input" disabled id="selectedKey" placeholder="Please select a key">
<input type="text" class="form-input" readonly id="selectedKey" placeholder="Please select a key">
</div>
</div>
<div class="column col-6 col-xs-12">
<div class="input-group">
<label class="form-switch">
</label>
<span class="input-group-addon">address: </span>
<input type="text" class="form-input" disabled id="address" placeholder="Please select a key">
<input type="text" class="form-input" readonly id="address" placeholder="Please select a key">
</div>
</div>
</div>
Expand Down Expand Up @@ -100,7 +100,7 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ke
<input type="checkbox" id="checkbox_SIGN_HEX"><i class="form-icon"></i>
</label>
<span class="input-group-addon">unlock_time: </span>
<input type="number" class="form-input" placeholder="45" id="unlock_time_SIGN_HEX" title="This parameter is experimental and optional!" disabled>
<input type="number" class="form-input" placeholder="45" id="unlock_time_SIGN_HEX" title="This parameter is experimental and optional!" readonly>
</div>
</div>
</div>
Expand Down Expand Up @@ -176,7 +176,7 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ke
attachListener('ABOUT');
attachListener('VERSION');
document.getElementById('checkbox_SIGN_HEX').addEventListener('click', function(e) {
document.getElementById('unlock_time_SIGN_HEX').disabled = !e.target.checked;
document.getElementById('unlock_time_SIGN_HEX').readOnly = !e.target.checked;
})
};

Expand All @@ -187,7 +187,7 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ke
for (let i = 0; i < paramNames.length; i++) {
const paramName = paramNames[i];
const input = document.getElementById(paramName + '_' + commandName);
if (!input.disabled) {
if (!input.readOnly) {
request.params[paramName] = input.value;
}
}
Expand Down
10 changes: 5 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ke
<div class="column col-6 col-xs-12">
<div class="input-group">
<span class="input-group-addon">selected key: </span>
<input type="text" class="form-input" disabled id="selectedKey" placeholder="Please select a key">
<input type="text" class="form-input" readonly id="selectedKey" placeholder="Please select a key">
</div>
</div>
<div class="column col-6 col-xs-12">
<div class="input-group">
<label class="form-switch">
</label>
<span class="input-group-addon">address: </span>
<input type="text" class="form-input" disabled id="address" placeholder="Please select a key">
<input type="text" class="form-input" readonly id="address" placeholder="Please select a key">
</div>
</div>
</div>
Expand Down Expand Up @@ -100,7 +100,7 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ke
<input type="checkbox" id="checkbox_SIGN_HEX"><i class="form-icon"></i>
</label>
<span class="input-group-addon">unlock_time: </span>
<input type="number" class="form-input" placeholder="45" id="unlock_time_SIGN_HEX" title="This parameter is experimental and optional!" disabled>
<input type="number" class="form-input" placeholder="45" id="unlock_time_SIGN_HEX" title="This parameter is experimental and optional!" readonly>
</div>
</div>
</div>
Expand Down Expand Up @@ -176,7 +176,7 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ke
attachListener('ABOUT');
attachListener('VERSION');
document.getElementById('checkbox_SIGN_HEX').addEventListener('click', function(e) {
document.getElementById('unlock_time_SIGN_HEX').disabled = !e.target.checked;
document.getElementById('unlock_time_SIGN_HEX').readOnly = !e.target.checked;
})
};

Expand All @@ -187,7 +187,7 @@ <h6>Documentation: <a href="https://github.com/arrayio/array-io-keychain/wiki/Ke
for (let i = 0; i < paramNames.length; i++) {
const paramName = paramNames[i];
const input = document.getElementById(paramName + '_' + commandName);
if (!input.disabled) {
if (!input.readOnly) {
request.params[paramName] = input.value;
}
}
Expand Down

0 comments on commit 0a00443

Please sign in to comment.