/quickload/index.html |
@@ -5,7 +5,7 @@ |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> |
<meta name="description" content="quick file upload"> |
<meta name="description" content="quick asset upload"> |
<meta name="author" content="Wizardry and Steamworks"> |
<link rel="icon" href="favicon.ico"> |
|
@@ -49,15 +49,12 @@ |
|
<div class="panel panel-default"> |
<div class="panel-heading"> |
<h3 class="panel-title">File Upload</h3> |
</div> |
<div class="panel-body" style="min-height: 480px; border: 2px dashed #0087F7; border-radius: 5px; background: white; box-sizing: border-box; padding: 54px 54px; outline-offset: -24px;"> |
<div id="actions" class="row fallback"> |
<div id="actions" class="row"> |
<div class="col-lg-5"> |
<div class="btn-group btn-group-justified" role="group"> |
<!-- The fileinput-button span is used to style the file input field as button --> |
<div class="btn-group" role="group"> |
<button type="button" class="btn btn-default fileinput-button"> |
<button id="uploadbutton" type="button" class="btn btn-default"> |
<i class="glyphicon glyphicon-plus"></i> |
<span>Add...</span> |
</button> |
@@ -77,11 +74,13 @@ |
</div> |
</div> |
</div> |
</div> |
<div class="panel-body" id="uploadpanel"> |
<div class="table table-striped files" id="previews"> |
<div id="template" class="file-row"> |
<!-- This is used as the file preview template --> |
<div> |
<span class="preview"><img src="img/fileholder.svg" alt="Upload file thumbnail" data-dz-thumbnail></span> |
<span class="preview"><img src="img/fileholder.svg" width="58" alt="Upload file thumbnail" data-dz-thumbnail></span> |
</div> |
<div> |
<p id="name" class="name" data-dz-name></p> |
@@ -108,9 +107,9 @@ |
<i class="glyphicon glyphicon-ban-circle"></i> |
<span>Cancel</span> |
</button> |
<button id="delete" data-dz-remove class="btn btn-danger delete"> |
<i class="glyphicon glyphicon-trash"></i> |
<span>Delete</span> |
<button id="remove" data-dz-remove class="btn btn-danger remove"> |
<i class="glyphicon glyphicon-remove"></i> |
<span>Remove</span> |
</button> |
</div> |
</div> |
@@ -165,8 +164,11 @@ |
previewTemplate: previewTemplate, |
autoQueue: false, // Make sure the files aren't queued until manually added |
previewsContainer: "#previews", // Container to display the previews |
clickable: true, |
//clickable: ".fileinput-button" // Element that should be used as click trigger to select files. |
clickable: [ |
"#uploadbutton", |
"#uploadpanel" |
], |
//clickable: "#uploadbutton" // Element that should be used as click trigger to select files. |
}).on("addedfile", (file) => { |
// Hookup the start button |
file.previewElement.querySelector(".start").onclick = () => { |
@@ -235,16 +237,15 @@ |
new Clipboard('#' + clipButtonID); |
}); |
|
if($('.panel-body').hasClass('fallback')) { |
document.querySelector("#actions .start").onclick = function() { |
myDropzone.enqueueFiles( |
myDropzone |
.getFilesWithStatus(Dropzone.ADDED)); |
}; |
document.querySelector("#actions .cancel").onclick = function() { |
myDropzone.removeAllFiles(true); |
}; |
} |
document.querySelector("#actions .start").onclick = () => { |
myDropzone.enqueueFiles( |
myDropzone |
.getFilesWithStatus(Dropzone.ADDED)); |
}; |
|
document.querySelector("#actions .cancel").onclick = () => { |
myDropzone.removeAllFiles(true); |
}; |
}); |
</script> |
</body> |