This adds the ability to move the file data from Utils.displayFilesAsHTML to the input.

This commit is contained in:
bwhitn 2017-07-01 00:40:22 -04:00
parent 213ec028b8
commit 4143bba89f
3 changed files with 18 additions and 0 deletions

View file

@ -942,6 +942,12 @@ const Utils = {
"aria-controls='collapse" + i + "' " +
"title=\"Show/hide contents of '" + Utils.escapeHtml(file.fileName) + "'\">&#x1F50D</a>";
const hexFileData = Utils.byteArrayToHex(new Uint8Array(file.bytes));
const switchFileDataToInput = "<a href='#switchFileToInput" + i + "' " +
"class='file-switch' " +
"fileValue='" + hexFileData + "'>&#x21E7</a>";
const html = "<div class='panel panel-default'>" +
"<div class='panel-heading' role='tab' id='heading" + i + "'>" +
"<h4 class='panel-title'>" +
@ -949,6 +955,7 @@ const Utils = {
Utils.escapeHtml(file.fileName) +
" " + expandFileContentsElem +
" " + downloadAnchorElem +
" " + switchFileDataToInput +
"<span class='pull-right'>" +
// These are for formatting when stripping HTML
"<span style='display: none'>\n</span>" +