diff --git a/docs/_config.yml b/docs/_config.yml index 21b1c6f..cfee706 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -36,8 +36,8 @@ masthead_title : "" # overrides the website title displayed in the mas breadcrumbs : # true, false (default) words_per_minute : 200 enable_copy_code_button : # true, false (default) -copyright : # "copyright" name, defaults to site.title -copyright_url : # "copyright" URL, defaults to site.url +copyright : "Epigraf Team"# "copyright" name, defaults to site.title +copyright_url : "https://epigraf.uni-muenster.de/pages/team"# "copyright" URL, defaults to site.url comments: provider : # false (default), "disqus", "discourse", "facebook", "staticman", "staticman_v2", "utterances", "giscus", "custom" disqus: @@ -72,7 +72,7 @@ reCaptcha: secret : atom_feed: path : # blank (default) uses feed.xml - hide : # true, false (default) + hide : true # true, false (default) search : # true, false (default) search_full_content : # true, false (default) search_provider : # lunr (default), algolia, google diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html new file mode 100644 index 0000000..a0b603b --- /dev/null +++ b/docs/_includes/footer.html @@ -0,0 +1,21 @@ + + + diff --git a/docs/assets/css/main.scss b/docs/assets/css/main.scss index 362098c..d8cd2e2 100644 --- a/docs/assets/css/main.scss +++ b/docs/assets/css/main.scss @@ -1,12 +1,21 @@ --- +# Only the main Sass file needs front matter (the dashes are enough) +search: false --- -@import "{{ site.theme }}"; +@charset "utf-8"; + +$h-size-1: 1.6em; +$h-size-2: 1.25em; +$h-size-3: 1.25em; +$h-size-4: 1.25em; +$h-size-5: 1.25em; +$h-size-6: 1.25em; + + +@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin +@import "minimal-mistakes"; // main partials body { font-size: 0.75em; } - -h1, h2, h3, h4, h5, h6 { - font-size: 1.25em; -} diff --git a/docs/credits.md b/docs/credits.md index 2200279..2ab10e3 100755 --- a/docs/credits.md +++ b/docs/credits.md @@ -25,33 +25,34 @@ collegues from Die Deutschen Inschriften and the Mainz Academy. Thanks to all of you who contribute to the Epigraf ecosystem. ## Third-party Components -Epigraf is developed using third-party software under open source licences. +Epigraf is developed using third-party software under open source licenses. - [Ace editor](https://ace.c9.io/), BSD License -- [CakePHP](https://cakephp.org/), MIT Licence +- [CakePHP](https://cakephp.org/), MIT License - [CKEditor](https://ckeditor.com/), GNU General Public License 2 or later - [Codeception](https://codeception.com/), MIT License - [dropzone.js](https://www.dropzone.dev/), MIT License - [ExifTool](https://exiftool.org/), GNU General Public License 1 or later - [Font Awesome](https://fontawesome.com/), SIL OFL 1.1 License -- [Jeykyll](https://jekyllrb.com/), MIT Licence -- [jQuery](https://jquery.com/), MIT Licence -- [jQueryUI](https://jqueryui.com/), MIT Licence -- [jsDoc](https://jsdoc.app/), Apache Licence, Version 2.0 +- [Jeykyll](https://jekyllrb.com/), MIT License +- [jQuery](https://jquery.com/), MIT License +- [jQueryUI](https://jqueryui.com/), MIT License +- [jsDoc](https://jsdoc.app/), Apache License, Version 2.0 - [Leaflet](https://leafletjs.com/), BSD 2-Clause "Simplified" License -- [Leaflet Marker Cluster](https://github.com/Leaflet/Leaflet.markercluster), MIT Licence -- [Leaflet Easy Button](https://github.com/CliffCloud/Leaflet.EasyButton), MIT Licence -- [Leaflet Gesture Handling](https://github.com/elmarquis/Leaflet.GestureHandling), MIT Licence -- [Leaflet Path Drag](https://github.com/w8r/Leaflet.Path.Drag), MIT Licence +- [Leaflet Marker Cluster](https://github.com/Leaflet/Leaflet.markercluster), MIT License +- [Leaflet Easy Button](https://github.com/CliffCloud/Leaflet.EasyButton), MIT License +- [Leaflet Gesture Handling](https://github.com/elmarquis/Leaflet.GestureHandling), MIT License +- [Leaflet Path Drag](https://github.com/w8r/Leaflet.Path.Drag), MIT License - [Lingui](https://lingui.dev/), MIT License - [mark.js](https://markjs.io/), MIT License +- [Minimal Mistakes](https://mmistakes.github.io/minimal-mistakes/), MIT License - [npm](https://npmjs.com/), Artistic License 2.0, -- [phpDocumentor](https://phpdoc.org/), MIT Licence +- [phpDocumentor](https://phpdoc.org/), MIT License - [PHPUnit](https://phpunit.de/index.html), BSD 3-Clause License -- [Plotly.js](https://github.com/plotly/plotly.js/), MIT Licence -- [Poedit](https://poedit.net/), MIT Licence +- [Plotly.js](https://github.com/plotly/plotly.js/), MIT License +- [Poedit](https://poedit.net/), MIT License - [Saxon parser](https://www.saxonica.com/), Mozilla Public License version 2.0 - [Source Sans 3](https://github.com/adobe-fonts/source-sans/), SIL OFL 1.1 License -- [Webpack](https://webpack.js.org/), MIT Licence +- [Webpack](https://webpack.js.org/), MIT License A big "Thank you!" to all those projects! diff --git a/docs/frontend/index.md b/docs/frontend/index.md index c843a2d..7ed7066 100644 --- a/docs/frontend/index.md +++ b/docs/frontend/index.md @@ -1,6 +1,7 @@ --- title: Frontend permalink: '/frontend/' +toc: false --- The frontend of Epigraf consists of HTML pages rendered by the CakePHP template system and styled with CSS. @@ -12,4 +13,4 @@ For interactive trees, tables and other widgets, Epigraf implements an own EpiWi Bundling JavaScript files, CSS files, language resources and images is done using Webpack. All bundles can be generated at once by calling `npm run build`. -![Edit with Epigraf](../assets/img/epigraf-editor.png) +![Epigraf Editor](../assets/img/epigraf-editor.png) diff --git a/docs/index.md b/docs/index.md index 9251cd2..ab64c4d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,13 +6,11 @@ # @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html GPL 2.0 # # To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults - title: Introduction permalink: / --- Epigraf is a research platform for collecting, annotating, linking and publishing multimodal text data. - The data model supports research databases ranging from epistolary editions to social media corpora. Epigraf is currently used primarily for editing epigraphic data - inscriptions in connection with the objects to which they are attached. It includes a publication system for various document formats such as Word or TEI, structured JSON, XML and CSV data, and triples in TTL, JSON-LD and RDF/XML. diff --git a/docs/tast/acceptance.md b/docs/tast/acceptance.md index 6103b98..b872557 100644 --- a/docs/tast/acceptance.md +++ b/docs/tast/acceptance.md @@ -1,6 +1,7 @@ --- title: Acceptance Tests permalink: '/tests/acceptance/' +toc: false --- Acceptance testing is primarily used to prevent unintended changes to the frontend. diff --git a/docs/tast/index.md b/docs/tast/index.md index ecb7fe7..7185fac 100644 --- a/docs/tast/index.md +++ b/docs/tast/index.md @@ -1,6 +1,7 @@ --- title: Tests permalink: '/tests/' +toc: false --- Throughout the development process, Epigraf code is tested in two ways: diff --git a/htdocs/js/jqueryui/LICENSE.txt b/htdocs/js/jqueryui/LICENSE.txt new file mode 100644 index 0000000..dd5e4cd --- /dev/null +++ b/htdocs/js/jqueryui/LICENSE.txt @@ -0,0 +1,34 @@ + +License + +Note: For the purposes of this document, the term "Project" will refer to any OpenJS Foundation project +using the MIT license AND referencing this document in the header of the distributed Project code or Project website source code. + +Source Code + +Projects referencing this document are released under the terms of the MIT license. + +The MIT License is simple and easy to understand and it places almost no restrictions on what you can do with the Project. + +You are free to use the Project in any other project (even commercial projects) as long as the copyright header is left intact. + +Sample Code + +All demos and examples, whether in a Project's repository or displayed on a Project site, +are released under the terms of the license as specified in the relevant repository. +Many Projects choose to release their sample code under the terms of CC0. + +CC0 is even more permissive than the MIT license, allowing you to use the code in any manner you want, +without any copyright headers, notices, or other attribution. + +Web Sites + +The content on a Project web site referencing this document in its header is released under the terms of the license +specified in the website's repository or if not specified, under the MIT license. + +The design, layout, and look-and-feel of a Project website is not licensed for use and may not be used on any site, +personal or commercial, without prior written consent from the OpenJS Foundation. + +For information regarding OpenJS Foundation trademarks, please see Trademark Policy and Trademark List. + +Source: https://jquery.com/license/ diff --git a/plugins/Epi/src/Model/Entity/Article.php b/plugins/Epi/src/Model/Entity/Article.php index c8e5b2f..0f5f9fc 100644 --- a/plugins/Epi/src/Model/Entity/Article.php +++ b/plugins/Epi/src/Model/Entity/Article.php @@ -1007,7 +1007,14 @@ public function addSection($sectionKey, $import = true) */ public function numberSections() { + $numbers = []; + foreach ($this->sections as $key => $section) { + $numbers[$section->parent_id ?? ''] = $numbers[$section->parent_id ?? ''] ?? []; + $currentNumber = ($numbers[$section->parent_id ?? ''][$section->sectiontype ?? ''] ?? 0) + 1; + $numbers[$section->parent_id ?? ''][$section->sectiontype ?? ''] = $currentNumber; + $section->number = $currentNumber; + $section->sortno = $key + 1; } } diff --git a/plugins/Epi/tests/Comparisons/SectionsControllerTest/testAdd.php.html b/plugins/Epi/tests/Comparisons/SectionsControllerTest/testAdd.php.html index 549ddd8..026c088 100644 --- a/plugins/Epi/tests/Comparisons/SectionsControllerTest/testAdd.php.html +++ b/plugins/Epi/tests/Comparisons/SectionsControllerTest/testAdd.php.html @@ -8,28 +8,28 @@ Band [projects] - + - + - + - + - + - + @@ -49,17 +49,17 @@
- + Logout
- +
- - - + + +
@@ -68,7 +68,7 @@
- +
@@ -76,25 +76,25 @@
- + - -
[]
?
Kapitel
Datenschlüssel
    + +
    []
    ?
    Kapitel
    Datenschlüssel
      - + - + - + diff --git a/plugins/Widgets/webroot/js/ace/LICENSE.txt b/plugins/Widgets/webroot/js/ace/LICENSE.txt new file mode 100644 index 0000000..e69de29 diff --git a/plugins/Widgets/webroot/js/leaflet/leaflet-path-drag/LICENSE.txt b/plugins/Widgets/webroot/js/leaflet/leaflet-path-drag/LICENSE.txt new file mode 100644 index 0000000..2904f5d --- /dev/null +++ b/plugins/Widgets/webroot/js/leaflet/leaflet-path-drag/LICENSE.txt @@ -0,0 +1,17 @@ +The MIT License (MIT) + +Copyright (c) 2015 Alexander Milevski + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE +AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/Widgets/webroot/js/leaflet/leaflet.LICENSE.txt b/plugins/Widgets/webroot/js/leaflet/leaflet.LICENSE.txt new file mode 100644 index 0000000..e08fe07 --- /dev/null +++ b/plugins/Widgets/webroot/js/leaflet/leaflet.LICENSE.txt @@ -0,0 +1,28 @@ +BSD 2-Clause License + +Copyright (c) 2010-2024, Volodymyr Agafonkin +Copyright (c) 2010-2011, CloudMade +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Source: https://github.com/Leaflet/Leaflet/blob/main/LICENSE diff --git a/plugins/Widgets/webroot/js/leaflet/leaflet.easy-button.LICENSE.txt b/plugins/Widgets/webroot/js/leaflet/leaflet.easy-button.LICENSE.txt new file mode 100644 index 0000000..e33db8e --- /dev/null +++ b/plugins/Widgets/webroot/js/leaflet/leaflet.easy-button.LICENSE.txt @@ -0,0 +1,18 @@ +Copyright (C) 2014 Daniel Montague + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Source: https://github.com/CliffCloud/Leaflet.EasyButton/blob/master/LICENSE diff --git a/plugins/Widgets/webroot/js/leaflet/leaflet.gesture-handling.LICENSE.txt b/plugins/Widgets/webroot/js/leaflet/leaflet.gesture-handling.LICENSE.txt new file mode 100644 index 0000000..45ce663 --- /dev/null +++ b/plugins/Widgets/webroot/js/leaflet/leaflet.gesture-handling.LICENSE.txt @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2018 elmarquis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Source: https://github.com/elmarquis/Leaflet.GestureHandling/blob/master/LICENSE diff --git a/plugins/Widgets/webroot/js/leaflet/leaflet.markercluster.LICENSE.txt b/plugins/Widgets/webroot/js/leaflet/leaflet.markercluster.LICENSE.txt new file mode 100644 index 0000000..3a73d46 --- /dev/null +++ b/plugins/Widgets/webroot/js/leaflet/leaflet.markercluster.LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012 David Leaver + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Source: https://github.com/Leaflet/Leaflet.markercluster/blob/master/MIT-LICENCE.txt diff --git a/plugins/Widgets/webroot/js/map.js b/plugins/Widgets/webroot/js/map.js index da10dd2..9ae80a9 100644 --- a/plugins/Widgets/webroot/js/map.js +++ b/plugins/Widgets/webroot/js/map.js @@ -212,7 +212,7 @@ export class EpiMap extends BaseWidget { this.geoLocButton.button.classList.remove('btn-geolocation-active'); this.geoLocButton.button.classList.add('btn-geolocation-inactive'); - new ResizeObserver(() => this.map.invalidateSize()).observe(this.mapElement); + this.listenResize(this.mapElement, () => this.map.invalidateSize()); } /** diff --git a/plugins/Widgets/webroot/js/paginator.js b/plugins/Widgets/webroot/js/paginator.js index 2086466..050dcb9 100644 --- a/plugins/Widgets/webroot/js/paginator.js +++ b/plugins/Widgets/webroot/js/paginator.js @@ -785,6 +785,10 @@ export class ScrollPaginator extends BaseWidget { return; } + if (!event.detail.data || !event.detail.data.row) { + return; + } + const rowValue = event.detail.data.row.split('-'); const rowTab = rowValue[0] || ''; const rowId = rowValue.slice(1).join('-'); diff --git a/plugins/Widgets/webroot/js/tables.js b/plugins/Widgets/webroot/js/tables.js index d6c5088..7758d28 100644 --- a/plugins/Widgets/webroot/js/tables.js +++ b/plugins/Widgets/webroot/js/tables.js @@ -230,40 +230,49 @@ export class TableWidget extends BaseWidget { * Expand last column */ expandLastColumn() { - const containerWidth = this.widgetElement.parentElement.clientWidth; - const containerDiff = containerWidth - this.widgetElement.offsetWidth; + if (this.isExpanding) { + return; + } + this.isExpanding = true; - const oldTableWidth = this.widgetElement.offsetWidth; - const lastCol = this.getLastVisibleColumn(); + try { + const containerWidth = this.widgetElement.parentElement.clientWidth; + const containerDiff = containerWidth - this.widgetElement.offsetWidth; - if (!lastCol) { - return false; - } + const oldTableWidth = this.widgetElement.offsetWidth; + const lastCol = this.getLastVisibleColumn(); - const oldColWidth = lastCol.clientWidth; - const colDiff = lastCol.dataset.targetWidth - oldColWidth; + if (!lastCol) { + return false; + } - if (lastCol.dataset.targetWidth === undefined) { - lastCol.dataset.targetWidth = oldColWidth; - } + const oldColWidth = lastCol.clientWidth; + const colDiff = lastCol.dataset.targetWidth - oldColWidth; - let newWidth = oldColWidth; + if (lastCol.dataset.targetWidth === undefined) { + lastCol.dataset.targetWidth = oldColWidth; + } - // Shrink - if ((containerDiff < 0) && (colDiff < 0)) { - newWidth = oldColWidth + Math.max(colDiff, containerDiff); - } - // Grow - else if (containerDiff > 0) { - newWidth = oldColWidth + containerDiff; - } + let newWidth = oldColWidth; - if (newWidth !== oldColWidth) { - lastCol.style.maxWidth = newWidth + 'px'; - lastCol.style.width = newWidth + 'px'; + // Shrink + if ((containerDiff < 0) && (colDiff < 0)) { + newWidth = oldColWidth + Math.max(colDiff, containerDiff); + } + // Grow + else if (containerDiff > 0) { + newWidth = oldColWidth + containerDiff; + } + + if (newWidth !== oldColWidth) { + lastCol.style.maxWidth = newWidth + 'px'; + lastCol.style.width = newWidth + 'px'; - const newTableWidth = oldTableWidth + (newWidth - oldColWidth); - this.widgetElement.style.width = newTableWidth + 'px'; + const newTableWidth = oldTableWidth + (newWidth - oldColWidth); + this.widgetElement.style.width = newTableWidth + 'px'; + } + } finally { + this.isExpanding = false; } } diff --git a/resources/locales/lingui.LICENSE.txt b/resources/locales/lingui.LICENSE.txt new file mode 100644 index 0000000..3c8511a --- /dev/null +++ b/resources/locales/lingui.LICENSE.txt @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017-2022 Tomáš Ehrlich, (c) 2022-2023 Crowdin. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Source: https://github.com/lingui/js-lingui/blob/main/LICENSE diff --git a/src/Console/Installer.php b/src/Console/Installer.php index 1823ae3..5a28ee7 100644 --- a/src/Console/Installer.php +++ b/src/Console/Installer.php @@ -44,7 +44,7 @@ public static function postInstall(Event $event) static::createWritableDirectories($rootDir, $io); static::buildWebPack($rootDir, $io); - static::copyJsFiles($rootDir, $io); + //static::copyJsFiles($rootDir, $io); static::createSymlinks($rootDir, $io); // ask if the permissions should be changed @@ -96,12 +96,14 @@ public static function postUpdate(Event $event) static::buildWebPack($rootDir, $io); static::createSymlinks($rootDir, $io); - static::copyJsFiles($rootDir, $io); + //static::copyJsFiles($rootDir, $io); } /** * Copy Javascript files * + * @deprecated Place files in the folder and commit them. + * * @param $rootDir * @param $io * @@ -112,9 +114,9 @@ public static function copyJsFiles($rootDir, $io) $files = [ $rootDir . '/vendor/components/jquery/jquery.min.js' => $rootDir . '/htdocs/js/jquery/jquery.min.js', $rootDir . '/vendor/enyo/dropzone/dist/dropzone.js' => $rootDir . '/plugins/Widgets/webroot/js/dropzone/dropzone.js', - $rootDir . '/vendor/enyo/dropzone/dist/dropzone.css' => $rootDir . '/plugins/Widgets/webroot/css/dropzone/dropzone.css' -// $rootDir . '/node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf' => $rootDir . '/htdocs/webfonts/fa-solid-900.ttf', -// $rootDir . '/node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2' => $rootDir . '/htdocs/webfonts/fa-solid-900.woff2' + $rootDir . '/vendor/enyo/dropzone/dist/dropzone.css' => $rootDir . '/plugins/Widgets/webroot/css/dropzone/dropzone.css', + $rootDir . '/node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf' => $rootDir . '/htdocs/webfonts/fa-solid-900.ttf', + $rootDir . '/node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2' => $rootDir . '/htdocs/webfonts/fa-solid-900.woff2' ]; foreach ($files as $from => $to) { diff --git a/tests/Codeception/_support/AcceptanceTester.php b/tests/Codeception/_support/AcceptanceTester.php index c9317b9..c1c0bab 100755 --- a/tests/Codeception/_support/AcceptanceTester.php +++ b/tests/Codeception/_support/AcceptanceTester.php @@ -169,20 +169,11 @@ public function focusXmlInput($selector, $cursor = false) $this->click($selector); $this->waitForElementVisible('.content-toolbar.active'); + $this->wait(0.25); if ($cursor) { $this->pressCtrlHome(); $this->wait(0.5); -// $this->executeJs(' -// let element = document.querySelector("' . addslashes($selector) . '"); -// let range = document.createRange(); -// let sel = window.getSelection(); -// range.setStart(element, 0); -// range.collapse(true); -// sel.removeAllRanges(); -// sel.addRange(range); -// element.focus(); -// '); } } diff --git a/tests/Codeception/acceptance/ArticlesCest.php b/tests/Codeception/acceptance/ArticlesCest.php index 38e9486..bd38a09 100644 --- a/tests/Codeception/acceptance/ArticlesCest.php +++ b/tests/Codeception/acceptance/ArticlesCest.php @@ -642,22 +642,27 @@ public function editAndCloseArticle(AcceptanceTester $I, \Snapshot\Articles $sna $contentSelector = '.doc-section-item[data-row-id="4"] .doc-fieldname-content .widget-xmleditor'; $I->focusXmlInput($contentSelector); + $I->wait(0.5); $I->pressKey( $contentSelector, ['ctrl', 'a'], WebDriverKeys::DELETE, 'Fancynewtext' ); + $I->wait(0.5); // Edit the title $contentSelector = '.doc-content input[name="name"]'; $I->click($contentSelector); + + $I->wait(0.5); $I->pressKey( $contentSelector, ['ctrl', 'a'], WebDriverKeys::DELETE, 'Fancynewtitle' ); + $I->wait(0.5); // Save and compare output $I->click('Save', 'nav.actions-bottom'); diff --git a/tests/Codeception/acceptance/PropertiesCest.php b/tests/Codeception/acceptance/PropertiesCest.php index 8895b0a..13768a5 100644 --- a/tests/Codeception/acceptance/PropertiesCest.php +++ b/tests/Codeception/acceptance/PropertiesCest.php @@ -214,6 +214,7 @@ public function addPropertyWithXmlField(AcceptanceTester $I) $I->scrollto($contentSelector); $I->focus($contentSelector); $I->click($contentSelector); + $I->wait(1); $I->pressKey($contentSelector, 'Mein Schild'); $I->wait(1); @@ -222,6 +223,7 @@ public function addPropertyWithXmlField(AcceptanceTester $I) $I->scrollto($contentSelector); $I->focus($contentSelector); $I->click($contentSelector); + $I->wait(1); $I->pressKey( $contentSelector, 'Some', @@ -236,6 +238,7 @@ public function addPropertyWithXmlField(AcceptanceTester $I) WebDriverKeys::ENTER, 'out of view.' ); + $I->wait(1); // Save new property $I->click("Save", '.ui-dialog-buttonset'); diff --git a/tests/Codeception/codeception.LICENSE.txt b/tests/Codeception/codeception.LICENSE.txt new file mode 100644 index 0000000..664325a --- /dev/null +++ b/tests/Codeception/codeception.LICENSE.txt @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2011 Michael Bodnarchuk and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Source: https://github.com/Codeception/Codeception/blob/main/LICENSE