Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
3a5c218a
Commit
3a5c218a
authored
3 years ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Re-enable file-upload button
parent
b6181e19
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!36
merge f-boot-tour to dev
,
!28
FIX: Re-enable file-upload button
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
src/ext/js/fileupload.js
+28
-15
28 additions, 15 deletions
src/ext/js/fileupload.js
with
29 additions
and
15 deletions
CHANGELOG.md
+
1
−
0
View file @
3a5c218a
...
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
src/ext/js/fileupload.js
+
28
−
15
View file @
3a5c218a
...
...
@@ -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">×</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">×</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">×</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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment