Update
This commit is contained in:
parent
ce25d87c0b
commit
bcc878396b
@ -465,7 +465,7 @@ input:focus, textarea:focus, select:focus{
|
|||||||
|
|
||||||
.n-p-left {
|
.n-p-left {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 50%;
|
width: 40%;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
.n-p-right {
|
.n-p-right {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -52,7 +52,7 @@ async function productSubmitEventHandler(){
|
|||||||
imageRef.put(image).then(function(){
|
imageRef.put(image).then(function(){
|
||||||
submitBtn.innerHTML = "Done! Go Home..."
|
submitBtn.innerHTML = "Done! Go Home..."
|
||||||
submitBtn.disabled = false
|
submitBtn.disabled = false
|
||||||
submitBtn.setAttribute('style', 'background:#00FF55; transition:0.5s; width:162%;')
|
submitBtn.setAttribute('style', 'background:#00FF55; transition:0.5s; width:203%;')
|
||||||
})
|
})
|
||||||
.catch(e=>{
|
.catch(e=>{
|
||||||
submitBtn.innerHTML = "Error..."
|
submitBtn.innerHTML = "Error..."
|
||||||
@ -436,25 +436,45 @@ function sendAR(approved, prodID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initFileDropListner() {
|
function initFileDropListner() {
|
||||||
let dropZone = document.getElementById("dropzone")
|
try{
|
||||||
if (dropZone) {
|
let dropZone = document.getElementById("dropzone")
|
||||||
let fInput = document.getElementById('imgInput')
|
let imgPreview = document.getElementById("imgPreview")
|
||||||
dropZone.ondragover = function(){this.className = "dropzone dragover";return false}
|
let svgElement = document.getElementById('svgElement')
|
||||||
dropZone.ondragleave = function(){this.className = "dropzone";return false}
|
if (dropZone) {
|
||||||
dropZone.onclick = function(){
|
let fInput = document.getElementById('imgInput')
|
||||||
fInput.click()
|
dropZone.ondragover = function(){
|
||||||
}
|
this.className = "dropzone dragover"
|
||||||
fInput.onchange = function(event) {
|
imgPreview.setAttribute('style', 'display: none;')
|
||||||
let addedFile = event.target.files[0]
|
svgElement.setAttribute('style', 'display: block;')
|
||||||
fileAddSequence(addedFile)
|
return false
|
||||||
}
|
}
|
||||||
dropZone.ondrop = function(event) {
|
|
||||||
event.preventDefault()
|
dropZone.ondragleave = function(){
|
||||||
this.className = "dropzone"
|
this.className = "dropzone"
|
||||||
let droppedFile = event.dataTransfer.files[0]
|
// imgPreview.setAttribute('style', 'display:block')
|
||||||
fileAddSequence(droppedFile)
|
return false
|
||||||
|
|
||||||
|
}
|
||||||
|
dropZone.onclick = function(){
|
||||||
|
fInput.click()
|
||||||
|
}
|
||||||
|
|
||||||
|
fInput.onchange = function(event) {
|
||||||
|
let addedFile = event.target.files[0]
|
||||||
|
fileAddSequence(addedFile)
|
||||||
|
}
|
||||||
|
|
||||||
|
dropZone.ondrop = function(event) {
|
||||||
|
event.preventDefault()
|
||||||
|
this.className = "dropzone"
|
||||||
|
let droppedFile = event.dataTransfer.files[0]
|
||||||
|
console.log(droppedFile)
|
||||||
|
fileAddSequence(droppedFile)
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(error){}
|
||||||
}
|
}
|
||||||
|
|
||||||
initFileDropListner()
|
initFileDropListner()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user