Skip to content
Snippets Groups Projects
Commit 3a5c218a authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

FIX: Re-enable file-upload button

parent b6181e19
No related branches found
No related tags found
2 merge requests!36merge f-boot-tour to dev,!28FIX: Re-enable file-upload button
......@@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Displaying issues with long lists in property values
* An issue whereby a grey container would appear above the map when
changing the map view.
* #200 - Re-enabled the file-upload button
### Security (in case of vulnerabilities)
......
......@@ -25,18 +25,31 @@ var fileupload = new function() {
// TODO * action to config * upload-path id -> class * message configurable
// * style path input
const _modal_str = ` <div class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document"> <div
class="modal-content"> <div class="modal-header"> <button type="button"
class="btn-close" data-bs-dismiss="modal">&times;</button> <h4
class="modal-title">File Upload</h4> </div> <div class="modal-body"> <form
action="/Entity/" class="dropzone dz-clickable" > <label>path</label><input
id="upload-path" type="text" value="/"/> <div class="dz-message">
Drag'n'drop files to this area or click to upload. </div> </form> </div>
<div class="modal-footer"> <button type="button" class="btn btn-secondary
caosdb-f-file-upload-submit-button">Ok</button> <button type="button"
class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div> </div>
</div> </div>`;
const _modal_str = `
<div class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">File Upload</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal">
</button>
</div>
<div class="modal-body">
<form action="/Entity/" class="dropzone dz-clickable" >
<label>path</label>
<input id="upload-path" type="text" value="/"/>
<div class="dz-message">
Drag'n'drop files to this area or click to upload.
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary caosdb-f-file-upload-submit-button">Ok</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>`;
/** Create a dropzone.js form for the file upload.
*/
......@@ -122,7 +135,7 @@ var fileupload = new function() {
input.after(`<div class="alert alert-danger alert-dismissible"
role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert"
aria-label="Close"><span aria-hidden="true">&times;</span></button>
aria-label="Close"></button>
<strong>Error!</strong> You are not logged in!.</div>`);
} else {
globalError(event, error, xhr);
......@@ -188,7 +201,7 @@ var fileupload = new function() {
input.after(`<div class="alert alert-success alert-dismissible"
role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert"
aria-label="Close"><span aria-hidden="true">&times;</span></button>
aria-label="Close"></button>
<strong>Success!</strong>
The file <code class="caosdb-f-file-upload-file-name">` +
getEntityName(entity) + `</code> has been uploaded.</div>`);
......@@ -308,7 +321,7 @@ var fileupload = new function() {
error_handler,
atom_par);
var toggle_function = function() {
$(modal).modal()
$(modal).modal("toggle");
};
this.add_file_upload_button(edit_menu, button, toggle_function);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment