mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
drag and drop images
This commit is contained in:
@@ -133,11 +133,16 @@ include('../globalHTML/header-1.php');
|
||||
<div class='readable-background padding'>
|
||||
<h5 class='margin-bottom padding input-description'>Upload custom frame images</h5>
|
||||
<div class='input-grid'>
|
||||
<input type='file' accept='.png, .svg, .jpg, .jpeg, .bmp' placeholder='Via File Upload' class='input' oninput='imageLocal(event, uploadFrameOption);'>
|
||||
<div class='padding drop-area'>
|
||||
<h5 class='margin-bottom padding input-description'>Drag and drop</h5>
|
||||
<input type='file' multiple accept='.png, .svg, .jpg, .jpeg, .bmp' placeholder='File Upload' class='input' oninput='uploadFiles(event.target.files, uploadFrameOption);' data-dropFunction='uploadFrameOption' data-otherParams=''>
|
||||
</div>
|
||||
<div>
|
||||
<input type='url' placeholder='Via URL' class='input' onchange='imageURL(this.value, uploadFrameOption);'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='creator-menu-text' class='hidden'>
|
||||
<div class='readable-background padding margin-bottom'>
|
||||
<h5 class='margin-bottom padding input-description'>Select a text area to edit</h5>
|
||||
@@ -196,9 +201,14 @@ include('../globalHTML/header-1.php');
|
||||
<div class='readable-background padding margin-bottom'>
|
||||
<h5 class='margin-bottom padding input-description'>Choose/upload your art</h5>
|
||||
<div class='input-grid margin-bottom'>
|
||||
<input type='file' accept='.png, .svg, .jpg, .jpeg, .bmp' placeholder='Via File Upload' class='input' oninput='imageLocal(event, uploadArt, "autoFit");'>
|
||||
<div class='padding drop-area'>
|
||||
<h5 class='margin-bottom padding input-description'>Drag and drop</h5>
|
||||
<input type='file' multiple accept='.png, .svg, .jpg, .jpeg, .bmp' placeholder='File Upload' class='input' oninput='uploadFiles(event.target.files, uploadArt, "autoFit");' data-dropFunction='uploadArt' data-otherParams='autoFit'>
|
||||
</div>
|
||||
<div>
|
||||
<input type='url' placeholder='Via URL' class='input' onchange='imageURL(this.value, uploadArt, "autoFit");'>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class='margin-bottom padding input-description'>Or enter a card name (and index)</h5>
|
||||
<div class='input-grid margin-bottom'>
|
||||
<input id='art-name' type='text' placeholder='Enter Card Name' class='input' onchange='fetchScryfallData(this.value, artFromScryfall);'>
|
||||
@@ -229,9 +239,14 @@ include('../globalHTML/header-1.php');
|
||||
<div class='readable-background padding margin-bottom'>
|
||||
<h5 class='margin-bottom padding input-description'>Choose/upload your set symbol</h5>
|
||||
<div class='input-grid margin-bottom'>
|
||||
<input type='file' accept='.png, .svg, .jpg, .jpeg, .bmp' placeholder='Via File Upload' class='input' oninput='imageLocal(event, uploadSetSymbol, "resetSetSymbol");'>
|
||||
<div class='padding drop-area'>
|
||||
<h5 class='margin-bottom padding input-description'>Drag and drop</h5>
|
||||
<input type='file' multiple accept='.png, .svg, .jpg, .jpeg, .bmp' placeholder='File Upload' class='input' oninput='uploadFiles(event.target.files, uploadSetSymbol, "resetSetSymbol");' data-dropFunction='uploadSetSymbol' data-otherParams='resetSetSymbol'>
|
||||
</div>
|
||||
<div>
|
||||
<input type='url' placeholder='Via URL' class='input' onchange='imageURL(this.value, uploadSetSymbol, "resetSetSymbol");'>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class='margin-bottom padding input-description'>Or enter a set code/rarity</h5>
|
||||
<div class='input-grid margin-bottom'>
|
||||
<input id='set-symbol-code' type='text' placeholder='Set Code' class='input' oninput='fetchSetSymbol();'>
|
||||
@@ -268,10 +283,15 @@ include('../globalHTML/header-1.php');
|
||||
<div class='readable-background padding margin-bottom'>
|
||||
<h5 class='margin-bottom padding input-description'>Choose/upload your watermark</h5>
|
||||
<div class='input-grid'>
|
||||
<input type='file' accept='.png, .svg, .jpg, .jpeg, .bmp' placeholder='Via File Upload' class='input' oninput='imageLocal(event, uploadWatermark, "resetWatermark");'>
|
||||
<input type='url' placeholder='Via URL' class='input' onchange='imageURL(this.value, uploadWatermark, "resetWatermark");'>
|
||||
<div class='padding drop-area'>
|
||||
<h5 class='margin-bottom padding input-description'>Drag and drop</h5>
|
||||
<input type='file' multiple accept='.png, .svg, .jpg, .jpeg, .bmp' placeholder='File Upload' class='input' oninput='uploadFiles(event.target.files, uploadWatermark, "resetWatermark");' data-dropFunction='uploadWatermark' data-otherParams='resetWatermark'>
|
||||
</div>
|
||||
<div>
|
||||
<input type='url' placeholder='Via URL' class='input margin-bottom' onchange='imageURL(this.value, uploadWatermark, "resetWatermark");'>
|
||||
<input type='text' placeholder='Via Set Code' class='input' onchange='getSetSymbolWatermark(this.value);'>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class='collapsible collapsed padding input-description' onclick='toggleCollapse(event);'>
|
||||
How to find set codes
|
||||
</h5>
|
||||
|
@@ -62,7 +62,7 @@ function dropDrop(e) {
|
||||
e.stopPropagation();
|
||||
e.target.closest('.drop-area').classList.remove('hover');
|
||||
destination = window[e.target.closest('.drop-area').children[1].getAttribute('data-dropFunction')];
|
||||
otherParams = window[e.target.closest('.drop-area').children[1].getAttribute('data-otherParams')];
|
||||
otherParams = e.target.closest('.drop-area').children[1].getAttribute('data-otherParams');
|
||||
uploadFiles(e.dataTransfer.files, destination, otherParams);
|
||||
}
|
||||
async function uploadFiles(filesRaw, destination, otherParams) {
|
||||
|
Reference in New Issue
Block a user