diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4eb7794a30093704914a4c645ad43b8537d04d0b..6817020fcabf4b7551e264709fc89cc487e4f0a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,18 +102,13 @@ build-testenv: # stage: deploy # Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages -pages: - tags: [ docker ] +pages_prepare: &pages_prepare + tags: [ cached-dind ] stage: deploy only: refs: - /^release-.*$/i - - master - variables: - # run pages only on gitlab.com - - $CI_SERVER_HOST == "gitlab.com" script: - # TODO is this a good location here? - npm install jsdoc - npm install jsdoc-sphinx - echo "Deploying" @@ -122,3 +117,8 @@ pages: artifacts: paths: - public +pages: + <<: *pages_prepare + only: + refs: + - main diff --git a/CHANGELOG.md b/CHANGELOG.md index 58063e36939287c205cd539df1b3fc8ff59dc8d3..6e328fa9b7d9622c34c231bd4bd6c29949c37557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +* #214 - Paging panel is hidden. * #156 - Edit mode for Safari 11 * #160 - Entity preview for Safari 11 * Several minor cosmetic flaws @@ -43,6 +44,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) diff --git a/src/core/js/ext_autocomplete.js b/src/core/js/ext_autocomplete.js index cd145ee9e29bf370fd44f035f26d477a9cc0d478..080fc37f7f98840073e178405922aa10fed25ed1 100644 --- a/src/core/js/ext_autocomplete.js +++ b/src/core/js/ext_autocomplete.js @@ -42,12 +42,47 @@ var ext_autocomplete = new function () { "WHICH", "WITH", "CREATED BY", + "CREATED BY ME", + "CREATED AT", "CREATED ON", + "CREATED IN", + "CREATED BEFORE", + "CREATED UNTIL", + "CREATED AFTER", + "CREATED SINCE", "SOMEONE", "STORED AT", "HAS A PROPERTY", "HAS BEEN", "ANY VERSION OF", + "FROM", + "INSERTED AT", + "INSERTED ON", + "INSERTED IN", + "INSERTED BY", + "INSERTED BY ME", + "INSERTED BEFORE", + "INSERTED UNTIL", + "INSERTED AFTER", + "INSERTED SINCE", + "UPDATED AT", + "UPDATED ON", + "UPDATED IN", + "UPDATED BY", + "UPDATED BY ME", + "UPDATED BEFORE", + "UPDATED UNTIL", + "UPDATED AFTER", + "UPDATED SINCE", + "SINCE", + "BEFORE", + "ON", + "IN", + "AFTER", + "UNTIL", + "AT", + "BY", + "BY ME", ]; this.version = "0.1"; @@ -158,4 +193,4 @@ $(document).ready(function () { if ("${BUILD_MODULE_EXT_AUTOCOMPLETE}" == "ENABLED") { caosdb_modules.register(ext_autocomplete); } -}); +}); \ No newline at end of file diff --git a/src/core/js/webcaosdb.js b/src/core/js/webcaosdb.js index f20277307320c1c1c5e08db9ba34efa2d539e3e3..221b8b5a12da92395efcc4e52bfec0d7d6561ce9 100644 --- a/src/core/js/webcaosdb.js +++ b/src/core/js/webcaosdb.js @@ -1287,7 +1287,10 @@ var paging = new function () { } this.init = function () { - paging.initPaging(window.location.href, document.body.getAttribute("data-response-count")); + var response_count = document.body.getAttribute("data-response-count"); + if (parseInt(response_count) >= 0) { + paging.initPaging(window.location.href, response_count); + } } }; diff --git a/src/doc/tutorials/edit_mode.rst b/src/doc/tutorials/edit_mode.rst index 01502f55d5d76959a17bf74c71632d0d902f625e..3e7d9ffb4472ab8ff0ec9a4539ab9ab11563ffd2 100644 --- a/src/doc/tutorials/edit_mode.rst +++ b/src/doc/tutorials/edit_mode.rst @@ -183,11 +183,3 @@ stored within ``/uploaded.by/<REALM>/<USER>/``. The same is true for properties with data type ``REFERENCE``, too. In that case, the Record of the file that is uploaded will be assigned the RecordType of value of the original reference property. - -.. warning:: - - Until `this bug - <https://gitlab.indiscale.com/caosdb/src/caosdb-webui/-/issues/200>`_ - has been fixed, the upload button is broken and does not open the - upload dialogue. - diff --git a/src/ext/js/fileupload.js b/src/ext/js/fileupload.js index 4e9f7cd02a4f3c5e63080f1e520c10a9328bfe22..31d86589286f1761f481cc9d9bb6a557a63cbce1 100644 --- a/src/ext/js/fileupload.js +++ b/src/ext/js/fileupload.js @@ -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);