added pre output

This commit is contained in:
Kevin Froman 2017-03-30 22:42:02 -05:00
parent 38c24a0501
commit 25951b8603
No known key found for this signature in database
GPG Key ID: 36698DB39DA54065
4 changed files with 13 additions and 5 deletions

View File

@ -29,7 +29,8 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<br> <br>
<div class='center'><input type='text' readonly id='output'> <button class="btn btn-success" data-clipboard-action="copy" data-clipboard-target="#output">Copy to Clipboard</button></div> <pre id='output'></pre>
<div class='center'><button class="btn btn-success" data-clipboard-action="copy" data-clipboard-target="#output">Copy to Clipboard</button></div>
<div id='copyFeedback' class='center'></div> <div id='copyFeedback' class='center'></div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">

View File

@ -154,7 +154,7 @@ function go(mode) {
} }
// convert result to binary // convert result to binary
output = textToBin(encodeURIComponent(input)); output = textToBin(encodeURIComponent(input));
$('#output').val(replaceAll(replaceAll(output.toString(), "1", one), "0", zero)); $('#output').text(replaceAll(replaceAll(output.toString(), "1", one), "0", zero));
} }
else else
{ {
@ -175,7 +175,7 @@ function go(mode) {
return false; return false;
} }
} }
$('#output').val(output.toString()); $('#output').text(output.toString());
} }
$('#outputModal').modal(); $('#outputModal').modal();
} }

View File

@ -39,7 +39,14 @@ footer
#copyFeedback #copyFeedback
{ {
display: none;
margin-top: 1em; margin-top: 1em;
margin-bottom: 1em; margin-bottom: 1em;
} }
#outputDecode, #copyFeedback{
display: none;
}
#outputDecode{
overflow: scroll;
}

2
theme.min.css vendored
View File

@ -1 +1 @@
#copyFeedback,#one{margin-bottom:1em}body{background-color:#d8d8d8;color:#000}.center{text-align:center}#dataArea{margin-left:3em;margin-right:3em}#text{width:100%;max-width:100%;min-height:300px}.dataItem{margin:1em}footer{margin-top:1em;margin-bottom:2em}#copyFeedback{display:none;margin-top:1em} body{background-color:#d8d8d8;color:black}.center{text-align:center}#dataArea{margin-left:3em;margin-right:3em}#text{width:100%;max-width:100%;min-height:300px}#one{margin-bottom:1em}.dataItem{margin:1em}footer{margin-top:1em;margin-bottom:2em}#copyFeedback{margin-top:1em;margin-bottom:1em}#outputDecode,#copyFeedback{display:none}#outputDecode{overflow:scroll}