Merge branch 'release/0.21.0'
This commit is contained in:
commit
c991d648c6
3
.babelrc
3
.babelrc
|
@ -6,5 +6,6 @@
|
|||
}
|
||||
],
|
||||
"@babel/react"
|
||||
]
|
||||
],
|
||||
"plugins": ["@babel/plugin-syntax-dynamic-import"]
|
||||
}
|
29
.eslintrc.js
29
.eslintrc.js
|
@ -2,29 +2,32 @@ module.exports = {
|
|||
extends: [
|
||||
// add more generic rulesets here, such as:
|
||||
'eslint:recommended',
|
||||
'plugin:vue/recommended'
|
||||
'plugin:vue/vue3-recommended'
|
||||
],
|
||||
parserOptions: {
|
||||
'ecmaVersion': 2018
|
||||
'ecmaVersion': 2020
|
||||
},
|
||||
rules: {
|
||||
// override/add rules settings here, such as:
|
||||
'vue/no-unused-vars': 'error',
|
||||
/* Override/add rules settings here, such as: */
|
||||
// Basic rules that we want to receive a warning instead of error
|
||||
'no-console': 'warn',
|
||||
'no-unused-vars': 'warn',
|
||||
'no-undef': 'warn',
|
||||
// Tainacan relies a lot in v-html and v-text, so we can't disable them
|
||||
'vue/no-v-html': 'off',
|
||||
'vue/html-indent': 'off',
|
||||
'vue/attributes-order': 'off',
|
||||
'vue/html-closing-bracket-spacing': 'off',
|
||||
'vue/no-v-text-v-html-on-component': 'off',
|
||||
// Formating that is hard to disable as would require significant refactoring. Autofix don't solve it well and it reflects stylistic decisions from the team.
|
||||
'vue/html-indent': [
|
||||
'warn', 4, {
|
||||
'attribute': 2,
|
||||
'closeBracket': 1
|
||||
}
|
||||
],
|
||||
'vue/html-closing-bracket-newline': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off', // Should we? It's a stylistic decision.
|
||||
// These have impact on how some props that are passed and we have mixed types, such as collectionId as a string or number... would require careful refactoring.
|
||||
'vue/require-prop-type-constructor': 'off',
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/prop-name-casing': 'off',
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/no-v-text-v-html-on-component': 'off'
|
||||
'vue/require-default-prop': 'off'
|
||||
},
|
||||
globals: {
|
||||
'wp': true,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# to run localy ./bin/act -j test
|
||||
name: Tainacan tests
|
||||
|
||||
on:
|
||||
|
@ -23,7 +24,7 @@ jobs:
|
|||
matrix:
|
||||
# Notes regarding supported versions in WP:
|
||||
# The base matrix only contains the PHP versions which are supported on all supported WP versions.
|
||||
php: ['7.0', '7.3', '7.4']
|
||||
php: ['7.4', '8.3']
|
||||
wp: ['latest', '5.9']
|
||||
experimental: [false]
|
||||
|
||||
|
@ -50,7 +51,7 @@ jobs:
|
|||
# in combination with PHP < 7.4 is not properly/sufficiently supported
|
||||
# within WP Core.
|
||||
# See: https://core.trac.wordpress.org/ticket/52496
|
||||
image: mysql:${{ ( matrix.wp == 5.3 && '5.6' ) || ( (matrix.wp < 5.9 || matrix.php < 7.4) && '5.7' ) || '8.0' }}
|
||||
image: mysql:8.0
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||
ports:
|
||||
|
@ -72,6 +73,9 @@ jobs:
|
|||
- name: Check PHP Version
|
||||
run: php -v
|
||||
|
||||
- name: install tools deps
|
||||
run: sudo apt install mariadb-client -y
|
||||
|
||||
- name: Add bootstrap-config
|
||||
run: |
|
||||
mv ./tests/bootstrap-config-sample.php ./tests/bootstrap-config.php
|
||||
|
@ -90,29 +94,18 @@ jobs:
|
|||
- name: Determine supported PHPUnit version
|
||||
id: set_phpunit
|
||||
run: |
|
||||
if [[ "${{ matrix.php }}" = "8.0" ]]; then
|
||||
wget https://phar.phpunit.de/phpunit-9.3.0.phar -P /tmp
|
||||
chmod +x /tmp/phpunit-9.3.0.phar
|
||||
mv /tmp/phpunit-9.3.0.phar /usr/local/bin/phpunit
|
||||
elif [[ "${{ matrix.php }}" > "6.0" ]]; then
|
||||
if [[ "${{ matrix.php }}" > "8.0" ]]; then
|
||||
wget https://phar.phpunit.de/phpunit-9.6.16.phar -P /tmp
|
||||
chmod +x /tmp/phpunit-9.6.16.phar
|
||||
mv /tmp/phpunit-9.6.16.phar /usr/local/bin/phpunit
|
||||
else
|
||||
wget https://phar.phpunit.de/phpunit-6.5.7.phar -P /tmp
|
||||
chmod +x /tmp/phpunit-6.5.7.phar
|
||||
mv /tmp/phpunit-6.5.7.phar /usr/local/bin/phpunit
|
||||
else
|
||||
wget https://phar.phpunit.de/phpunit-5.phar -P /tmp
|
||||
chmod +x /tmp/phpunit-5.phar
|
||||
mv /tmp/phpunit-5.phar /usr/local/bin/phpunit
|
||||
fi
|
||||
|
||||
# Install dependencies and handle caching in one go.
|
||||
# @link https://github.com/marketplace/actions/install-composer-dependencies
|
||||
- name: Install Composer dependencies for PHP < 7.3
|
||||
if: ${{ matrix.php < 7.3 }}
|
||||
uses: "ramsey/composer-install@v1"
|
||||
with:
|
||||
composer-options: --ignore-platform-reqs
|
||||
dependency-versions: "lowest"
|
||||
|
||||
- name: Install Composer dependencies for PHP < 8.0
|
||||
if: ${{ matrix.php >= 7.3 && matrix.php < 8.0 }}
|
||||
uses: "ramsey/composer-install@v1"
|
||||
|
|
|
@ -61,7 +61,7 @@ Please refer to our [Developers Documentation](https://tainacan.github.io/tainac
|
|||
|
||||
Tainacan is a free, open-source software licensed under **GPLv3**. Contributions to the codebase will abide to the same license; other contributions may be under additional or other terms.
|
||||
|
||||
To contribute to our project, you can report bugs and other issues, or suggest new features. You are also free to submit pull requests or translate Tainacan to multiple languages. If you are interested in contributing, you can get started by reading our [contribution guidelines](docs/CONTRIBUTING.md).
|
||||
To contribute to our project, you can report bugs and other issues, or suggest new features. You are also free to submit pull requests or translate Tainacan to multiple languages. If you are interested in contributing, you can get started by reading our [contribution guidelines](https://tainacan.github.io/tainacan-wiki/#/dev/CONTRIBUTING).
|
||||
|
||||
### Acknowledgements
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
94
package.json
94
package.json
|
@ -8,64 +8,66 @@
|
|||
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
||||
},
|
||||
"dependencies": {
|
||||
"apexcharts": "^3.40.0",
|
||||
"axios": "^1.4.0",
|
||||
"@ntohq/buefy-next": "^0.1.3",
|
||||
"@vue-leaflet/vue-leaflet": "^0.10.1",
|
||||
"another-vue3-blurhash": "^0.0.1",
|
||||
"apexcharts": "^3.48.0",
|
||||
"axios": "^1.6.8",
|
||||
"blurhash": "^2.0.5",
|
||||
"buefy": "^0.9.23",
|
||||
"bulma": "^0.9.4",
|
||||
"conditioner-core": "^2.3.3",
|
||||
"countup.js": "^2.6.2",
|
||||
"css-vars-ponyfill": "^2.4.8",
|
||||
"floating-vue": "^1.0.0-beta.19",
|
||||
"countup.js": "^2.8.0",
|
||||
"css-vars-ponyfill": "^2.4.9",
|
||||
"floating-vue": "5.2.2",
|
||||
"leaflet": "^1.9.4",
|
||||
"leaflet-active-area": "^1.2.1",
|
||||
"masonry-layout": "^4.2.2",
|
||||
"moment": "^2.29.4",
|
||||
"node-sass": "^7.0.3",
|
||||
"photoswipe": "^5.3.7",
|
||||
"qs": "^6.11.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"swiper": "^8.4.7",
|
||||
"vue": "^2.6.14",
|
||||
"vue-apexcharts": "^1.6.2",
|
||||
"vue-blurhash": "^0.1.4",
|
||||
"vue-countup-v2": "^4.0.0",
|
||||
"vue-imask": "^7.1.3",
|
||||
"vue-router": "^3.6.5",
|
||||
"vue-the-mask": "^0.11.1",
|
||||
"vue2-leaflet": "^2.7.1",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuex": "^3.6.2"
|
||||
"mitt": "^3.0.1",
|
||||
"moment": "^2.30.1",
|
||||
"node-sass": "^8.0.0",
|
||||
"photoswipe": "^5.4.3",
|
||||
"qs": "^6.12.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"sortablejs": "^1.15.2",
|
||||
"sortablejs-vue3": "^1.2.11",
|
||||
"swiper": "^11.1.0",
|
||||
"vue": "^3.4.21",
|
||||
"vue-countup-v3": "^1.4.1",
|
||||
"vue-imask": "^7.5.0",
|
||||
"vue-router": "^4.3.0",
|
||||
"vue3-apexcharts": "^1.5.2",
|
||||
"vuex": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.0",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@types/leaflet": "^1.9.1",
|
||||
"@types/masonry-layout": "^4.2.5",
|
||||
"acorn": "^8.8.2",
|
||||
"ajv": "^7.2.4",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"@babel/core": "^7.24.3",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/preset-env": "^7.24.3",
|
||||
"@babel/preset-react": "^7.24.1",
|
||||
"@types/leaflet": "^1.9.8",
|
||||
"@types/masonry-layout": "^4.2.7",
|
||||
"@vue/compiler-sfc": "3.4.21",
|
||||
"acorn": "^8.11.3",
|
||||
"ajv": "^8.12.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"babel-loader": "^9.1.3",
|
||||
"circular-dependency-plugin": "5.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^6.7.3",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-plugin-vue": "^9.9.0",
|
||||
"eslint-webpack-plugin": "^4.0.0",
|
||||
"css-loader": "^6.10.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-vue": "^9.24.0",
|
||||
"eslint-webpack-plugin": "^4.1.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"moment-locales-webpack-plugin": "^1.2.0",
|
||||
"postcss-loader": "7.0.2",
|
||||
"sass-loader": "^13.2.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"terser-webpack-plugin": "5.3.7",
|
||||
"vue-loader": "^15.10.1",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"webpack": "^5.76.0",
|
||||
"webpack-bundle-analyzer": "^4.8.0",
|
||||
"webpack-cli": "^5.0.1",
|
||||
"webpack-dev-server": "^4.11.1",
|
||||
"webpack-merge": "^5.8.0"
|
||||
"postcss-loader": "8.1.1",
|
||||
"sass-loader": "^13.3.2",
|
||||
"style-loader": "^3.3.4",
|
||||
"terser-webpack-plugin": "5.3.10",
|
||||
"vue-loader": "^17.4.2",
|
||||
"webpack": "^5.91.0",
|
||||
"webpack-bundle-analyzer": "^4.10.1",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^4.15.1",
|
||||
"webpack-merge": "^5.10.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/**
|
||||
* Swiper 8.4.7
|
||||
* Swiper 11.1.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
* Copyright 2014-2023 Vladimir Kharlampidi
|
||||
* Copyright 2014-2024 Vladimir Kharlampidi
|
||||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: January 30, 2023
|
||||
* Released on: April 9, 2024
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'swiper-icons';
|
||||
|
@ -15,7 +15,18 @@
|
|||
font-weight: 400;
|
||||
font-style: normal; }
|
||||
:root {
|
||||
--swiper-theme-color: #007aff; }
|
||||
--swiper-theme-color: #007aff;
|
||||
/*
|
||||
--swiper-preloader-color: var(--swiper-theme-color);
|
||||
--swiper-wrapper-transition-timing-function: initial;
|
||||
*/ }
|
||||
:host {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
z-index: 1; }
|
||||
|
||||
.swiper {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
@ -24,7 +35,8 @@
|
|||
list-style: none;
|
||||
padding: 0;
|
||||
/* Fix of Webkit flickering */
|
||||
z-index: 1; }
|
||||
z-index: 1;
|
||||
display: block; }
|
||||
|
||||
.swiper-vertical > .swiper-wrapper {
|
||||
flex-direction: column; }
|
||||
|
@ -36,15 +48,18 @@
|
|||
z-index: 1;
|
||||
display: flex;
|
||||
transition-property: transform;
|
||||
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
||||
box-sizing: content-box; }
|
||||
|
||||
.swiper-android .swiper-slide,
|
||||
.swiper-ios .swiper-slide,
|
||||
.swiper-wrapper {
|
||||
transform: translate3d(0px, 0, 0); }
|
||||
|
||||
.swiper-pointer-events {
|
||||
.swiper-horizontal {
|
||||
touch-action: pan-y; }
|
||||
.swiper-pointer-events.swiper-vertical {
|
||||
|
||||
.swiper-vertical {
|
||||
touch-action: pan-x; }
|
||||
|
||||
.swiper-slide {
|
||||
|
@ -52,7 +67,8 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
transition-property: transform; }
|
||||
transition-property: transform;
|
||||
display: block; }
|
||||
|
||||
.swiper-slide-invisible-blank {
|
||||
visibility: hidden; }
|
||||
|
@ -61,6 +77,7 @@
|
|||
.swiper-autoheight,
|
||||
.swiper-autoheight .swiper-slide {
|
||||
height: auto; }
|
||||
|
||||
.swiper-autoheight .swiper-wrapper {
|
||||
align-items: flex-start;
|
||||
transition-property: transform, height; }
|
||||
|
@ -70,17 +87,64 @@
|
|||
backface-visibility: hidden; }
|
||||
|
||||
/* 3D Effects */
|
||||
.swiper-3d, .swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
.swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
perspective: 1200px; }
|
||||
|
||||
.swiper-3d .swiper-wrapper {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
.swiper-3d {
|
||||
perspective: 1200px; }
|
||||
.swiper-3d .swiper-wrapper,
|
||||
.swiper-3d .swiper-slide,
|
||||
.swiper-3d .swiper-cube-shadow {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
/* CSS Mode */
|
||||
.swiper-css-mode > .swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
/* For Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* For Internet Explorer and Edge */ }
|
||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: start start; }
|
||||
.swiper-css-mode.swiper-horizontal > .swiper-wrapper {
|
||||
scroll-snap-type: x mandatory; }
|
||||
.swiper-css-mode.swiper-vertical > .swiper-wrapper {
|
||||
scroll-snap-type: y mandatory; }
|
||||
.swiper-css-mode.swiper-free-mode > .swiper-wrapper {
|
||||
scroll-snap-type: none; }
|
||||
.swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: none; }
|
||||
.swiper-css-mode.swiper-centered > .swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999; }
|
||||
.swiper-css-mode.swiper-centered > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: center center;
|
||||
scroll-snap-stop: always; }
|
||||
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-inline-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
width: var(--swiper-centered-offset-after); }
|
||||
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-block-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
||||
width: 100%;
|
||||
min-width: 1px;
|
||||
height: var(--swiper-centered-offset-after); }
|
||||
|
||||
/* Slide styles start */
|
||||
/* 3D Shadows */
|
||||
.swiper-3d .swiper-slide-shadow,
|
||||
.swiper-3d .swiper-slide-shadow-left,
|
||||
.swiper-3d .swiper-slide-shadow-right,
|
||||
.swiper-3d .swiper-slide-shadow-top,
|
||||
.swiper-3d .swiper-slide-shadow-bottom,
|
||||
.swiper-3d .swiper-cube-shadow {
|
||||
transform-style: preserve-3d; }
|
||||
.swiper-3d .swiper-slide-shadow,
|
||||
.swiper-3d .swiper-slide-shadow-left,
|
||||
.swiper-3d .swiper-slide-shadow-right,
|
||||
|
@ -104,50 +168,47 @@
|
|||
.swiper-3d .swiper-slide-shadow-bottom {
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
||||
|
||||
/* CSS Mode */
|
||||
.swiper-css-mode > .swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
/* For Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* For Internet Explorer and Edge */ }
|
||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: start start; }
|
||||
.swiper-lazy-preloader {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -21px;
|
||||
margin-top: -21px;
|
||||
z-index: 10;
|
||||
transform-origin: 50%;
|
||||
box-sizing: border-box;
|
||||
border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
|
||||
border-radius: 50%;
|
||||
border-top-color: transparent; }
|
||||
|
||||
.swiper-horizontal.swiper-css-mode > .swiper-wrapper {
|
||||
scroll-snap-type: x mandatory; }
|
||||
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
|
||||
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
|
||||
animation: swiper-preloader-spin 1s infinite linear; }
|
||||
|
||||
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
||||
scroll-snap-type: y mandatory; }
|
||||
.swiper-lazy-preloader-white {
|
||||
--swiper-preloader-color: #fff; }
|
||||
|
||||
.swiper-centered > .swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999; }
|
||||
.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-inline-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
||||
height: 100%;
|
||||
width: var(--swiper-centered-offset-after); }
|
||||
.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-block-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
||||
width: 100%;
|
||||
height: var(--swiper-centered-offset-after); }
|
||||
.swiper-centered > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: center center;
|
||||
scroll-snap-stop: always; }
|
||||
.swiper-lazy-preloader-black {
|
||||
--swiper-preloader-color: #000; }
|
||||
|
||||
@keyframes swiper-preloader-spin {
|
||||
0% {
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
transform: rotate(360deg); } }
|
||||
/* Slide styles end */
|
||||
:root {
|
||||
--swiper-navigation-size: 44px;
|
||||
/*
|
||||
--swiper-navigation-top-offset: 50%;
|
||||
--swiper-navigation-sides-offset: 10px;
|
||||
--swiper-navigation-color: var(--swiper-theme-color);
|
||||
*/ }
|
||||
.swiper-button-prev, .swiper-button-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
top: var(--swiper-navigation-top-offset, 50%);
|
||||
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
||||
height: var(--swiper-navigation-size);
|
||||
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
||||
|
@ -170,7 +231,30 @@
|
|||
.swiper-navigation-disabled .swiper-button-prev,
|
||||
.swiper-navigation-disabled .swiper-button-next {
|
||||
display: none !important; }
|
||||
.swiper-button-prev:after, .swiper-button-next:after {
|
||||
.swiper-button-prev svg, .swiper-button-next svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
transform-origin: center; }
|
||||
.swiper-rtl .swiper-button-prev svg, .swiper-rtl .swiper-button-next svg {
|
||||
transform: rotate(180deg); }
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-rtl .swiper-button-next {
|
||||
left: var(--swiper-navigation-sides-offset, 10px);
|
||||
right: auto; }
|
||||
|
||||
.swiper-button-next,
|
||||
.swiper-rtl .swiper-button-prev {
|
||||
right: var(--swiper-navigation-sides-offset, 10px);
|
||||
left: auto; }
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none; }
|
||||
|
||||
/* Navigation font start */
|
||||
.swiper-button-prev:after,
|
||||
.swiper-button-next:after {
|
||||
font-family: swiper-icons;
|
||||
font-size: var(--swiper-navigation-size);
|
||||
text-transform: none !important;
|
||||
|
@ -178,25 +262,19 @@
|
|||
font-variant: initial;
|
||||
line-height: 1; }
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-rtl .swiper-button-next {
|
||||
left: 10px;
|
||||
right: auto; }
|
||||
.swiper-button-prev:after,
|
||||
.swiper-rtl .swiper-button-next:after {
|
||||
content: 'prev'; }
|
||||
|
||||
.swiper-button-next,
|
||||
.swiper-rtl .swiper-button-prev {
|
||||
right: 10px;
|
||||
right: var(--swiper-navigation-sides-offset, 10px);
|
||||
left: auto; }
|
||||
.swiper-button-next:after,
|
||||
.swiper-rtl .swiper-button-prev:after {
|
||||
content: 'next'; }
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none; }
|
||||
|
||||
/* Navigation font end */
|
||||
/* a11y */
|
||||
.swiper .swiper-notification {
|
||||
position: absolute;
|
||||
|
@ -339,7 +417,8 @@
|
|||
display: block;
|
||||
line-height: 1.2em;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper a > img {
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper a > img,
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper a > canvas {
|
||||
width: 100%;
|
||||
height: auto; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper a,
|
||||
|
@ -347,7 +426,8 @@
|
|||
color: inherit;
|
||||
text-decoration: none;
|
||||
display: block; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide-duplicate img {
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide-duplicate img,
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide-duplicate canvas {
|
||||
display: initial !important; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid a {
|
||||
width: 100%;
|
||||
|
@ -370,17 +450,17 @@
|
|||
-ms-grid-row: 1;
|
||||
-ms-grid-row-span: 2;
|
||||
grid-column: 1/3;
|
||||
grid-row: 1/3;
|
||||
padding-bottom: 100% !important; }
|
||||
grid-row: 1/3; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid .collection-items-grid > * {
|
||||
flex-basis: 50%;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 100% !important; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid .collection-items-grid img {
|
||||
margin-bottom: 0px; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid .collection-items-grid img,
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid .collection-items-grid canvas {
|
||||
object-fit: cover;
|
||||
object-position: center; }
|
||||
object-position: center;
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-carousel-collections-list .preview-warning {
|
||||
width: 100%;
|
||||
font-size: 0.875rem;
|
||||
|
@ -488,7 +568,8 @@
|
|||
display: block;
|
||||
line-height: 1.2em;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item img {
|
||||
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item img,
|
||||
.wp-block-tainacan-carousel-collections-list ul.collections-list-edit li.collection-list-item canvas {
|
||||
height: auto;
|
||||
padding: 0px;
|
||||
margin-bottom: 0.5em;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/**
|
||||
* Swiper 8.4.7
|
||||
* Swiper 11.1.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
* Copyright 2014-2023 Vladimir Kharlampidi
|
||||
* Copyright 2014-2024 Vladimir Kharlampidi
|
||||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: January 30, 2023
|
||||
* Released on: April 9, 2024
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'swiper-icons';
|
||||
|
@ -15,7 +15,18 @@
|
|||
font-weight: 400;
|
||||
font-style: normal; }
|
||||
:root {
|
||||
--swiper-theme-color: #007aff; }
|
||||
--swiper-theme-color: #007aff;
|
||||
/*
|
||||
--swiper-preloader-color: var(--swiper-theme-color);
|
||||
--swiper-wrapper-transition-timing-function: initial;
|
||||
*/ }
|
||||
:host {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
z-index: 1; }
|
||||
|
||||
.swiper {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
@ -24,7 +35,8 @@
|
|||
list-style: none;
|
||||
padding: 0;
|
||||
/* Fix of Webkit flickering */
|
||||
z-index: 1; }
|
||||
z-index: 1;
|
||||
display: block; }
|
||||
|
||||
.swiper-vertical > .swiper-wrapper {
|
||||
flex-direction: column; }
|
||||
|
@ -36,15 +48,18 @@
|
|||
z-index: 1;
|
||||
display: flex;
|
||||
transition-property: transform;
|
||||
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
||||
box-sizing: content-box; }
|
||||
|
||||
.swiper-android .swiper-slide,
|
||||
.swiper-ios .swiper-slide,
|
||||
.swiper-wrapper {
|
||||
transform: translate3d(0px, 0, 0); }
|
||||
|
||||
.swiper-pointer-events {
|
||||
.swiper-horizontal {
|
||||
touch-action: pan-y; }
|
||||
.swiper-pointer-events.swiper-vertical {
|
||||
|
||||
.swiper-vertical {
|
||||
touch-action: pan-x; }
|
||||
|
||||
.swiper-slide {
|
||||
|
@ -52,7 +67,8 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
transition-property: transform; }
|
||||
transition-property: transform;
|
||||
display: block; }
|
||||
|
||||
.swiper-slide-invisible-blank {
|
||||
visibility: hidden; }
|
||||
|
@ -61,6 +77,7 @@
|
|||
.swiper-autoheight,
|
||||
.swiper-autoheight .swiper-slide {
|
||||
height: auto; }
|
||||
|
||||
.swiper-autoheight .swiper-wrapper {
|
||||
align-items: flex-start;
|
||||
transition-property: transform, height; }
|
||||
|
@ -70,17 +87,64 @@
|
|||
backface-visibility: hidden; }
|
||||
|
||||
/* 3D Effects */
|
||||
.swiper-3d, .swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
.swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
perspective: 1200px; }
|
||||
|
||||
.swiper-3d .swiper-wrapper {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
.swiper-3d {
|
||||
perspective: 1200px; }
|
||||
.swiper-3d .swiper-wrapper,
|
||||
.swiper-3d .swiper-slide,
|
||||
.swiper-3d .swiper-cube-shadow {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
/* CSS Mode */
|
||||
.swiper-css-mode > .swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
/* For Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* For Internet Explorer and Edge */ }
|
||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: start start; }
|
||||
.swiper-css-mode.swiper-horizontal > .swiper-wrapper {
|
||||
scroll-snap-type: x mandatory; }
|
||||
.swiper-css-mode.swiper-vertical > .swiper-wrapper {
|
||||
scroll-snap-type: y mandatory; }
|
||||
.swiper-css-mode.swiper-free-mode > .swiper-wrapper {
|
||||
scroll-snap-type: none; }
|
||||
.swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: none; }
|
||||
.swiper-css-mode.swiper-centered > .swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999; }
|
||||
.swiper-css-mode.swiper-centered > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: center center;
|
||||
scroll-snap-stop: always; }
|
||||
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-inline-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
width: var(--swiper-centered-offset-after); }
|
||||
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-block-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
||||
width: 100%;
|
||||
min-width: 1px;
|
||||
height: var(--swiper-centered-offset-after); }
|
||||
|
||||
/* Slide styles start */
|
||||
/* 3D Shadows */
|
||||
.swiper-3d .swiper-slide-shadow,
|
||||
.swiper-3d .swiper-slide-shadow-left,
|
||||
.swiper-3d .swiper-slide-shadow-right,
|
||||
.swiper-3d .swiper-slide-shadow-top,
|
||||
.swiper-3d .swiper-slide-shadow-bottom,
|
||||
.swiper-3d .swiper-cube-shadow {
|
||||
transform-style: preserve-3d; }
|
||||
.swiper-3d .swiper-slide-shadow,
|
||||
.swiper-3d .swiper-slide-shadow-left,
|
||||
.swiper-3d .swiper-slide-shadow-right,
|
||||
|
@ -104,50 +168,47 @@
|
|||
.swiper-3d .swiper-slide-shadow-bottom {
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
||||
|
||||
/* CSS Mode */
|
||||
.swiper-css-mode > .swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
/* For Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* For Internet Explorer and Edge */ }
|
||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: start start; }
|
||||
.swiper-lazy-preloader {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -21px;
|
||||
margin-top: -21px;
|
||||
z-index: 10;
|
||||
transform-origin: 50%;
|
||||
box-sizing: border-box;
|
||||
border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
|
||||
border-radius: 50%;
|
||||
border-top-color: transparent; }
|
||||
|
||||
.swiper-horizontal.swiper-css-mode > .swiper-wrapper {
|
||||
scroll-snap-type: x mandatory; }
|
||||
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
|
||||
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
|
||||
animation: swiper-preloader-spin 1s infinite linear; }
|
||||
|
||||
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
||||
scroll-snap-type: y mandatory; }
|
||||
.swiper-lazy-preloader-white {
|
||||
--swiper-preloader-color: #fff; }
|
||||
|
||||
.swiper-centered > .swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999; }
|
||||
.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-inline-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
||||
height: 100%;
|
||||
width: var(--swiper-centered-offset-after); }
|
||||
.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-block-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
||||
width: 100%;
|
||||
height: var(--swiper-centered-offset-after); }
|
||||
.swiper-centered > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: center center;
|
||||
scroll-snap-stop: always; }
|
||||
.swiper-lazy-preloader-black {
|
||||
--swiper-preloader-color: #000; }
|
||||
|
||||
@keyframes swiper-preloader-spin {
|
||||
0% {
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
transform: rotate(360deg); } }
|
||||
/* Slide styles end */
|
||||
:root {
|
||||
--swiper-navigation-size: 44px;
|
||||
/*
|
||||
--swiper-navigation-top-offset: 50%;
|
||||
--swiper-navigation-sides-offset: 10px;
|
||||
--swiper-navigation-color: var(--swiper-theme-color);
|
||||
*/ }
|
||||
.swiper-button-prev, .swiper-button-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
top: var(--swiper-navigation-top-offset, 50%);
|
||||
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
||||
height: var(--swiper-navigation-size);
|
||||
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
||||
|
@ -170,7 +231,30 @@
|
|||
.swiper-navigation-disabled .swiper-button-prev,
|
||||
.swiper-navigation-disabled .swiper-button-next {
|
||||
display: none !important; }
|
||||
.swiper-button-prev:after, .swiper-button-next:after {
|
||||
.swiper-button-prev svg, .swiper-button-next svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
transform-origin: center; }
|
||||
.swiper-rtl .swiper-button-prev svg, .swiper-rtl .swiper-button-next svg {
|
||||
transform: rotate(180deg); }
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-rtl .swiper-button-next {
|
||||
left: var(--swiper-navigation-sides-offset, 10px);
|
||||
right: auto; }
|
||||
|
||||
.swiper-button-next,
|
||||
.swiper-rtl .swiper-button-prev {
|
||||
right: var(--swiper-navigation-sides-offset, 10px);
|
||||
left: auto; }
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none; }
|
||||
|
||||
/* Navigation font start */
|
||||
.swiper-button-prev:after,
|
||||
.swiper-button-next:after {
|
||||
font-family: swiper-icons;
|
||||
font-size: var(--swiper-navigation-size);
|
||||
text-transform: none !important;
|
||||
|
@ -178,25 +262,19 @@
|
|||
font-variant: initial;
|
||||
line-height: 1; }
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-rtl .swiper-button-next {
|
||||
left: 10px;
|
||||
right: auto; }
|
||||
.swiper-button-prev:after,
|
||||
.swiper-rtl .swiper-button-next:after {
|
||||
content: 'prev'; }
|
||||
|
||||
.swiper-button-next,
|
||||
.swiper-rtl .swiper-button-prev {
|
||||
right: 10px;
|
||||
right: var(--swiper-navigation-sides-offset, 10px);
|
||||
left: auto; }
|
||||
.swiper-button-next:after,
|
||||
.swiper-rtl .swiper-button-prev:after {
|
||||
content: 'next'; }
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none; }
|
||||
|
||||
/* Navigation font end */
|
||||
/* a11y */
|
||||
.swiper .swiper-notification {
|
||||
position: absolute;
|
||||
|
@ -346,7 +424,8 @@
|
|||
display: block;
|
||||
line-height: 1.2em;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper a > img {
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper a > img,
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper canvas {
|
||||
width: 100%;
|
||||
height: auto; }
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper a,
|
||||
|
@ -354,11 +433,11 @@
|
|||
color: inherit;
|
||||
text-decoration: none;
|
||||
display: block; }
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper .is-forced-square > a > div {
|
||||
padding-bottom: 100% !important; }
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper .is-forced-square > a > div img {
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper .is-forced-square > a > div img,
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper .is-forced-square > a > div canvas {
|
||||
object-fit: cover;
|
||||
object-position: center; }
|
||||
object-position: center;
|
||||
height: auto; }
|
||||
.wp-block-tainacan-carousel-items-list .preview-warning {
|
||||
width: 100%;
|
||||
font-size: 0.875rem;
|
||||
|
@ -463,7 +542,8 @@
|
|||
display: block;
|
||||
line-height: 1.2em;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item img {
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item img,
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item canvas {
|
||||
height: auto;
|
||||
display: block;
|
||||
padding: 0px;
|
||||
|
@ -474,7 +554,8 @@
|
|||
content: '';
|
||||
width: 100%;
|
||||
position: relative; }
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.is-forced-square img {
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.is-forced-square img,
|
||||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.is-forced-square canvas {
|
||||
display: block;
|
||||
padding: 0px;
|
||||
margin-bottom: 0.5em;
|
||||
|
@ -655,7 +736,8 @@
|
|||
.wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-6, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-5, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-4, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-3, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-2, .wp-block-tainacan-carousel-items-list ul.items-list-edit li.item-list-item.max-items-per-screen-1 {
|
||||
width: calc(100% - var(--spaceBetweenItems, 32px) );
|
||||
min-width: calc(100% - var(--spaceBetweenItems, 32px) ); } }
|
||||
.wp-block-tainacan-carousel-items-list .swiper-slide-duplicate img {
|
||||
.wp-block-tainacan-carousel-items-list .swiper-slide-duplicate img,
|
||||
.wp-block-tainacan-carousel-items-list .swiper-slide-duplicate canvas {
|
||||
display: initial !important; }
|
||||
|
||||
.block-editor-block-list__block > .wp-block-tainacan-carousel-items-list {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/**
|
||||
* Swiper 8.4.7
|
||||
* Swiper 11.1.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
* Copyright 2014-2023 Vladimir Kharlampidi
|
||||
* Copyright 2014-2024 Vladimir Kharlampidi
|
||||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: January 30, 2023
|
||||
* Released on: April 9, 2024
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'swiper-icons';
|
||||
|
@ -15,7 +15,18 @@
|
|||
font-weight: 400;
|
||||
font-style: normal; }
|
||||
:root {
|
||||
--swiper-theme-color: #007aff; }
|
||||
--swiper-theme-color: #007aff;
|
||||
/*
|
||||
--swiper-preloader-color: var(--swiper-theme-color);
|
||||
--swiper-wrapper-transition-timing-function: initial;
|
||||
*/ }
|
||||
:host {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
z-index: 1; }
|
||||
|
||||
.swiper {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
@ -24,7 +35,8 @@
|
|||
list-style: none;
|
||||
padding: 0;
|
||||
/* Fix of Webkit flickering */
|
||||
z-index: 1; }
|
||||
z-index: 1;
|
||||
display: block; }
|
||||
|
||||
.swiper-vertical > .swiper-wrapper {
|
||||
flex-direction: column; }
|
||||
|
@ -36,15 +48,18 @@
|
|||
z-index: 1;
|
||||
display: flex;
|
||||
transition-property: transform;
|
||||
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
||||
box-sizing: content-box; }
|
||||
|
||||
.swiper-android .swiper-slide,
|
||||
.swiper-ios .swiper-slide,
|
||||
.swiper-wrapper {
|
||||
transform: translate3d(0px, 0, 0); }
|
||||
|
||||
.swiper-pointer-events {
|
||||
.swiper-horizontal {
|
||||
touch-action: pan-y; }
|
||||
.swiper-pointer-events.swiper-vertical {
|
||||
|
||||
.swiper-vertical {
|
||||
touch-action: pan-x; }
|
||||
|
||||
.swiper-slide {
|
||||
|
@ -52,7 +67,8 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
transition-property: transform; }
|
||||
transition-property: transform;
|
||||
display: block; }
|
||||
|
||||
.swiper-slide-invisible-blank {
|
||||
visibility: hidden; }
|
||||
|
@ -61,6 +77,7 @@
|
|||
.swiper-autoheight,
|
||||
.swiper-autoheight .swiper-slide {
|
||||
height: auto; }
|
||||
|
||||
.swiper-autoheight .swiper-wrapper {
|
||||
align-items: flex-start;
|
||||
transition-property: transform, height; }
|
||||
|
@ -70,17 +87,64 @@
|
|||
backface-visibility: hidden; }
|
||||
|
||||
/* 3D Effects */
|
||||
.swiper-3d, .swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
.swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
perspective: 1200px; }
|
||||
|
||||
.swiper-3d .swiper-wrapper {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
.swiper-3d {
|
||||
perspective: 1200px; }
|
||||
.swiper-3d .swiper-wrapper,
|
||||
.swiper-3d .swiper-slide,
|
||||
.swiper-3d .swiper-cube-shadow {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
/* CSS Mode */
|
||||
.swiper-css-mode > .swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
/* For Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* For Internet Explorer and Edge */ }
|
||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: start start; }
|
||||
.swiper-css-mode.swiper-horizontal > .swiper-wrapper {
|
||||
scroll-snap-type: x mandatory; }
|
||||
.swiper-css-mode.swiper-vertical > .swiper-wrapper {
|
||||
scroll-snap-type: y mandatory; }
|
||||
.swiper-css-mode.swiper-free-mode > .swiper-wrapper {
|
||||
scroll-snap-type: none; }
|
||||
.swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: none; }
|
||||
.swiper-css-mode.swiper-centered > .swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999; }
|
||||
.swiper-css-mode.swiper-centered > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: center center;
|
||||
scroll-snap-stop: always; }
|
||||
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-inline-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
width: var(--swiper-centered-offset-after); }
|
||||
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-block-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
||||
width: 100%;
|
||||
min-width: 1px;
|
||||
height: var(--swiper-centered-offset-after); }
|
||||
|
||||
/* Slide styles start */
|
||||
/* 3D Shadows */
|
||||
.swiper-3d .swiper-slide-shadow,
|
||||
.swiper-3d .swiper-slide-shadow-left,
|
||||
.swiper-3d .swiper-slide-shadow-right,
|
||||
.swiper-3d .swiper-slide-shadow-top,
|
||||
.swiper-3d .swiper-slide-shadow-bottom,
|
||||
.swiper-3d .swiper-cube-shadow {
|
||||
transform-style: preserve-3d; }
|
||||
.swiper-3d .swiper-slide-shadow,
|
||||
.swiper-3d .swiper-slide-shadow-left,
|
||||
.swiper-3d .swiper-slide-shadow-right,
|
||||
|
@ -104,50 +168,47 @@
|
|||
.swiper-3d .swiper-slide-shadow-bottom {
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
||||
|
||||
/* CSS Mode */
|
||||
.swiper-css-mode > .swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
/* For Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* For Internet Explorer and Edge */ }
|
||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: start start; }
|
||||
.swiper-lazy-preloader {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -21px;
|
||||
margin-top: -21px;
|
||||
z-index: 10;
|
||||
transform-origin: 50%;
|
||||
box-sizing: border-box;
|
||||
border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
|
||||
border-radius: 50%;
|
||||
border-top-color: transparent; }
|
||||
|
||||
.swiper-horizontal.swiper-css-mode > .swiper-wrapper {
|
||||
scroll-snap-type: x mandatory; }
|
||||
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
|
||||
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
|
||||
animation: swiper-preloader-spin 1s infinite linear; }
|
||||
|
||||
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
||||
scroll-snap-type: y mandatory; }
|
||||
.swiper-lazy-preloader-white {
|
||||
--swiper-preloader-color: #fff; }
|
||||
|
||||
.swiper-centered > .swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999; }
|
||||
.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-inline-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
||||
height: 100%;
|
||||
width: var(--swiper-centered-offset-after); }
|
||||
.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-block-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
||||
width: 100%;
|
||||
height: var(--swiper-centered-offset-after); }
|
||||
.swiper-centered > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: center center;
|
||||
scroll-snap-stop: always; }
|
||||
.swiper-lazy-preloader-black {
|
||||
--swiper-preloader-color: #000; }
|
||||
|
||||
@keyframes swiper-preloader-spin {
|
||||
0% {
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
transform: rotate(360deg); } }
|
||||
/* Slide styles end */
|
||||
:root {
|
||||
--swiper-navigation-size: 44px;
|
||||
/*
|
||||
--swiper-navigation-top-offset: 50%;
|
||||
--swiper-navigation-sides-offset: 10px;
|
||||
--swiper-navigation-color: var(--swiper-theme-color);
|
||||
*/ }
|
||||
.swiper-button-prev, .swiper-button-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
top: var(--swiper-navigation-top-offset, 50%);
|
||||
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
||||
height: var(--swiper-navigation-size);
|
||||
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
||||
|
@ -170,7 +231,30 @@
|
|||
.swiper-navigation-disabled .swiper-button-prev,
|
||||
.swiper-navigation-disabled .swiper-button-next {
|
||||
display: none !important; }
|
||||
.swiper-button-prev:after, .swiper-button-next:after {
|
||||
.swiper-button-prev svg, .swiper-button-next svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
transform-origin: center; }
|
||||
.swiper-rtl .swiper-button-prev svg, .swiper-rtl .swiper-button-next svg {
|
||||
transform: rotate(180deg); }
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-rtl .swiper-button-next {
|
||||
left: var(--swiper-navigation-sides-offset, 10px);
|
||||
right: auto; }
|
||||
|
||||
.swiper-button-next,
|
||||
.swiper-rtl .swiper-button-prev {
|
||||
right: var(--swiper-navigation-sides-offset, 10px);
|
||||
left: auto; }
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none; }
|
||||
|
||||
/* Navigation font start */
|
||||
.swiper-button-prev:after,
|
||||
.swiper-button-next:after {
|
||||
font-family: swiper-icons;
|
||||
font-size: var(--swiper-navigation-size);
|
||||
text-transform: none !important;
|
||||
|
@ -178,25 +262,19 @@
|
|||
font-variant: initial;
|
||||
line-height: 1; }
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-rtl .swiper-button-next {
|
||||
left: 10px;
|
||||
right: auto; }
|
||||
.swiper-button-prev:after,
|
||||
.swiper-rtl .swiper-button-next:after {
|
||||
content: 'prev'; }
|
||||
|
||||
.swiper-button-next,
|
||||
.swiper-rtl .swiper-button-prev {
|
||||
right: 10px;
|
||||
right: var(--swiper-navigation-sides-offset, 10px);
|
||||
left: auto; }
|
||||
.swiper-button-next:after,
|
||||
.swiper-rtl .swiper-button-prev:after {
|
||||
content: 'next'; }
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none; }
|
||||
|
||||
/* Navigation font end */
|
||||
/* a11y */
|
||||
.swiper .swiper-notification {
|
||||
position: absolute;
|
||||
|
@ -339,7 +417,8 @@
|
|||
display: block;
|
||||
line-height: 1.2em;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper a > img {
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper a > img,
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper a > canvas {
|
||||
width: 100%;
|
||||
height: auto; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper a,
|
||||
|
@ -347,7 +426,8 @@
|
|||
color: inherit;
|
||||
text-decoration: none;
|
||||
display: block; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide-duplicate img {
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide-duplicate img,
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide-duplicate canvas {
|
||||
display: initial !important; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid a {
|
||||
width: 100%;
|
||||
|
@ -370,17 +450,17 @@
|
|||
-ms-grid-row: 1;
|
||||
-ms-grid-row-span: 2;
|
||||
grid-column: 1/3;
|
||||
grid-row: 1/3;
|
||||
padding-bottom: 100% !important; }
|
||||
grid-row: 1/3; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid .term-items-grid > * {
|
||||
flex-basis: 50%;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 100% !important; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid .term-items-grid img {
|
||||
margin-bottom: 0px; }
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid .term-items-grid img,
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid .term-items-grid canvas {
|
||||
object-fit: cover;
|
||||
object-position: center; }
|
||||
object-position: center;
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-carousel-terms-list .preview-warning {
|
||||
width: 100%;
|
||||
font-size: 0.875rem;
|
||||
|
@ -488,7 +568,8 @@
|
|||
display: block;
|
||||
line-height: 1.2em;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item img {
|
||||
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item img,
|
||||
.wp-block-tainacan-carousel-terms-list ul.terms-list-edit li.term-list-item canvas {
|
||||
height: auto;
|
||||
padding: 0px;
|
||||
margin-bottom: 0.5em;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,9 @@
|
|||
margin-left: 0 !important;
|
||||
height: 185px !important; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-list-without-margin li img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-list-without-margin li img {
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-list-without-margin li canvas,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-list-without-margin li img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-list-without-margin li canvas {
|
||||
height: 185px !important;
|
||||
margin-bottom: 0px !important; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid,
|
||||
|
@ -50,7 +52,9 @@
|
|||
line-height: normal;
|
||||
display: block; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item img {
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item canvas,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item canvas {
|
||||
height: auto;
|
||||
width: 185px;
|
||||
min-width: 185px;
|
||||
|
@ -103,8 +107,9 @@
|
|||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item {
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item img {
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item img, .wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid li.collection-list-item canvas,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item canvas {
|
||||
width: 100%; } }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list {
|
||||
|
@ -130,14 +135,18 @@
|
|||
word-break: break-all;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item img {
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item canvas,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item canvas {
|
||||
height: auto;
|
||||
width: 54px;
|
||||
min-width: 54px;
|
||||
padding: 0px;
|
||||
margin-right: 20px; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item a.collection-without-image img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item a.collection-without-image img {
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item a.collection-without-image canvas,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item a.collection-without-image img,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item a.collection-without-image canvas {
|
||||
display: none; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item a, .wp-block-tainacan-collections-list ul.collections-list.collections-layout-list li.collection-list-item:hover a,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item a,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "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",
|
||||
"mappings": "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",
|
||||
"sources": ["../../views/gutenberg-blocks/blocks/collections-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
||||
"names": [],
|
||||
"file": "tainacan-gutenberg-block-collections-list.css"
|
||||
|
|
|
@ -346,7 +346,9 @@
|
|||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item a > div {
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item img {
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item canvas,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item canvas {
|
||||
flex-basis: 100%;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
|
@ -373,8 +375,9 @@
|
|||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item {
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item img {
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item img, .wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-grid li.item-list-item canvas,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item canvas {
|
||||
width: 100%; } }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list {
|
||||
|
@ -518,14 +521,18 @@
|
|||
width: 54px;
|
||||
min-width: 54px; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item img {
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item canvas,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item canvas {
|
||||
height: auto;
|
||||
width: 54px;
|
||||
min-width: 54px;
|
||||
padding: 0px;
|
||||
margin-right: 20px; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item a.item-without-image img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item a.item-without-image img {
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item a.item-without-image canvas,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item a.item-without-image img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item a.item-without-image canvas {
|
||||
display: none; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item a, .wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list li.item-list-item:hover a,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list li.item-list-item a,
|
||||
|
@ -574,7 +581,9 @@
|
|||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container li.item-list-item img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container li.item-list-item img {
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container li.item-list-item canvas,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container li.item-list-item img,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container li.item-list-item canvas {
|
||||
display: none; }
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-mosaic .mosaic-container li.item-list-item a > span,
|
||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-mosaic .mosaic-container li.item-list-item a > span {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/**
|
||||
* Swiper 8.4.7
|
||||
* Swiper 11.1.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
* https://swiperjs.com
|
||||
*
|
||||
* Copyright 2014-2023 Vladimir Kharlampidi
|
||||
* Copyright 2014-2024 Vladimir Kharlampidi
|
||||
*
|
||||
* Released under the MIT License
|
||||
*
|
||||
* Released on: January 30, 2023
|
||||
* Released on: April 9, 2024
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'swiper-icons';
|
||||
|
@ -15,7 +15,18 @@
|
|||
font-weight: 400;
|
||||
font-style: normal; }
|
||||
:root {
|
||||
--swiper-theme-color: #007aff; }
|
||||
--swiper-theme-color: #007aff;
|
||||
/*
|
||||
--swiper-preloader-color: var(--swiper-theme-color);
|
||||
--swiper-wrapper-transition-timing-function: initial;
|
||||
*/ }
|
||||
:host {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
z-index: 1; }
|
||||
|
||||
.swiper {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
@ -24,7 +35,8 @@
|
|||
list-style: none;
|
||||
padding: 0;
|
||||
/* Fix of Webkit flickering */
|
||||
z-index: 1; }
|
||||
z-index: 1;
|
||||
display: block; }
|
||||
|
||||
.swiper-vertical > .swiper-wrapper {
|
||||
flex-direction: column; }
|
||||
|
@ -36,15 +48,18 @@
|
|||
z-index: 1;
|
||||
display: flex;
|
||||
transition-property: transform;
|
||||
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
||||
box-sizing: content-box; }
|
||||
|
||||
.swiper-android .swiper-slide,
|
||||
.swiper-ios .swiper-slide,
|
||||
.swiper-wrapper {
|
||||
transform: translate3d(0px, 0, 0); }
|
||||
|
||||
.swiper-pointer-events {
|
||||
.swiper-horizontal {
|
||||
touch-action: pan-y; }
|
||||
.swiper-pointer-events.swiper-vertical {
|
||||
|
||||
.swiper-vertical {
|
||||
touch-action: pan-x; }
|
||||
|
||||
.swiper-slide {
|
||||
|
@ -52,7 +67,8 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
transition-property: transform; }
|
||||
transition-property: transform;
|
||||
display: block; }
|
||||
|
||||
.swiper-slide-invisible-blank {
|
||||
visibility: hidden; }
|
||||
|
@ -61,6 +77,7 @@
|
|||
.swiper-autoheight,
|
||||
.swiper-autoheight .swiper-slide {
|
||||
height: auto; }
|
||||
|
||||
.swiper-autoheight .swiper-wrapper {
|
||||
align-items: flex-start;
|
||||
transition-property: transform, height; }
|
||||
|
@ -70,17 +87,64 @@
|
|||
backface-visibility: hidden; }
|
||||
|
||||
/* 3D Effects */
|
||||
.swiper-3d, .swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
.swiper-3d.swiper-css-mode .swiper-wrapper {
|
||||
perspective: 1200px; }
|
||||
|
||||
.swiper-3d .swiper-wrapper {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
.swiper-3d {
|
||||
perspective: 1200px; }
|
||||
.swiper-3d .swiper-wrapper,
|
||||
.swiper-3d .swiper-slide,
|
||||
.swiper-3d .swiper-cube-shadow {
|
||||
transform-style: preserve-3d; }
|
||||
|
||||
/* CSS Mode */
|
||||
.swiper-css-mode > .swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
/* For Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* For Internet Explorer and Edge */ }
|
||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: start start; }
|
||||
.swiper-css-mode.swiper-horizontal > .swiper-wrapper {
|
||||
scroll-snap-type: x mandatory; }
|
||||
.swiper-css-mode.swiper-vertical > .swiper-wrapper {
|
||||
scroll-snap-type: y mandatory; }
|
||||
.swiper-css-mode.swiper-free-mode > .swiper-wrapper {
|
||||
scroll-snap-type: none; }
|
||||
.swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: none; }
|
||||
.swiper-css-mode.swiper-centered > .swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999; }
|
||||
.swiper-css-mode.swiper-centered > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: center center;
|
||||
scroll-snap-stop: always; }
|
||||
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-inline-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
width: var(--swiper-centered-offset-after); }
|
||||
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-block-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
||||
width: 100%;
|
||||
min-width: 1px;
|
||||
height: var(--swiper-centered-offset-after); }
|
||||
|
||||
/* Slide styles start */
|
||||
/* 3D Shadows */
|
||||
.swiper-3d .swiper-slide-shadow,
|
||||
.swiper-3d .swiper-slide-shadow-left,
|
||||
.swiper-3d .swiper-slide-shadow-right,
|
||||
.swiper-3d .swiper-slide-shadow-top,
|
||||
.swiper-3d .swiper-slide-shadow-bottom,
|
||||
.swiper-3d .swiper-cube-shadow {
|
||||
transform-style: preserve-3d; }
|
||||
.swiper-3d .swiper-slide-shadow,
|
||||
.swiper-3d .swiper-slide-shadow-left,
|
||||
.swiper-3d .swiper-slide-shadow-right,
|
||||
|
@ -104,50 +168,47 @@
|
|||
.swiper-3d .swiper-slide-shadow-bottom {
|
||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
||||
|
||||
/* CSS Mode */
|
||||
.swiper-css-mode > .swiper-wrapper {
|
||||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
/* For Firefox */
|
||||
-ms-overflow-style: none;
|
||||
/* For Internet Explorer and Edge */ }
|
||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
||||
display: none; }
|
||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: start start; }
|
||||
.swiper-lazy-preloader {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -21px;
|
||||
margin-top: -21px;
|
||||
z-index: 10;
|
||||
transform-origin: 50%;
|
||||
box-sizing: border-box;
|
||||
border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
|
||||
border-radius: 50%;
|
||||
border-top-color: transparent; }
|
||||
|
||||
.swiper-horizontal.swiper-css-mode > .swiper-wrapper {
|
||||
scroll-snap-type: x mandatory; }
|
||||
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
|
||||
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
|
||||
animation: swiper-preloader-spin 1s infinite linear; }
|
||||
|
||||
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
||||
scroll-snap-type: y mandatory; }
|
||||
.swiper-lazy-preloader-white {
|
||||
--swiper-preloader-color: #fff; }
|
||||
|
||||
.swiper-centered > .swiper-wrapper::before {
|
||||
content: '';
|
||||
flex-shrink: 0;
|
||||
order: 9999; }
|
||||
.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-inline-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
|
||||
height: 100%;
|
||||
width: var(--swiper-centered-offset-after); }
|
||||
.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
|
||||
margin-block-start: var(--swiper-centered-offset-before); }
|
||||
.swiper-centered.swiper-vertical > .swiper-wrapper::before {
|
||||
width: 100%;
|
||||
height: var(--swiper-centered-offset-after); }
|
||||
.swiper-centered > .swiper-wrapper > .swiper-slide {
|
||||
scroll-snap-align: center center;
|
||||
scroll-snap-stop: always; }
|
||||
.swiper-lazy-preloader-black {
|
||||
--swiper-preloader-color: #000; }
|
||||
|
||||
@keyframes swiper-preloader-spin {
|
||||
0% {
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
transform: rotate(360deg); } }
|
||||
/* Slide styles end */
|
||||
:root {
|
||||
--swiper-navigation-size: 44px;
|
||||
/*
|
||||
--swiper-navigation-top-offset: 50%;
|
||||
--swiper-navigation-sides-offset: 10px;
|
||||
--swiper-navigation-color: var(--swiper-theme-color);
|
||||
*/ }
|
||||
.swiper-button-prev, .swiper-button-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
top: var(--swiper-navigation-top-offset, 50%);
|
||||
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
||||
height: var(--swiper-navigation-size);
|
||||
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
||||
|
@ -170,7 +231,30 @@
|
|||
.swiper-navigation-disabled .swiper-button-prev,
|
||||
.swiper-navigation-disabled .swiper-button-next {
|
||||
display: none !important; }
|
||||
.swiper-button-prev:after, .swiper-button-next:after {
|
||||
.swiper-button-prev svg, .swiper-button-next svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
transform-origin: center; }
|
||||
.swiper-rtl .swiper-button-prev svg, .swiper-rtl .swiper-button-next svg {
|
||||
transform: rotate(180deg); }
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-rtl .swiper-button-next {
|
||||
left: var(--swiper-navigation-sides-offset, 10px);
|
||||
right: auto; }
|
||||
|
||||
.swiper-button-next,
|
||||
.swiper-rtl .swiper-button-prev {
|
||||
right: var(--swiper-navigation-sides-offset, 10px);
|
||||
left: auto; }
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none; }
|
||||
|
||||
/* Navigation font start */
|
||||
.swiper-button-prev:after,
|
||||
.swiper-button-next:after {
|
||||
font-family: swiper-icons;
|
||||
font-size: var(--swiper-navigation-size);
|
||||
text-transform: none !important;
|
||||
|
@ -178,25 +262,19 @@
|
|||
font-variant: initial;
|
||||
line-height: 1; }
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-rtl .swiper-button-next {
|
||||
left: 10px;
|
||||
right: auto; }
|
||||
.swiper-button-prev:after,
|
||||
.swiper-rtl .swiper-button-next:after {
|
||||
content: 'prev'; }
|
||||
|
||||
.swiper-button-next,
|
||||
.swiper-rtl .swiper-button-prev {
|
||||
right: 10px;
|
||||
right: var(--swiper-navigation-sides-offset, 10px);
|
||||
left: auto; }
|
||||
.swiper-button-next:after,
|
||||
.swiper-rtl .swiper-button-prev:after {
|
||||
content: 'next'; }
|
||||
|
||||
.swiper-button-lock {
|
||||
display: none; }
|
||||
|
||||
/* Navigation font end */
|
||||
/* a11y */
|
||||
.swiper .swiper-notification {
|
||||
position: absolute;
|
||||
|
@ -209,9 +287,17 @@
|
|||
:root {
|
||||
/*
|
||||
--swiper-pagination-color: var(--swiper-theme-color);
|
||||
--swiper-pagination-left: auto;
|
||||
--swiper-pagination-right: 8px;
|
||||
--swiper-pagination-bottom: 8px;
|
||||
--swiper-pagination-top: auto;
|
||||
--swiper-pagination-fraction-color: inherit;
|
||||
--swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);
|
||||
--swiper-pagination-progressbar-size: 4px;
|
||||
--swiper-pagination-bullet-size: 8px;
|
||||
--swiper-pagination-bullet-width: 8px;
|
||||
--swiper-pagination-bullet-height: 8px;
|
||||
--swiper-pagination-bullet-border-radius: 50%;
|
||||
--swiper-pagination-bullet-inactive-color: #000;
|
||||
--swiper-pagination-bullet-inactive-opacity: 0.2;
|
||||
--swiper-pagination-bullet-opacity: 1;
|
||||
|
@ -234,7 +320,8 @@
|
|||
.swiper-pagination-custom,
|
||||
.swiper-horizontal > .swiper-pagination-bullets,
|
||||
.swiper-pagination-bullets.swiper-pagination-horizontal {
|
||||
bottom: 10px;
|
||||
bottom: var(--swiper-pagination-bottom, 8px);
|
||||
top: var(--swiper-pagination-top, auto);
|
||||
left: 0;
|
||||
width: 100%; }
|
||||
|
||||
|
@ -262,7 +349,7 @@
|
|||
width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
|
||||
height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
border-radius: var(--swiper-pagination-bullet-border-radius, 50%);
|
||||
background: var(--swiper-pagination-bullet-inactive-color, #000);
|
||||
opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); }
|
||||
button.swiper-pagination-bullet {
|
||||
|
@ -282,7 +369,8 @@
|
|||
|
||||
.swiper-vertical > .swiper-pagination-bullets,
|
||||
.swiper-pagination-vertical.swiper-pagination-bullets {
|
||||
right: 10px;
|
||||
right: var(--swiper-pagination-right, 8px);
|
||||
left: var(--swiper-pagination-left, auto);
|
||||
top: 50%;
|
||||
transform: translate3d(0px, -50%, 0); }
|
||||
.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,
|
||||
|
@ -314,9 +402,13 @@
|
|||
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
||||
transition: 200ms transform, 200ms right; }
|
||||
|
||||
/* Fraction */
|
||||
.swiper-pagination-fraction {
|
||||
color: var(--swiper-pagination-fraction-color, inherit); }
|
||||
|
||||
/* Progress */
|
||||
.swiper-pagination-progressbar {
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));
|
||||
position: absolute; }
|
||||
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
||||
background: var(--swiper-pagination-color, var(--swiper-theme-color));
|
||||
|
@ -331,11 +423,11 @@
|
|||
transform-origin: right top; }
|
||||
.swiper-horizontal > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-horizontal, .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
height: var(--swiper-pagination-progressbar-size, 4px);
|
||||
left: 0;
|
||||
top: 0; }
|
||||
.swiper-vertical > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-vertical, .swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {
|
||||
width: 4px;
|
||||
width: var(--swiper-pagination-progressbar-size, 4px);
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0; }
|
||||
|
@ -670,19 +762,19 @@
|
|||
.tainacan-media-component__swiper-main + .tainacan-media-component__swiper-thumbs li.swiper-slide {
|
||||
cursor: pointer; }
|
||||
|
||||
.tainacan-photoswipe-layer {
|
||||
.pswp.tainacan-photoswipe-layer {
|
||||
--pswp-bg: var(--tainacan-lightbox-background, #1d1d1d);
|
||||
--pswp-error-text-color: var(--tainacan-lightbox-text-color, #fafafa);
|
||||
--pswp-icon-color: var(--tainacan-lightbox-text-color, #fafafa);
|
||||
--pswp-icon-color-secondary: var(--tainacan-lightbox-background-contrast, #4f4f4f);
|
||||
--pswp-icon-stroke-color: var(--tainacan-lightbox-background-contrast, #4f4f4f); }
|
||||
.tainacan-photoswipe-layer.has-light-color-scheme {
|
||||
.pswp.tainacan-photoswipe-layer.has-light-color-scheme {
|
||||
--tainacan-lightbox-background: #fafafa;
|
||||
--tainacan-lightbox-text-color: #202020;
|
||||
--tainacan-lightbox-background-contrast: #dbdbdb; }
|
||||
.tainacan-photoswipe-layer .pswp__counter {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__counter {
|
||||
min-width: 50px; }
|
||||
.tainacan-photoswipe-layer .pswp__name {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__name {
|
||||
display: block;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
|
@ -698,9 +790,9 @@
|
|||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
transition: opacity 0.1s ease; }
|
||||
.tainacan-photoswipe-layer .pswp__name:hover {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__name:hover {
|
||||
opacity: 1.0; }
|
||||
.tainacan-photoswipe-layer .pswp__caption {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__caption {
|
||||
position: fixed;
|
||||
padding: 8px;
|
||||
width: 100%;
|
||||
|
@ -709,9 +801,9 @@
|
|||
bottom: 0;
|
||||
opacity: 0.75;
|
||||
transition: opacity 0.4s ease, bottom 0.2s ease; }
|
||||
.tainacan-photoswipe-layer .pswp__caption:hover {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__caption:hover {
|
||||
opacity: 1.0; }
|
||||
.tainacan-photoswipe-layer .pswp__caption .pswp__caption-inner {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__caption .pswp__caption-inner {
|
||||
background-color: var(--pswp-bg);
|
||||
color: var(--pswp-icon-color);
|
||||
text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
|
||||
|
@ -721,30 +813,30 @@
|
|||
text-align: center;
|
||||
font-size: 1em;
|
||||
border-radius: 4px; }
|
||||
.tainacan-photoswipe-layer .pswp__caption .pswp__caption-inner .pswp__figure_caption {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__caption .pswp__caption-inner .pswp__figure_caption {
|
||||
font-size: 0.875em;
|
||||
font-style: italic;
|
||||
display: block; }
|
||||
.tainacan-photoswipe-layer .pswp__caption .pswp__caption-inner .pswp__figure_caption + .pswp__description {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__caption .pswp__caption-inner .pswp__figure_caption + .pswp__description {
|
||||
margin-bottom: 1.5em; }
|
||||
.tainacan-photoswipe-layer .pswp__caption .pswp__caption-inner .pswp__description {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__caption .pswp__caption-inner .pswp__description {
|
||||
font-size: 0.9375em;
|
||||
display: block; }
|
||||
.tainacan-photoswipe-layer.pswp--zoomed-in .pswp__name {
|
||||
.pswp.tainacan-photoswipe-layer.pswp--zoomed-in .pswp__name {
|
||||
opacity: 0.0; }
|
||||
.tainacan-photoswipe-layer.pswp--zoomed-in .pswp__caption {
|
||||
.pswp.tainacan-photoswipe-layer.pswp--zoomed-in .pswp__caption {
|
||||
bottom: -40px;
|
||||
opacity: 0.0; }
|
||||
.tainacan-photoswipe-layer .pswp__button--arrow--left::before,
|
||||
.tainacan-photoswipe-layer .pswp__button--arrow--right::before {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__button--arrow--left::before,
|
||||
.pswp.tainacan-photoswipe-layer .pswp__button--arrow--right::before {
|
||||
background-color: transparent; }
|
||||
.tainacan-photoswipe-layer .pswp__container {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center; }
|
||||
.tainacan-photoswipe-layer .pswp__container .attachment-without-image {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .attachment-without-image {
|
||||
width: 100%;
|
||||
height: calc(100% - 60px);
|
||||
display: flex;
|
||||
|
@ -754,7 +846,7 @@
|
|||
padding: 60px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px; }
|
||||
.tainacan-photoswipe-layer .pswp__container .attachment-without-image > iframe:not(.wp-embedded-content) {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .attachment-without-image > iframe:not(.wp-embedded-content) {
|
||||
width: 90vw;
|
||||
height: calc(100vh - 120px);
|
||||
border: none;
|
||||
|
@ -763,7 +855,7 @@
|
|||
background-image: url("../images/preloader.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center; }
|
||||
.tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap > iframe#iframePDF {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap > iframe#iframePDF {
|
||||
width: 90vw;
|
||||
height: calc(100vh - 120px);
|
||||
border: none;
|
||||
|
@ -772,56 +864,56 @@
|
|||
background-image: url("../images/preloader.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center; }
|
||||
.tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center; }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed {
|
||||
width: 100%;
|
||||
height: auto; }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-has-aspect-ratio {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-has-aspect-ratio {
|
||||
max-width: calc((90vh * 2) / 1);
|
||||
/* Default to 2:1 aspect ratio. */
|
||||
margin-left: auto;
|
||||
margin-right: auto; }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-21-9 {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-21-9 {
|
||||
max-width: calc((90vh * 21) / 9); }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-18-9 {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-18-9 {
|
||||
max-width: calc((90vh * 18) / 9); }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-16-9 {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-16-9 {
|
||||
max-width: calc((90vh * 16) / 9); }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-4-3 {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-4-3 {
|
||||
max-width: calc((90vh * 4) / 3); }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-1 {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-1 {
|
||||
max-width: 90vh; }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-9-16 {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-9-16 {
|
||||
max-width: calc((90vh * 9) / 16); }
|
||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-2 {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-2 {
|
||||
max-width: calc((90vh * 1) / 2); }
|
||||
.tainacan-photoswipe-layer .pswp__container .pswp__content {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .pswp__content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-content: center; }
|
||||
.tainacan-photoswipe-layer .pswp__container .pswp__content > .tainacan-content-embed:not(.attachment-without-image) {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container .pswp__content > .tainacan-content-embed:not(.attachment-without-image) {
|
||||
margin-top: 60px; }
|
||||
.tainacan-photoswipe-layer .pswp__container a:first-of-type,
|
||||
.tainacan-photoswipe-layer .pswp__container p:first-of-type,
|
||||
.tainacan-photoswipe-layer .pswp__container article:first-of-type {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container a:first-of-type,
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container p:first-of-type,
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container article:first-of-type {
|
||||
z-index: 99;
|
||||
padding: 1rem 4.33337vw;
|
||||
background: var(--tainacan-media-background, #ffffff);
|
||||
border-radius: 3px;
|
||||
word-wrap: break-word; }
|
||||
.tainacan-photoswipe-layer .pswp__container audio {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container audio {
|
||||
background: black;
|
||||
min-height: 38px;
|
||||
border-radius: 20px;
|
||||
min-width: 80%;
|
||||
max-width: 80%; }
|
||||
.tainacan-photoswipe-layer .pswp__container video {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container video {
|
||||
min-height: 56px;
|
||||
max-width: 80%; }
|
||||
.tainacan-photoswipe-layer .pswp__container iframe {
|
||||
.pswp.tainacan-photoswipe-layer .pswp__container iframe {
|
||||
border: none; }
|
||||
|
||||
/*# sourceMappingURL=tainacan-gutenberg-block-item-gallery.css.map */
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,9 @@
|
|||
margin-left: 0 !important;
|
||||
height: 185px !important; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-list-without-margin li img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-list-without-margin li img {
|
||||
.wp-block-tainacan-items-list ul.items-list.items-list-without-margin li canvas,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-list-without-margin li img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-list-without-margin li canvas {
|
||||
height: 185px !important;
|
||||
margin-bottom: 0px !important; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid,
|
||||
|
@ -54,7 +56,9 @@
|
|||
line-height: normal;
|
||||
display: block; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item img {
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item canvas,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item canvas {
|
||||
height: auto;
|
||||
width: 185px;
|
||||
min-width: 185px;
|
||||
|
@ -107,8 +111,9 @@
|
|||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item {
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item img {
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item img, .wp-block-tainacan-items-list ul.items-list.items-layout-grid li.item-list-item canvas,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item canvas {
|
||||
width: 100%; } }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list {
|
||||
|
@ -134,14 +139,18 @@
|
|||
word-break: break-all;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item img {
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item canvas,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item canvas {
|
||||
height: auto;
|
||||
width: 54px;
|
||||
min-width: 54px;
|
||||
padding: 0px;
|
||||
margin-right: 20px; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item a.item-without-image img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item a.item-without-image img {
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item a.item-without-image canvas,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item a.item-without-image img,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item a.item-without-image canvas {
|
||||
display: none; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item a, .wp-block-tainacan-items-list ul.items-list.items-layout-list li.item-list-item:hover a,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item a,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "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",
|
||||
"mappings": "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",
|
||||
"sources": ["../../views/gutenberg-blocks/blocks/items-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
||||
"names": [],
|
||||
"file": "tainacan-gutenberg-block-items-list.css"
|
||||
|
|
|
@ -34,7 +34,9 @@
|
|||
font-weight: bold;
|
||||
line-height: normal; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item img {
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item canvas,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item canvas {
|
||||
height: auto;
|
||||
width: 185px;
|
||||
min-width: 185px;
|
||||
|
@ -87,8 +89,9 @@
|
|||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item {
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item img {
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item img, .wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid li.term-list-item canvas,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item canvas {
|
||||
width: 100%; } }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list {
|
||||
|
@ -114,14 +117,18 @@
|
|||
word-break: break-all;
|
||||
word-break: break-word; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item img {
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item canvas,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item canvas {
|
||||
height: auto;
|
||||
width: 54px;
|
||||
min-width: 54px;
|
||||
padding: 0px;
|
||||
margin-right: 20px; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item a.term-without-image img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item a.term-without-image img {
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item a.term-without-image canvas,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item a.term-without-image img,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item a.term-without-image canvas {
|
||||
display: none; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item a, .wp-block-tainacan-terms-list ul.terms-list.terms-layout-list li.term-list-item:hover a,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item a,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "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",
|
||||
"mappings": "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",
|
||||
"sources": ["../../views/gutenberg-blocks/blocks/terms-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
||||
"names": [],
|
||||
"file": "tainacan-gutenberg-block-terms-list.css"
|
||||
|
|
|
@ -154,5 +154,7 @@
|
|||
#tainacan-reports-app .apexcharts-legend-series {
|
||||
display: flex;
|
||||
align-items: center; }
|
||||
#tainacan-reports-app #current-page-selector {
|
||||
min-width: 48px; }
|
||||
|
||||
/*# sourceMappingURL=tainacan-reports.css.map */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "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",
|
||||
"mappings": "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",
|
||||
"sources": ["../../views/reports/tainacan-reports.scss"],
|
||||
"names": [],
|
||||
"file": "tainacan-reports.css"
|
||||
|
|
|
@ -11,7 +11,14 @@ use Tainacan\Entities;
|
|||
*
|
||||
* */
|
||||
class REST_Background_Processes_Controller extends REST_Controller {
|
||||
private $table = '';
|
||||
|
||||
/**
|
||||
* table
|
||||
*
|
||||
* @var String
|
||||
* @access protected
|
||||
*/
|
||||
private $table;
|
||||
|
||||
protected function get_schema() {
|
||||
return "TODO:get_schema";
|
||||
|
@ -185,7 +192,7 @@ class REST_Background_Processes_Controller extends REST_Controller {
|
|||
$process_type = '';
|
||||
if (isset($request['search'])) {
|
||||
$name = $request['search'];
|
||||
$process_type = "AND name LIKE '%${name}%'";
|
||||
$process_type = "AND name LIKE '%$name%'";
|
||||
$process_type = $wpdb->prepare($process_type);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class REST_Items_Controller extends REST_Controller {
|
|||
private $metadatum_repository;
|
||||
private $terms_repository;
|
||||
private $filters_repository;
|
||||
private $taxonomy_repository;
|
||||
private $taxonomies_repository;
|
||||
|
||||
/**
|
||||
* REST_Items_Controller constructor.
|
||||
|
@ -587,7 +587,7 @@ class REST_Items_Controller extends REST_Controller {
|
|||
}
|
||||
|
||||
$filter_name = is_string($filter_type_component)
|
||||
? "tainacan-api-items-${filter_type_component}-filter-arguments"
|
||||
? "tainacan-api-items-$filter_type_component-filter-arguments"
|
||||
: 'tainacan-api-items-filter-arguments';
|
||||
|
||||
$filters_arguments[] = apply_filters($filter_name, array(
|
||||
|
@ -1025,7 +1025,8 @@ class REST_Items_Controller extends REST_Controller {
|
|||
'status' => 'draft'
|
||||
];
|
||||
|
||||
$body = json_decode($request->get_body(), true);
|
||||
$data_body = $request->get_body() ?? '';
|
||||
$body = json_decode($data_body, true);
|
||||
|
||||
if (!is_array($body)) {
|
||||
$body = [];
|
||||
|
@ -1178,7 +1179,7 @@ class REST_Items_Controller extends REST_Controller {
|
|||
}
|
||||
return $new_term;
|
||||
}
|
||||
return count($split_value) > 1 ? $value : filter_var($value, FILTER_SANITIZE_STRING);
|
||||
return count($split_value) > 1 ? $value : htmlspecialchars($value);
|
||||
}
|
||||
|
||||
private function submission_rollback_new_terms () {
|
||||
|
@ -1193,7 +1194,7 @@ class REST_Items_Controller extends REST_Controller {
|
|||
$item = json_decode($request->get_body(), true);
|
||||
$metadata = $item['metadata'];
|
||||
foreach ($item as $key => $value) {
|
||||
$item[$key] = ( is_string($value) && !is_numeric($value) ? filter_var($value, FILTER_SANITIZE_STRING) : $value );
|
||||
$item[$key] = ( is_string($value) && !is_numeric($value) ? htmlspecialchars($value) : $value );
|
||||
}
|
||||
|
||||
$response_recaptcha = $this->submission_item_check_recaptcha($request);
|
||||
|
@ -1236,7 +1237,7 @@ class REST_Items_Controller extends REST_Controller {
|
|||
$child_value = implode(' ', $child_value);
|
||||
}
|
||||
if (is_numeric($value) != true) {
|
||||
$child_value = filter_var($child_value, FILTER_SANITIZE_STRING);
|
||||
$child_value = htmlspecialchars($child_value);
|
||||
}
|
||||
$metadatum_child = $this->metadatum_repository->fetch( $child['metadatum_id'] );
|
||||
$item_metadata_child = new Entities\Item_Metadata_Entity($item, $metadatum_child, null, $parent_meta_id);
|
||||
|
@ -1258,7 +1259,7 @@ class REST_Items_Controller extends REST_Controller {
|
|||
$child_value = implode(' ', $child_value);
|
||||
}
|
||||
if (is_numeric($value) != true) {
|
||||
$child_value = filter_var($child_value, FILTER_SANITIZE_STRING);
|
||||
$child_value = htmlspecialchars($child_value);
|
||||
}
|
||||
$metadatum_child = $this->metadatum_repository->fetch( $child['metadatum_id'] );
|
||||
$item_metadata_child = new Entities\Item_Metadata_Entity($item, $metadatum_child, null, $parent_meta_id);
|
||||
|
@ -1291,9 +1292,9 @@ class REST_Items_Controller extends REST_Controller {
|
|||
}
|
||||
} else {
|
||||
if (is_array($value) == true) {
|
||||
$value = array_map( function($v) { return is_numeric($v) ? $v : filter_var($v, FILTER_SANITIZE_STRING); }, $value);
|
||||
$value = array_map( function($v) { return is_numeric($v) ? $v : htmlspecialchars($v); }, $value);
|
||||
} else if (is_numeric($value) != true) {
|
||||
$value = filter_var($value, FILTER_SANITIZE_STRING);
|
||||
$value = htmlspecialchars($value);
|
||||
}
|
||||
if ($item_metadata->is_multiple()) {
|
||||
$item_metadata->set_value( is_array($value) ? $value : [$value] );
|
||||
|
|
|
@ -104,6 +104,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
|
||||
if ( ! empty( $this->data ) ) {
|
||||
global $wpdb;
|
||||
$wpdb->query('START TRANSACTION');
|
||||
$wpdb->insert(
|
||||
$this->table,
|
||||
[
|
||||
|
@ -119,6 +120,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
]
|
||||
);
|
||||
$this->ID = $wpdb->insert_id;
|
||||
$wpdb->query('COMMIT');
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -139,6 +141,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
if (!isset($batch->output)) {
|
||||
$batch->output = '';
|
||||
}
|
||||
$wpdb->query('START TRANSACTION');
|
||||
$wpdb->update(
|
||||
$this->table,
|
||||
[
|
||||
|
@ -150,6 +153,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
],
|
||||
['ID' => $key]
|
||||
);
|
||||
$wpdb->query('COMMIT');
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -164,6 +168,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
*/
|
||||
public function open( $key ) {
|
||||
global $wpdb;
|
||||
$wpdb->query('START TRANSACTION');
|
||||
$wpdb->update(
|
||||
$this->table,
|
||||
[
|
||||
|
@ -171,6 +176,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
],
|
||||
['ID' => $key]
|
||||
);
|
||||
$wpdb->query('COMMIT');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -196,12 +202,13 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
$params['progress_label'] = __('Process completed with errors','tainacan');
|
||||
$params['progress_value'] = 100;
|
||||
}
|
||||
$wpdb->query('START TRANSACTION');
|
||||
$wpdb->update(
|
||||
$this->table,
|
||||
$params,
|
||||
['ID' => $key]
|
||||
);
|
||||
|
||||
$wpdb->query('COMMIT');
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -214,10 +221,12 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
*/
|
||||
public function delete( $key ) {
|
||||
global $wpdb;
|
||||
$wpdb->query('START TRANSACTION');
|
||||
$wpdb->delete(
|
||||
$this->table,
|
||||
['ID' => $key]
|
||||
);
|
||||
$wpdb->query('COMMIT');
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -353,7 +362,8 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
$task = $this->task( $task );
|
||||
} catch (\Exception $e) {
|
||||
// TODO: Add Stacktrace
|
||||
$this->write_error_log($batch->key, [['datetime' => date("Y-m-d H:i:s"), 'message' => 'Fatal Error: ' . $e->getMessage()]]);
|
||||
$this->debug('Fatal Error: ' . $e->getMessage());
|
||||
$this->write_error_log($batch->key, [['datetime' => date("Y-m-d H:i:s"), 'message' => 'Try Fatal Error: ' . $e->getMessage()]]);
|
||||
$this->write_error_log($batch->key, [['datetime' => date("Y-m-d H:i:s"), 'message' => 'Process aborted']]);
|
||||
$task = false;
|
||||
$close_status = 'errored';
|
||||
|
@ -398,9 +408,9 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
global $wpdb;
|
||||
|
||||
$table = $this->table;
|
||||
|
||||
$wpdb->query('START TRANSACTION');
|
||||
$wpdb->query( $wpdb->prepare( "DELETE FROM {$table} WHERE done = FALSE AND action LIKE %s", $this->action ) ); // @codingStandardsIgnoreLine.
|
||||
|
||||
$wpdb->query('COMMIT');
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,10 @@ use Tainacan\Repositories\Repository;
|
|||
class Roles {
|
||||
|
||||
private static $instance = null;
|
||||
|
||||
private $capabilities;
|
||||
private $meta_caps;
|
||||
private $meta_section_caps;
|
||||
private $filters_caps;
|
||||
|
||||
public static function get_instance()
|
||||
{
|
||||
|
@ -585,7 +587,7 @@ class Roles {
|
|||
|
||||
foreach ( $caps as $cap ) {
|
||||
|
||||
if ( array_key_exists($cap, $allcaps) && $allcaps[$cap] === true ) {
|
||||
if ( isset($cap) && $cap !== false && array_key_exists($cap, $allcaps) && $allcaps[$cap] === true ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,8 +91,8 @@ class Collection extends Entity {
|
|||
$array_collection['header_image'] = $this->get_header_image();
|
||||
$array_collection['author_name'] = $this->get_author_name();
|
||||
$array_collection['url'] = $this->get_url();
|
||||
$array_collection['creation_date'] = $this->get_date_i18n( explode( ' ', $array_collection['creation_date'] )[0] );
|
||||
$array_collection['modification_date'] = $this->get_date_i18n( explode( ' ', $array_collection['modification_date'] )[0] );
|
||||
$array_collection['creation_date'] = $this->get_date_i18n( explode( ' ', $array_collection['creation_date'] ?? '' )[0] );
|
||||
$array_collection['modification_date'] = $this->get_date_i18n( explode( ' ', $array_collection['modification_date'] ?? '' )[0] );
|
||||
|
||||
return apply_filters('tainacan-collection-to-array', $array_collection, $this);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|||
* Entity Super class
|
||||
*
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Entity {
|
||||
/**
|
||||
* The repository of that entity
|
||||
|
@ -202,6 +203,9 @@ class Entity {
|
|||
return $this->$method($value);
|
||||
}
|
||||
}
|
||||
// public function __set(string $name, mixed $value): void {
|
||||
// $this->{$name} = $value;
|
||||
// }
|
||||
|
||||
/**
|
||||
* get the value property
|
||||
|
@ -216,6 +220,9 @@ class Entity {
|
|||
return $this->$method();
|
||||
}
|
||||
}
|
||||
// public function __get(string $name) {
|
||||
// return $this->{$name};
|
||||
// }
|
||||
|
||||
/**
|
||||
* set the status of the entity
|
||||
|
|
|
@ -140,7 +140,7 @@ class Filter extends Entity {
|
|||
function get_filter_type_object(){
|
||||
$class_name = $this->get_filter_type();
|
||||
|
||||
if( !class_exists( $class_name ) ){
|
||||
if( is_null($class_name) || !class_exists( $class_name ) ){
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ class Item extends Entity {
|
|||
$array_item['_thumbnail_id'] = $this->get__thumbnail_id();
|
||||
$array_item['author_name'] = $this->get_author_name();
|
||||
$array_item['url'] = get_permalink( $this->get_id() );
|
||||
$array_item['creation_date'] = $this->get_date_i18n( explode( ' ', $array_item['creation_date'] )[0] );
|
||||
$array_item['modification_date'] = $this->get_date_i18n( explode( ' ', $array_item['modification_date'] )[0] );
|
||||
$array_item['creation_date'] = $this->get_date_i18n( explode( ' ', $array_item['creation_date'] ?? '' )[0] );
|
||||
$array_item['modification_date'] = $this->get_date_i18n( explode( ' ', $array_item['modification_date'] ?? '' )[0] );
|
||||
$array_item['document_mimetype'] = $this->get_document_mimetype();
|
||||
return apply_filters('tainacan-item-to-array', $array_item, $this);
|
||||
}
|
||||
|
@ -922,7 +922,7 @@ class Item extends Entity {
|
|||
$output .= $embed;
|
||||
}
|
||||
}
|
||||
return wp_kses_tainacan($output);
|
||||
return apply_filters("tainacan-item-get-attachment-as-html", wp_kses_tainacan($output), $img_size, $this);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1183,14 +1183,32 @@ class Item extends Entity {
|
|||
$return = '';
|
||||
|
||||
if ( $metadata_section->is_conditional_section() ) {
|
||||
|
||||
$rules = $metadata_section->get_conditional_section_rules();
|
||||
|
||||
if ( !empty($rules) ) {
|
||||
$item_id = $this->get_id();
|
||||
|
||||
foreach ( $rules as $meta_id => $meta_values_conditional ) {
|
||||
$meta_values = [];
|
||||
$metadatum = new \Tainacan\Entities\Metadatum($meta_id);
|
||||
$metadatum_type = $metadatum->get_metadata_type_object();
|
||||
|
||||
if ( $metadatum_type->get_primitive_type() == 'term' ) {
|
||||
$item_metadata = new \Tainacan\Entities\Item_Metadata_Entity($this, $metadatum);
|
||||
|
||||
if ( $metadatum->is_multiple() ) {
|
||||
$term_values = $item_metadata->get_value();
|
||||
$meta_values = array_map(function($term) {
|
||||
return $term->get_id();
|
||||
}, $term_values);
|
||||
} else {
|
||||
$term_values = $item_metadata->get_value();
|
||||
$meta_values = $term_values == false ? [] : [ $term_values->get_id() ];
|
||||
}
|
||||
|
||||
} else {
|
||||
$item_id = $this->get_id();
|
||||
$meta_values = get_post_meta( $item_id, $meta_id );
|
||||
}
|
||||
|
||||
if ( !array_intersect($meta_values, $meta_values_conditional) )
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|||
* Represents the Entity Term
|
||||
*/
|
||||
class Term extends Entity {
|
||||
public $WP_Term;
|
||||
|
||||
protected
|
||||
$term_id,
|
||||
$name,
|
||||
|
|
|
@ -4,6 +4,14 @@ namespace Tainacan;
|
|||
|
||||
class Export_Handler {
|
||||
|
||||
/**
|
||||
* bg_exporter
|
||||
*
|
||||
* @var Background_Exporter
|
||||
* @access protected
|
||||
*/
|
||||
protected $bg_exporter;
|
||||
|
||||
private $registered_exporters = [];
|
||||
|
||||
function __construct() {
|
||||
|
|
|
@ -28,6 +28,10 @@ abstract class Exporter {
|
|||
}
|
||||
}
|
||||
}
|
||||
if(!is_user_logged_in()) {
|
||||
$author = $this->get_transient('author');
|
||||
wp_set_current_user($author);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -622,7 +626,7 @@ abstract class Exporter {
|
|||
'post_status' => ["private", "publish", "draft"]
|
||||
];
|
||||
|
||||
$this->add_log("Retrieving $per_page items on page index: $index, in collection " . $collection_definition['id'] );
|
||||
$this->add_log("Retrieving $per_page items on page index: $page , item index: $index, in collection " . $collection_definition['id'] );
|
||||
$items = $tainacan_items->fetch($filters, $collection_id, 'WP_Query');
|
||||
|
||||
if ( !isset($collection_definition['total_items']) ) {
|
||||
|
@ -645,6 +649,8 @@ abstract class Exporter {
|
|||
}
|
||||
}
|
||||
wp_reset_postdata();
|
||||
$dataLen = count($data);
|
||||
$this->add_log("Retrieved data size: $dataLen");
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -812,9 +818,6 @@ abstract class Exporter {
|
|||
$method_name = $steps[$current_step]['callback'];
|
||||
|
||||
if (method_exists($this, $method_name)) {
|
||||
$author = $this->get_transient('author');
|
||||
$this->add_log('User in process: ' . $author);
|
||||
wp_set_current_user($author);
|
||||
$result = $this->$method_name();
|
||||
} else {
|
||||
$this->add_error_log( 'Callback not found for step ' . $steps[$current_step]['name']);
|
||||
|
|
|
@ -173,7 +173,8 @@ class Exposers_Handler {
|
|||
* @return Exposers\Exposer|boolean false
|
||||
*/
|
||||
public static function request_has_exposer($request) {
|
||||
$body = json_decode( $request->get_body(), true );
|
||||
$data_body = $request->get_body() ?? '';
|
||||
$body = json_decode( $data_body, true );
|
||||
$query_url_params = $request->get_query_params();
|
||||
$Tainacan_Exposers = self::get_instance();
|
||||
if(
|
||||
|
|
|
@ -8,6 +8,11 @@ class Bulk_Edit_Process extends Generic_Process {
|
|||
private $meta_key = '_tnc_bulk';
|
||||
private $group_id = false;
|
||||
|
||||
private $items_repository;
|
||||
private $metadatum_repository;
|
||||
private $item_metadata_repository;
|
||||
private $bulk_edit_data;
|
||||
|
||||
public function __construct($attributes = array()) {
|
||||
$this->array_attributes = array_merge($this->array_attributes, [
|
||||
'group_id',
|
||||
|
@ -93,9 +98,9 @@ class Bulk_Edit_Process extends Generic_Process {
|
|||
$metadata_label = __('Changed metadata', 'tainacan');
|
||||
|
||||
$message = __('Bulk edit finished', 'tainacan');
|
||||
$message .= "<p> <strong> ${title_label}: </strong> ${name} </p>";
|
||||
$message .= "<p> <strong> ${author_label}: </strong> ${author_name} </p>";
|
||||
$message .= "<p> <strong> ${metadata_label}: </strong> ${metadata} </p>";
|
||||
$message .= "<p> <strong> $title_label: </strong> $name </p>";
|
||||
$message .= "<p> <strong> $author_label: </strong> $author_name </p>";
|
||||
$message .= "<p> <strong> $metadata_label: </strong> $metadata </p>";
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
@ -268,7 +273,7 @@ class Bulk_Edit_Process extends Generic_Process {
|
|||
|
||||
$serealize_erro = (object) array('err' => array());
|
||||
$erro = $item_metadata->get_errors();
|
||||
array_walk_recursive($erro, function($v, $k, &$t) {$t->err[] = $v;}, $serealize_erro);
|
||||
array_walk_recursive($erro, function($v, $k, $t) {$t->err[] = $v;}, $serealize_erro);
|
||||
$this->add_error_log( __('errors: ', 'tainacan') . implode(", ", $serealize_erro->err) );
|
||||
|
||||
return false;
|
||||
|
@ -516,7 +521,13 @@ class Bulk_Edit_Process extends Generic_Process {
|
|||
|
||||
$this->add_error_log( sprintf( __( 'Please verify, invalid value(s) to edit item ID: "%d"', 'tainacan' ), $item->get_id() ) );
|
||||
$serealize_erro = (object) array('err' => array());
|
||||
array_walk_recursive($item->get_errors(), create_function('&$v, $k, &$t', '$t->err[] = $v;'), $serealize_erro);
|
||||
array_walk_recursive(
|
||||
$item->get_errors(),
|
||||
function (&$v, $k, &$t) {
|
||||
$t->err[] = $v;
|
||||
},
|
||||
$serealize_erro
|
||||
);
|
||||
$this->add_error_log( __('errors: ', 'tainacan') . implode(", ", $serealize_erro->err) );
|
||||
|
||||
return false;
|
||||
|
@ -538,7 +549,12 @@ class Bulk_Edit_Process extends Generic_Process {
|
|||
|
||||
$this->add_error_log( sprintf( __( 'Please verify, invalid value(s) to edit item ID: "%d"', 'tainacan' ), $item->get_id() ) );
|
||||
$serealize_erro = (object) array('err' => array());
|
||||
array_walk_recursive($item->get_errors(), create_function('&$v, $k, &$t', '$t->err[] = $v;'), $serealize_erro);
|
||||
array_walk_recursive(
|
||||
$item->get_errors(),
|
||||
function (&$v, $k, &$t) {
|
||||
$t->err[] = $v;
|
||||
},
|
||||
$serealize_erro);
|
||||
$this->add_error_log( __('errors: ', 'tainacan') . implode(", ", $serealize_erro->err) );
|
||||
|
||||
return false;
|
||||
|
|
|
@ -4,6 +4,15 @@ namespace Tainacan;
|
|||
|
||||
class Generic_Process_Handler {
|
||||
|
||||
|
||||
/**
|
||||
* bg_process
|
||||
*
|
||||
* @var Background_Generic_Process
|
||||
* @access protected
|
||||
*/
|
||||
protected $bg_process;
|
||||
|
||||
private $registered_process = [];
|
||||
|
||||
function __construct() {
|
||||
|
|
|
@ -5,6 +5,8 @@ use Tainacan;
|
|||
use Tainacan\Entities;
|
||||
|
||||
class CSV extends Importer {
|
||||
private $items_repo;
|
||||
|
||||
public function __construct($attributes = array()) {
|
||||
parent::__construct($attributes);
|
||||
$this->items_repo = \Tainacan\Repositories\Items::get_instance();
|
||||
|
@ -487,7 +489,7 @@ class CSV extends Importer {
|
|||
case 'utf8':
|
||||
return $string;
|
||||
case 'iso88591':
|
||||
return utf8_encode($string);
|
||||
return mb_convert_encoding($string, 'UTF-8', 'ISO-8859-1');
|
||||
default:
|
||||
return $string;
|
||||
}
|
||||
|
@ -1089,11 +1091,11 @@ class CSV extends Importer {
|
|||
$author = $current_user->user_login;
|
||||
|
||||
$message = __('imported file:', 'tainacan');
|
||||
$message .= " <b> ${imported_file} </b><br/>";
|
||||
$message .= " <b> $imported_file </b><br/>";
|
||||
$message .= __('target collections:', 'tainacan');
|
||||
$message .= " <b>" . implode(", ", $this->get_collections_names() ) . "</b><br/>";
|
||||
$message .= __('Imported by:', 'tainacan');
|
||||
$message .= " <b> ${author} </b><br/>";
|
||||
$message .= " <b> $author </b><br/>";
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,14 @@ namespace Tainacan;
|
|||
|
||||
class Importer_Handler {
|
||||
|
||||
/**
|
||||
* bg_importer
|
||||
*
|
||||
* @var Background_Importer
|
||||
* @access protected
|
||||
*/
|
||||
protected $bg_importer;
|
||||
|
||||
private $registered_importers = [];
|
||||
|
||||
function __construct() {
|
||||
|
|
|
@ -5,6 +5,13 @@ use \Tainacan\Entities;
|
|||
|
||||
class Old_Tainacan extends Importer {
|
||||
|
||||
protected $tax_repo;
|
||||
protected $col_repo;
|
||||
protected $items_repo;
|
||||
protected $metadata_repo;
|
||||
protected $term_repo;
|
||||
protected $item_metadata_repo;
|
||||
|
||||
protected $steps = [
|
||||
[
|
||||
'name' => 'Create Taxonomies',
|
||||
|
@ -443,7 +450,7 @@ class Old_Tainacan extends Importer{
|
|||
$info = $this->requester( $this->get_url() . $this->tainacan_api_address . "/collections/".$collection_id."/items", $args );
|
||||
|
||||
if( !isset($info['body']) ){
|
||||
$this->add_error_log($result->get_error_message());
|
||||
$this->add_error_log($info->get_error_message());
|
||||
$this->add_error_log('Error in fetch remote total items');
|
||||
$this->abort();
|
||||
return false;
|
||||
|
@ -474,7 +481,7 @@ class Old_Tainacan extends Importer{
|
|||
$info = wp_remote_get( $this->get_url() . $this->tainacan_api_address . "/collections/".$collection_id."/items?includeMetadata=1&filter[page]=" . $page, $args );
|
||||
|
||||
if( !isset($info['body']) ){
|
||||
$this->add_error_log($result->get_error_message());
|
||||
$this->add_error_log($info->get_error_message());
|
||||
$this->add_error_log('Error in fetch remote first page item');
|
||||
$this->abort();
|
||||
return false;
|
||||
|
@ -493,7 +500,7 @@ class Old_Tainacan extends Importer{
|
|||
$info = json_decode($info['body']);
|
||||
|
||||
if( !isset($info['body']) ){
|
||||
$this->add_error_log($result->get_error_message());
|
||||
$this->add_error_log($info->get_error_message());
|
||||
$this->add_error_log('Error in fetch remote ' . $page . ' page item');
|
||||
$this->abort();
|
||||
return false;
|
||||
|
@ -613,7 +620,7 @@ class Old_Tainacan extends Importer{
|
|||
if (is_wp_error($result)) {
|
||||
|
||||
$this->add_log($result->get_error_message());
|
||||
$this->add_log('Error in fetch remote' . $url);
|
||||
$this->add_log('Error in fetch remote' . $link);
|
||||
$this->add_log('request number ' . $requests);
|
||||
|
||||
} else if (isset($result['body'])){
|
||||
|
@ -644,7 +651,7 @@ class Old_Tainacan extends Importer{
|
|||
|
||||
|
||||
|
||||
$this->add_error_log('Error in fetch remote, expired the 10 requests limit ' . $url);
|
||||
$this->add_error_log('Error in fetch remote, expired the 10 requests limit ' . $link);
|
||||
$this->abort();
|
||||
return false;
|
||||
}
|
||||
|
@ -713,10 +720,9 @@ class Old_Tainacan extends Importer{
|
|||
* @return int $metadatum_id
|
||||
*/
|
||||
protected function create_metadata( $node_metadata_old, $collection_id = null){
|
||||
$this->add_log('Creating metadata' . $meta->name);
|
||||
|
||||
$newMetadatum = new Entities\Metadatum();
|
||||
$meta = $node_metadata_old;
|
||||
$this->add_log('Creating metadata' . $meta->name);
|
||||
|
||||
$name = $meta->name;
|
||||
$type = $this->define_type($meta->type);
|
||||
|
@ -856,7 +862,7 @@ class Old_Tainacan extends Importer{
|
|||
/**
|
||||
* create attachments, document and thumb from old
|
||||
*
|
||||
* @param string $node_old
|
||||
* @param Object $node_old
|
||||
*
|
||||
* @return string the class name
|
||||
*/
|
||||
|
|
|
@ -81,6 +81,12 @@ class Test_Importer extends Importer {
|
|||
'extra val 1', 'extra val 2', 'extra val 3', 'extra val 4', 'extra val 5'
|
||||
];
|
||||
|
||||
protected $tax_repo;
|
||||
protected $col_repo;
|
||||
protected $items_repo;
|
||||
protected $metadata_repo;
|
||||
protected $item_metadata_repo;
|
||||
|
||||
public function __construct($attributes = array()) {
|
||||
parent::__construct($attributes);
|
||||
|
||||
|
|
|
@ -51,6 +51,38 @@
|
|||
*/
|
||||
protected $cron_interval_identifier;
|
||||
|
||||
/**
|
||||
* cron_hook_check_identifier
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
protected $cron_hook_check_identifier;
|
||||
|
||||
/**
|
||||
* process_lock_in_time
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
protected $process_lock_in_time;
|
||||
|
||||
/**
|
||||
* queue_lock_time
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
protected $queue_lock_time;
|
||||
|
||||
/**
|
||||
* cron_interval
|
||||
*
|
||||
* @var string
|
||||
* @access protected
|
||||
*/
|
||||
protected $cron_interval = 5;
|
||||
|
||||
/**
|
||||
* Initiate new background process
|
||||
*/
|
||||
|
@ -257,8 +289,11 @@
|
|||
* @return $this
|
||||
*/
|
||||
protected function unlock_process() {
|
||||
$this->debug('unlocking process');
|
||||
$this->debug('unlocking process: '. $this->identifier . '_process_lock');
|
||||
global $wpdb;
|
||||
$wpdb->query('START TRANSACTION');
|
||||
delete_site_transient( $this->identifier . '_process_lock' );
|
||||
$wpdb->query('COMMIT');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -16,56 +16,6 @@ class Dublin_Core extends Mapper {
|
|||
public $prefixes = [
|
||||
'dc' => 'http://purl.org/dc/elements/1.1/'
|
||||
];
|
||||
public $metadata = [
|
||||
'dc:contributor' => [
|
||||
'label' => 'Contributor'
|
||||
],
|
||||
'dc:coverage' => [
|
||||
'label' => 'Coverage'
|
||||
],
|
||||
'dc:creator' => [
|
||||
'label' => 'Creator',
|
||||
],
|
||||
'dc:date' => [
|
||||
'label' => 'Date',
|
||||
'metadata_type' => 'date'
|
||||
],
|
||||
'dc:description' => [
|
||||
'label' => 'Description',
|
||||
'core_metadatum' => 'description'
|
||||
],
|
||||
'dc:format' => [
|
||||
'label' => 'Format',
|
||||
],
|
||||
'dc:identifier' => [
|
||||
'label' => 'Identifier'
|
||||
],
|
||||
'dc:language' => [
|
||||
'label' => 'Language'
|
||||
],
|
||||
'dc:publisher' => [
|
||||
'label' => 'Publisher'
|
||||
],
|
||||
'dc:relation' => [
|
||||
'label' => 'Relation'
|
||||
],
|
||||
'dc:rights' => [
|
||||
'label' => 'Rights'
|
||||
],
|
||||
'dc:source' => [
|
||||
'label' => 'Source'
|
||||
],
|
||||
'dc:subject' => [
|
||||
'label' => 'Subject'
|
||||
],
|
||||
'dc:title' => [
|
||||
'label' => 'Title',
|
||||
'core_metadatum' => 'title'
|
||||
],
|
||||
'dc:type' => [
|
||||
'label' => 'Type'
|
||||
]
|
||||
];
|
||||
|
||||
/** XML especial case **/
|
||||
const XML_DC_NAMESPACE = 'http://purl.org/dc/elements/1.1/';
|
||||
|
@ -74,4 +24,75 @@ class Dublin_Core extends Mapper {
|
|||
public $XML_append_root = 'rdf:Description';
|
||||
/** END: XML especial case **/
|
||||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
|
||||
/* Metadata should be set here to allow translable labels */
|
||||
$this->metadata = [
|
||||
'dc:contributor' => [
|
||||
/* translators: Label for the dc:contributor field in the Dublin Core standard */
|
||||
'label' => __( 'Contributor', 'tainacan')
|
||||
],
|
||||
'dc:coverage' => [
|
||||
/* translators: Label for the dc:coverage field in the Dublin Core standard */
|
||||
'label' => __( 'Coverage', 'tainacan')
|
||||
],
|
||||
'dc:creator' => [
|
||||
/* translators: Label for the dc:creator field in the Dublin Core standard */
|
||||
'label' => __( 'Creator', 'tainacan')
|
||||
],
|
||||
'dc:date' => [
|
||||
/* translators: Label for the dc:date field in the Dublin Core standard */
|
||||
'label' => __( 'Date', 'tainacan'),
|
||||
'metadata_type' => 'date'
|
||||
],
|
||||
'dc:description' => [
|
||||
/* translators: Label for the dc:description field in the Dublin Core standard */
|
||||
'label' => __( 'Description', 'tainacan'),
|
||||
'core_metadatum' => 'description'
|
||||
],
|
||||
'dc:format' => [
|
||||
/* translators: Label for the dc:format field in the Dublin Core standard */
|
||||
'label' => __( 'Format', 'tainacan')
|
||||
],
|
||||
'dc:identifier' => [
|
||||
/* translators: Label for the dc:identifier field in the Dublin Core standard */
|
||||
'label' => __( 'Identifier', 'tainacan')
|
||||
],
|
||||
'dc:language' => [
|
||||
/* translators: Label for the dc:language field in the Dublin Core standard */
|
||||
'label' => __( 'Language', 'tainacan')
|
||||
],
|
||||
'dc:publisher' => [
|
||||
/* translators: Label for the dc:publisher field in the Dublin Core standard */
|
||||
'label' => __( 'Publisher', 'tainacan')
|
||||
],
|
||||
'dc:relation' => [
|
||||
/* translators: Label for the dc:relation field in the Dublin Core standard */
|
||||
'label' => __( 'Relation', 'tainacan')
|
||||
],
|
||||
'dc:rights' => [
|
||||
/* translators: Label for the dc:rights field in the Dublin Core standard */
|
||||
'label' => __( 'Rights', 'tainacan')
|
||||
],
|
||||
'dc:source' => [
|
||||
/* translators: Label for the dc:source field in the Dublin Core standard */
|
||||
'label' => __( 'Source', 'tainacan')
|
||||
],
|
||||
'dc:subject' => [
|
||||
/* translators: Label for the dc:subject field in the Dublin Core standard */
|
||||
'label' => __( 'Subject', 'tainacan')
|
||||
],
|
||||
'dc:title' => [
|
||||
/* translators: Label for the dc:title field in the Dublin Core standard */
|
||||
'label' => __( 'Title', 'tainacan'),
|
||||
'core_metadatum' => 'title'
|
||||
],
|
||||
'dc:type' => [
|
||||
/* translators: Label for the dc:type field in the Dublin Core standard */
|
||||
'label' => __( 'Type', 'tainacan')
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
}
|
|
@ -66,4 +66,5 @@ abstract class Mapper {
|
|||
return $url;
|
||||
}
|
||||
|
||||
function __construct() {}
|
||||
}
|
|
@ -137,7 +137,8 @@ class Mappers_Handler {
|
|||
* @return Mappers\Mapper|boolean false
|
||||
*/
|
||||
public static function get_mapper_from_request($request) {
|
||||
$body = json_decode( $request->get_body(), true );
|
||||
$data_body = $request->get_body() ?? '';
|
||||
$body = json_decode( $data_body, true );
|
||||
$Tainacan_Mappers = self::get_instance();
|
||||
$query_url_params = $request->get_query_params();
|
||||
|
||||
|
|
|
@ -29,6 +29,10 @@ class OAIPMH_Expose {
|
|||
var $token_valid;
|
||||
var $token_prefix;
|
||||
|
||||
protected $collection_repository;
|
||||
protected $item_repository;
|
||||
protected $repositoryIdentifier;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -20,6 +20,7 @@ class OAIPMH_List_Records extends OAIPMH_Expose {
|
|||
public $sets;
|
||||
public $metadataPrefix;
|
||||
|
||||
|
||||
/**
|
||||
* @signature CONSTRUTOR
|
||||
*
|
||||
|
@ -186,7 +187,7 @@ class OAIPMH_List_Records extends OAIPMH_Expose {
|
|||
$this->xml_creater->addChild($this->working_node, $key, '');
|
||||
}
|
||||
}
|
||||
}catch(Exception $e){
|
||||
}catch(\Exception $e){
|
||||
var_dump($e,$this->working_node,'dc:' . $key);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@ class Collections extends Repository {
|
|||
public $entities_type = '\Tainacan\Entities\Collection';
|
||||
|
||||
private static $instance = null;
|
||||
private $old_collection;
|
||||
private $old_core_title;
|
||||
private $old_core_description;
|
||||
|
||||
public static function get_instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
|
|
|
@ -70,8 +70,10 @@ class Item_Metadata extends Repository {
|
|||
if ( $unique ) {
|
||||
$item_metadata_value = $this->sanitize_value( $item_metadata->get_value() );
|
||||
if ( !is_numeric($item_metadata->get_value()) && empty( $item_metadata->get_value() ) ) {
|
||||
if ( $item_metadata->get_metadatum()->get_parent() > 0 )
|
||||
if ( $item_metadata->get_metadatum()->get_parent() > 0 ) {
|
||||
delete_metadata_by_mid( 'post', $item_metadata->get_meta_id() );
|
||||
$this->upclean_compound_value( $item_metadata);
|
||||
}
|
||||
else
|
||||
delete_post_meta( $item_metadata->get_item()->get_id(), $item_metadata->get_metadatum()->get_id() );
|
||||
} elseif ( is_int( $item_metadata->get_meta_id() ) ) {
|
||||
|
@ -205,7 +207,40 @@ class Item_Metadata extends Repository {
|
|||
|
||||
/**
|
||||
*
|
||||
* @return null|ind the meta id of the created compound metadata
|
||||
* @return null|int the meta id of the update compound metadata
|
||||
*/
|
||||
public function upclean_compound_value(Entities\Item_Metadata_Entity $item_metadata) {
|
||||
try {
|
||||
if ( ! $item_metadata->get_parent_meta_id() > 0 ) return null;
|
||||
$current_value = get_metadata_by_mid( 'post', $item_metadata->get_parent_meta_id() );
|
||||
if ( is_object( $current_value ) ) {
|
||||
$current_value = $current_value->meta_value;
|
||||
}
|
||||
if ( ! is_array( $current_value ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
global $wpdb;
|
||||
$meta_ids = implode(',', $current_value);
|
||||
$query = $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_ID IN ($meta_ids)", $item_metadata->get_item()->get_id() );
|
||||
|
||||
$rows = $wpdb->get_results($query, ARRAY_A );
|
||||
|
||||
if ( is_array( $rows ) ) {
|
||||
$upclean_values = array_map(function($row) {
|
||||
return intval($row['meta_id']);
|
||||
}, $rows);
|
||||
update_metadata_by_mid( 'post', $item_metadata->get_parent_meta_id(), $upclean_values );
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
error_log($e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return null|int the meta id of the created compound metadata
|
||||
*/
|
||||
public function add_compound_value( Entities\Item_Metadata_Entity $item_metadata, $meta_id ) {
|
||||
|
||||
|
@ -370,6 +405,8 @@ class Item_Metadata extends Repository {
|
|||
if ( empty($row['meta_value']) )
|
||||
continue;
|
||||
$value = $this->extract_compound_value( maybe_unserialize( $row['meta_value'] ), $item_metadata->get_item(), $row['meta_id'] );
|
||||
if ( empty($value) )
|
||||
continue;
|
||||
if ( $unique ) {
|
||||
$return_value = $value;
|
||||
break;
|
||||
|
|
|
@ -14,6 +14,7 @@ use \Respect\Validation\Validator as v;
|
|||
class Metadata extends Repository {
|
||||
public $entities_type = '\Tainacan\Entities\Metadatum';
|
||||
protected $default_metadata = 'default';
|
||||
protected $current_taxonomy;
|
||||
|
||||
public $metadata_types = [];
|
||||
|
||||
|
@ -1265,7 +1266,7 @@ class Metadata extends Repository {
|
|||
}
|
||||
|
||||
$search_q = '';
|
||||
$search = trim($args['search']);
|
||||
$search = trim($args['search'] ?? '');
|
||||
if (!empty($search)) {
|
||||
if( $metadatum_type === 'Tainacan\Metadata_Types\Relationship' ) {
|
||||
$search_q = $wpdb->prepare("AND meta_value IN ( SELECT ID FROM $wpdb->posts WHERE post_title LIKE %s )", '%' . $search . '%');
|
||||
|
@ -1384,7 +1385,7 @@ class Metadata extends Repository {
|
|||
}
|
||||
}
|
||||
|
||||
$number = ctype_digit($args['number']) && $args['number'] >=1 ? $args['number'] : $total;
|
||||
$number = ctype_digit((string)$args['number']) && $args['number'] >=1 ? $args['number'] : $total;
|
||||
if( $number < 1){
|
||||
$pages = 1;
|
||||
} else {
|
||||
|
@ -1401,8 +1402,10 @@ class Metadata extends Repository {
|
|||
$total_items = null;
|
||||
|
||||
if ( $args['count_items'] ) {
|
||||
$count_items_query = $args['items_filter'];
|
||||
$count_items_query['posts_per_page'] = 1;
|
||||
$count_items_query = array(
|
||||
'posts_per_page' => 1
|
||||
);
|
||||
$count_items_query = array_merge($args['items_filter'] != false ? $args['items_filter'] : [], $count_items_query);
|
||||
if ( !isset($count_items_query['tax_query']) ) {
|
||||
$count_items_query['tax_query'] = [];
|
||||
}
|
||||
|
@ -1448,7 +1451,7 @@ class Metadata extends Repository {
|
|||
|
||||
$results = $wpdb->get_col($query);
|
||||
$total = $wpdb->get_var($total_query);
|
||||
$number = ctype_digit($args['number']) && $args['number'] >=1 ? $args['number'] : $total;
|
||||
$number = ctype_digit((string)$args['number']) && $args['number'] >=1 ? $args['number'] : $total;
|
||||
if( $number < 1){
|
||||
$pages = 1;
|
||||
} else {
|
||||
|
@ -1485,7 +1488,7 @@ class Metadata extends Repository {
|
|||
|
||||
if ( $args['count_items'] ) {
|
||||
$count_items_query = $args['items_filter'];
|
||||
$count_items_query['posts_per_page'] = 1;
|
||||
$count_items_query['posts_per_page'] = (int)1;
|
||||
if ( !isset($count_items_query['meta_query']) ) {
|
||||
$count_items_query['meta_query'] = [];
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ abstract class Repository {
|
|||
* @throws \Exception
|
||||
*/
|
||||
public function insert( $obj ) {
|
||||
$obj_post_type = $obj->get_post_type();
|
||||
// validate
|
||||
$required_validation_statuses = ['publish', 'future', 'private'];
|
||||
if (in_array( $obj->get_status(), apply_filters( 'tainacan-status-require-validation', $required_validation_statuses) ) && ! $obj->get_validated() ) {
|
||||
|
@ -173,6 +174,9 @@ abstract class Repository {
|
|||
if ( ! $obj instanceof Entities\Log ) {
|
||||
$obj->WP_Post->post_title = $sanitized_title;
|
||||
$obj->WP_Post->post_content = $sanitized_desc;
|
||||
} else {
|
||||
$obj->WP_Post->post_title = $this->sanitize_value($obj->WP_Post->post_title);
|
||||
$obj->WP_Post->post_content = $this->sanitize_value($obj->WP_Post->post_content);
|
||||
}
|
||||
|
||||
$id = wp_insert_post( $obj->WP_Post );
|
||||
|
@ -941,6 +945,9 @@ abstract class Repository {
|
|||
}
|
||||
|
||||
protected function sanitize_value($content) {
|
||||
if( $content == null ) {
|
||||
return '';
|
||||
}
|
||||
if (is_numeric($content) || empty($content ) ) {
|
||||
return $content;
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ class Terms extends Repository {
|
|||
if ( $mapped['map'] != 'termmeta' ) {
|
||||
$get_ = 'get_' . $prop;
|
||||
|
||||
if ( $term->WP_Term->{$mapped['map']} ||
|
||||
if ( isset($term->WP_Term->{$mapped['map']}) ||
|
||||
($mapped['map'] == 'parent' && $term->WP_Term->{$mapped['map']} >= 0) ) {
|
||||
|
||||
$args[ $mapped['map'] ] = $term->$get_();
|
||||
|
|
|
@ -619,7 +619,7 @@ class Theme_Helper {
|
|||
// If in a collection page
|
||||
$collection = tainacan_get_collection($args);
|
||||
if ($collection) {
|
||||
$props .= "collection-id='" . $collection->get_id() . "' ";
|
||||
$props .= "data-collection-id='" . $collection->get_id() . "' ";
|
||||
$default_view_mode = $collection->get_default_view_mode();
|
||||
$enabled_view_modes = $collection->get_enabled_view_modes();
|
||||
$default_order = $collection->get_default_order();
|
||||
|
@ -632,19 +632,19 @@ class Theme_Helper {
|
|||
// If in a tainacan taxonomy
|
||||
$term = tainacan_get_term($args);
|
||||
if ($term) {
|
||||
$props .= "term-id='" . $term->term_id . "' ";
|
||||
$props .= "taxonomy='" . $term->taxonomy . "' ";
|
||||
$props .= "data-term-id='" . $term->term_id . "' ";
|
||||
$props .= "data-taxonomy='" . $term->taxonomy . "' ";
|
||||
}
|
||||
|
||||
$props .= "default-view-mode='" . $default_view_mode . "' ";
|
||||
$props .= "enabled-view-modes='" . implode(',', $enabled_view_modes) . "' ";
|
||||
$props .= "default-order='" . $default_order . "' ";
|
||||
$props .= "default-orderby='" . (is_array($default_orderby) ? json_encode($default_orderby) : $default_orderby) . "' ";
|
||||
$props .= "data-default-view-mode='" . $default_view_mode . "' ";
|
||||
$props .= "data-enabled-view-modes='" . implode(',', $enabled_view_modes) . "' ";
|
||||
$props .= "data-default-order='" . $default_order . "' ";
|
||||
$props .= "data-default-orderby='" . (is_array($default_orderby) ? json_encode($default_orderby) : $default_orderby) . "' ";
|
||||
|
||||
// Passes arguments to custom props
|
||||
foreach ($args as $key => $value) {
|
||||
if ($value == true || $value == 'true') {
|
||||
$props .= str_replace("_", "-", $key) . "='" . $value . "' ";
|
||||
$props .= 'data-' . str_replace("_", "-", $key) . "='" . $value . "' ";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -652,32 +652,32 @@ class Theme_Helper {
|
|||
'div' => [
|
||||
'id' => true,
|
||||
'data-module' => true,
|
||||
'collection-id' => true,
|
||||
'term-id' => true,
|
||||
'taxonomy' => true,
|
||||
'default-view-mode' => true,
|
||||
'is-forced-view-mode' => true,
|
||||
'enabled-view-modes' => true,
|
||||
'default-order' => true,
|
||||
'default-orderby' => true,
|
||||
'hide-filters' => true,
|
||||
'hide-hide-filters-button' => true,
|
||||
'hide-search' => true,
|
||||
'hide-advanced-search' => true,
|
||||
'hide-displayed-metadata-button' => true,
|
||||
'hide-sorting-area' => true,
|
||||
'hide-items-thumbnail' => true,
|
||||
'hide-sort-by-button' => true,
|
||||
'hide-exposers-button' => true,
|
||||
'hide-items-per-page-button' => true,
|
||||
'hide-go-to-page-button' => true,
|
||||
'hide-pagination-area' => true,
|
||||
'default-items-per-page' => true,
|
||||
'show-filters-button-inside-search-control' => true,
|
||||
'start-with-filters-hidden' => true,
|
||||
'filters-as-modal' => true,
|
||||
'show-inline-view-mode-options' => true,
|
||||
'show-fullscreen-with-view-modes' => true
|
||||
'data-collection-id' => true,
|
||||
'data-term-id' => true,
|
||||
'data-taxonomy' => true,
|
||||
'data-default-view-mode' => true,
|
||||
'data-is-forced-view-mode' => true,
|
||||
'data-enabled-view-modes' => true,
|
||||
'data-default-order' => true,
|
||||
'data-default-orderby' => true,
|
||||
'data-hide-filters' => true,
|
||||
'data-hide-hide-filters-button' => true,
|
||||
'data-hide-search' => true,
|
||||
'data-hide-advanced-search' => true,
|
||||
'data-hide-displayed-metadata-button' => true,
|
||||
'data-hide-sorting-area' => true,
|
||||
'data-hide-items-thumbnail' => true,
|
||||
'data-hide-sort-by-button' => true,
|
||||
'data-hide-exposers-button' => true,
|
||||
'data-hide-items-per-page-button' => true,
|
||||
'data-hide-go-to-page-button' => true,
|
||||
'data-hide-pagination-area' => true,
|
||||
'data-default-items-per-page' => true,
|
||||
'data-show-filters-button-inside-search-control' => true,
|
||||
'data-start-with-filters-hidden' => true,
|
||||
'data-filters-as-modal' => true,
|
||||
'data-show-inline-view-mode-options' => true,
|
||||
'data-show-fullscreen-with-view-modes' => true
|
||||
]
|
||||
];
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|||
*/
|
||||
trait Entity_Collection_Relation {
|
||||
|
||||
protected $collection;
|
||||
/**
|
||||
*
|
||||
* @return int collection item ID
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?php
|
||||
namespace Tainacan;
|
||||
|
||||
|
||||
|
||||
class Migrations {
|
||||
|
||||
|
||||
|
@ -509,6 +507,18 @@ class Migrations {
|
|||
);
|
||||
}
|
||||
|
||||
static function update_plugin_url_metadata_type_slug_to_core() {
|
||||
global $wpdb;
|
||||
// Brings plugin metadata type url to core
|
||||
$wpdb->update($wpdb->postmeta,
|
||||
['meta_value' => 'Tainacan\Metadata_Types\URL'],
|
||||
['meta_value' => 'TAINACAN_URL_Plugin_Metadata_Type'],
|
||||
'%s', '%s'
|
||||
);
|
||||
|
||||
if ( function_exists('deactivate_plugins') )
|
||||
\deactivate_plugins( 'tainacan-url-metadata-type/tainacan-metadata-type-url.php' );
|
||||
}
|
||||
|
||||
static function alter_table_tnc_bg_process_add_uuid() {
|
||||
global $wpdb;
|
||||
|
@ -525,6 +535,4 @@ class Migrations {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, vnmedeiros, tainacan, suelanesilva, ccaio, alanargomes, ateneagarcia123, rodrigo0freire, clarandreozzi
|
||||
Tags: museums, archives, GLAM, collections, repository
|
||||
Requires at least: 5.9
|
||||
Tested up to: 6.4
|
||||
Tested up to: 6.5
|
||||
Requires PHP: 7.0
|
||||
Stable tag: 0.20.8
|
||||
Stable tag: 0.21.0
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
|
|
|
@ -5,17 +5,17 @@ Plugin URI: https://tainacan.org/
|
|||
Description: Open source, powerful and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional repository platform.
|
||||
Author: Tainacan.org
|
||||
Author URI: https://tainacan.org/
|
||||
Version: 0.20.8
|
||||
Version: 0.21.0
|
||||
Requires at least: 5.9
|
||||
Tested up to: 6.4
|
||||
Tested up to: 6.5
|
||||
Requires PHP: 7.0
|
||||
Stable tag: 0.20.8
|
||||
Stable tag: 0.21.0
|
||||
Text Domain: tainacan
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
const TAINACAN_VERSION = '0.20.8';
|
||||
const TAINACAN_VERSION = '0.21.0';
|
||||
|
||||
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
||||
$TAINACAN_BASE_URL = plugins_url('', __FILE__);
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
:is-menu-compressed="isMenuCompressed" />
|
||||
<button
|
||||
v-if="!$adminOptions.hidePrimaryMenu && !$adminOptions.hidePrimaryMenuCompressButton"
|
||||
class="is-hidden-mobile"
|
||||
id="menu-compress-button"
|
||||
class="is-hidden-mobile"
|
||||
:style="{ top: menuCompressButtonTop }"
|
||||
@click="isMenuCompressed = !isMenuCompressed"
|
||||
:aria-label="$i18n.get('label_shrink_menu')">
|
||||
:aria-label="$i18n.get('label_shrink_menu')"
|
||||
@click="isMenuCompressed = !isMenuCompressed">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('label_shrink_menu'),
|
||||
|
@ -54,7 +54,6 @@
|
|||
import TainacanHeader from './components/navigation/tainacan-header.vue';
|
||||
import TainacanRepositorySubheader from './components/navigation/tainacan-repository-subheader.vue';
|
||||
import CustomDialog from './components/other/custom-dialog.vue';
|
||||
import "floating-vue/dist/style.css";
|
||||
|
||||
export default {
|
||||
name: "AdminPage",
|
||||
|
@ -63,6 +62,10 @@
|
|||
TainacanHeader,
|
||||
TainacanRepositorySubheader
|
||||
},
|
||||
emits: [
|
||||
'onCollectionBreadCrumbUpdate',
|
||||
'openProcessesPopup'
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
isMenuCompressed: false,
|
||||
|
@ -92,10 +95,13 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
'$route' (to) {
|
||||
'$route': {
|
||||
handler(to) {
|
||||
this.isMenuCompressed = (to.params.collectionId != undefined);
|
||||
this.activeRoute = to.name;
|
||||
this.isRepositoryLevel = this.$route.params.collectionId == undefined;
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -139,6 +145,7 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import url('floating-vue/dist/style.css');
|
||||
|
||||
.is-fullheight {
|
||||
height: 100%;
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
:message="$i18n.getHelperMessage('collections', 'name')" />
|
||||
<b-input
|
||||
id="tainacan-text-name"
|
||||
:placeholder="$i18n.get('instruction_collection_name')"
|
||||
v-model="form.name"
|
||||
:placeholder="$i18n.get('instruction_collection_name')"
|
||||
@blur="updateSlug"
|
||||
@focus="clearErrors('name')" />
|
||||
</b-field>
|
||||
|
@ -34,8 +34,8 @@
|
|||
<!-- Hook for extra Form options -->
|
||||
<template v-if="hasBeginLeftForm">
|
||||
<form
|
||||
class="form-hook-region"
|
||||
id="form-collection-begin-left"
|
||||
class="form-hook-region"
|
||||
v-html="getBeginLeftForm" />
|
||||
</template>
|
||||
|
||||
|
@ -50,10 +50,10 @@
|
|||
:message="$i18n.getHelperMessage('collections', 'description')" />
|
||||
<b-input
|
||||
id="tainacan-text-description"
|
||||
v-model="form.description"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
:placeholder="$i18n.get('instruction_collection_description')"
|
||||
v-model="form.description"
|
||||
@focus="clearErrors('description')" />
|
||||
</b-field>
|
||||
|
||||
|
@ -68,17 +68,17 @@
|
|||
:message="$i18n.getHelperMessage('collections', 'slug')" />
|
||||
<b-input
|
||||
id="tainacan-text-slug"
|
||||
@input="updateSlug"
|
||||
v-model="form.slug"
|
||||
@focus="clearErrors('slug')"
|
||||
:disabled="isUpdatingSlug"
|
||||
:loading="isUpdatingSlug"/>
|
||||
:loading="isUpdatingSlug"
|
||||
@update:model-value="updateSlug"
|
||||
@focus="clearErrors('slug')" />
|
||||
</b-field>
|
||||
|
||||
<!-- Items list options ------------------------ -->
|
||||
<div
|
||||
@click="showItemsListOptions = !showItemsListOptions;"
|
||||
class="collection-form-section">
|
||||
class="collection-form-section"
|
||||
@click="showItemsListOptions = !showItemsListOptions;">
|
||||
<span class="icon">
|
||||
<i
|
||||
class="tainacan-icon"
|
||||
|
@ -126,14 +126,14 @@
|
|||
{{ $i18n.get('info_by_inner') }}
|
||||
</span>
|
||||
<b-select
|
||||
expanded
|
||||
:loading="isLoadingMetadata"
|
||||
id="tainacan-select-default_orderby"
|
||||
v-model="localDefaultOrderBy"
|
||||
id="tainacan-select-default_orderby">
|
||||
expanded
|
||||
:loading="isLoadingMetadata">
|
||||
<option
|
||||
v-for="metadatum of sortingMetadata"
|
||||
:value="metadatum.id"
|
||||
:key="metadatum.id">
|
||||
:key="metadatum.id"
|
||||
:value="metadatum.id">
|
||||
{{ metadatum.name }}
|
||||
</option>
|
||||
</b-select>
|
||||
|
@ -152,16 +152,16 @@
|
|||
:message="$i18n.getHelperMessage('collections', 'enabled_view_modes')" />
|
||||
<div class="control">
|
||||
<b-dropdown
|
||||
class="enabled-view-modes-dropdown"
|
||||
ref="enabledViewModesDropdown"
|
||||
class="enabled-view-modes-dropdown"
|
||||
:mobile-modal="true"
|
||||
:disabled="Object.keys(registeredViewModes).length < 0"
|
||||
aria-role="list"
|
||||
trap-focus
|
||||
position="is-top-right">
|
||||
<template #trigger>
|
||||
<button
|
||||
class="button is-white"
|
||||
slot="trigger"
|
||||
position="is-top-right"
|
||||
type="button">
|
||||
<span>{{ $i18n.get('label_enabled_view_modes') }}</span>
|
||||
|
@ -169,6 +169,7 @@
|
|||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
<b-dropdown-item
|
||||
v-for="(viewMode, index) in Object.keys(registeredViewModes)"
|
||||
:key="index"
|
||||
|
@ -176,9 +177,9 @@
|
|||
aria-role="listitem">
|
||||
<b-checkbox
|
||||
v-if="registeredViewModes[viewMode] != undefined"
|
||||
@input="updateViewModeslist(viewMode)"
|
||||
:value="checkIfViewModeEnabled(viewMode)"
|
||||
:disabled="checkIfViewModeEnabled(viewMode) && form.enabled_view_modes.filter((aViewMode) => (registeredViewModes[aViewMode] && registeredViewModes[aViewMode].full_screen != true)).length <= 1">
|
||||
:model-value="checkIfViewModeEnabled(viewMode)"
|
||||
:disabled="checkIfViewModeEnabled(viewMode) && form.enabled_view_modes.filter((aViewMode) => (registeredViewModes[aViewMode] && registeredViewModes[aViewMode].full_screen != true)).length <= 1"
|
||||
@update:model-value="updateViewModeslist(viewMode)">
|
||||
<p>
|
||||
<strong>
|
||||
<span
|
||||
|
@ -191,7 +192,9 @@
|
|||
{{ registeredViewModes[viewMode].label }}
|
||||
</strong>
|
||||
</p>
|
||||
<p v-if="registeredViewModes[viewMode].description">{{ registeredViewModes[viewMode].description }}</p>
|
||||
<p v-if="registeredViewModes[viewMode].description">
|
||||
{{ registeredViewModes[viewMode].description }}
|
||||
</p>
|
||||
</b-checkbox>
|
||||
</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
|
@ -209,9 +212,9 @@
|
|||
:title="$i18n.getHelperTitle('collections', 'default_view_mode')"
|
||||
:message="$i18n.getHelperMessage('collections', 'default_view_mode')" />
|
||||
<b-select
|
||||
expanded
|
||||
id="tainacan-select-default_view_mode"
|
||||
v-model="form.default_view_mode"
|
||||
expanded
|
||||
@focus="clearErrors('default_view_mode')">
|
||||
<option
|
||||
v-for="(viewMode, index) of validDefaultViewModes"
|
||||
|
@ -230,10 +233,10 @@
|
|||
|
||||
<b-switch
|
||||
id="tainacan-checkbox-hide-items-thumbnail-on-lists"
|
||||
v-model="form.hide_items_thumbnail_on_lists"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
v-model="form.hide_items_thumbnail_on_lists" />
|
||||
false-value="no" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'hide_items_thumbnail_on_lists')"
|
||||
:message="$i18n.getHelperMessage('collections', 'hide_items_thumbnail_on_lists')" />
|
||||
|
@ -244,8 +247,8 @@
|
|||
|
||||
<!-- Item edition form options ------------------------ -->
|
||||
<div
|
||||
@click="showItemEditionFormOptions = !showItemEditionFormOptions;"
|
||||
class="collection-form-section">
|
||||
class="collection-form-section"
|
||||
@click="showItemEditionFormOptions = !showItemEditionFormOptions;">
|
||||
<span class="icon">
|
||||
<i
|
||||
class="tainacan-icon"
|
||||
|
@ -304,10 +307,10 @@
|
|||
|
||||
<b-switch
|
||||
id="tainacan-checkbox-item-enable-thumbnail"
|
||||
v-model="form.item_enable_thumbnail"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
v-model="form.item_enable_thumbnail" />
|
||||
false-value="no" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'item_enable_thumbnail')"
|
||||
:message="$i18n.getHelperMessage('collections', 'item_enable_thumbnail')" />
|
||||
|
@ -335,10 +338,10 @@
|
|||
|
||||
<b-switch
|
||||
id="tainacan-checkbox-item-enable-attachments"
|
||||
v-model="form.item_enable_attachments"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
v-model="form.item_enable_attachments" />
|
||||
false-value="no" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'item_enable_attachments')"
|
||||
:message="$i18n.getHelperMessage('collections', 'item_enable_attachments')" />
|
||||
|
@ -403,10 +406,10 @@
|
|||
|
||||
<b-switch
|
||||
id="tainacan-checkbox-comment-status"
|
||||
v-model="form.allow_comments"
|
||||
size="is-small"
|
||||
true-value="open"
|
||||
false-value="closed"
|
||||
v-model="form.allow_comments" />
|
||||
false-value="closed" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'allow_comments')"
|
||||
:message="$i18n.getHelperMessage('collections', 'allow_comments')" />
|
||||
|
@ -417,8 +420,8 @@
|
|||
|
||||
<!-- Item submission options ------------------------ -->
|
||||
<div
|
||||
@click="showItemSubmissionOptions = !showItemSubmissionOptions;"
|
||||
class="collection-form-section">
|
||||
class="collection-form-section"
|
||||
@click="showItemSubmissionOptions = !showItemSubmissionOptions;">
|
||||
<span class="icon">
|
||||
<i
|
||||
class="tainacan-icon"
|
||||
|
@ -442,10 +445,10 @@
|
|||
|
||||
<b-switch
|
||||
id="tainacan-checkbox-allow-submission"
|
||||
v-model="form.allows_submission"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
v-model="form.allows_submission" />
|
||||
false-value="no" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'allows_submission')"
|
||||
:message="$i18n.getHelperMessage('collections', 'allows_submission')" />
|
||||
|
@ -465,10 +468,10 @@
|
|||
|
||||
<b-switch
|
||||
id="tainacan-checkbox-allow-submission"
|
||||
v-model="form.submission_anonymous_user"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
v-model="form.submission_anonymous_user" />
|
||||
false-value="no" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'submission_anonymous_user')"
|
||||
:message="$i18n.getHelperMessage('collections', 'submission_anonymous_user')" />
|
||||
|
@ -485,9 +488,9 @@
|
|||
:message="$i18n.getHelperMessage('collections', 'submission_default_status')" />
|
||||
<div class="options-checkboxes">
|
||||
<b-radio
|
||||
v-model="form.submission_default_status"
|
||||
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'trash')"
|
||||
:key="index"
|
||||
v-model="form.submission_default_status"
|
||||
:native-value="statusOption.slug">
|
||||
<span class="icon has-text-gray">
|
||||
<i
|
||||
|
@ -499,8 +502,8 @@
|
|||
</div>
|
||||
<transition name="filter-item">
|
||||
<p
|
||||
class="help"
|
||||
v-if="form.submission_default_status == 'draft'">
|
||||
v-if="form.submission_default_status == 'draft'"
|
||||
class="help">
|
||||
{{ $i18n.get('info_item_submission_draft_status') }}
|
||||
</p>
|
||||
</transition>
|
||||
|
@ -515,10 +518,10 @@
|
|||
|
||||
<b-switch
|
||||
id="tainacan-checkbox-submission-use-recaptcha"
|
||||
v-model="form.submission_use_recaptcha"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
v-model="form.submission_use_recaptcha" />
|
||||
false-value="no" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'submission_use_recaptcha')"
|
||||
:message="$i18n.getHelperMessage('collections', 'submission_use_recaptcha')" />
|
||||
|
@ -537,8 +540,8 @@
|
|||
<!-- Hook for extra Form options -->
|
||||
<template v-if="hasEndLeftForm">
|
||||
<form
|
||||
ref="form-collection-end-left"
|
||||
id="form-collection-end-left"
|
||||
ref="form-collection-end-left"
|
||||
class="form-hook-region"
|
||||
v-html="getEndLeftForm" />
|
||||
</template>
|
||||
|
@ -557,9 +560,9 @@
|
|||
:message="$i18n.getHelperMessage('collections', 'status')" />
|
||||
<div class="status-radios">
|
||||
<b-radio
|
||||
v-model="form.status"
|
||||
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'draft')"
|
||||
:key="index"
|
||||
v-model="form.status"
|
||||
:native-value="statusOption.slug">
|
||||
<span class="icon has-text-gray">
|
||||
<i
|
||||
|
@ -600,8 +603,8 @@
|
|||
</figure>
|
||||
<div class="header-buttons-row">
|
||||
<a
|
||||
class="button is-rounded is-secondary"
|
||||
id="button-edit-header-image"
|
||||
class="button is-rounded is-secondary"
|
||||
:aria-label="$i18n.get('label_button_edit_header_image')"
|
||||
@click="headerImageMediaFrame.openFrame($event)">
|
||||
<span
|
||||
|
@ -616,8 +619,8 @@
|
|||
</span>
|
||||
</a>
|
||||
<a
|
||||
class="button is-rounded is-secondary"
|
||||
id="button-delete-header-image"
|
||||
class="button is-rounded is-secondary"
|
||||
:aria-label="$i18n.get('label_button_delete_thumb')"
|
||||
@click="deleteHeaderImage()">
|
||||
<span
|
||||
|
@ -657,8 +660,8 @@
|
|||
</figure>
|
||||
<div class="thumbnail-buttons-row">
|
||||
<a
|
||||
class="button is-rounded is-secondary"
|
||||
id="button-edit-thumbnail"
|
||||
class="button is-rounded is-secondary"
|
||||
:aria-label="$i18n.get('label_button_edit_thumb')"
|
||||
@click.prevent="thumbnailMediaFrame.openFrame($event)">
|
||||
<span
|
||||
|
@ -673,8 +676,8 @@
|
|||
</span>
|
||||
</a>
|
||||
<a
|
||||
class="button is-rounded is-secondary"
|
||||
id="button-delete-header-image"
|
||||
class="button is-rounded is-secondary"
|
||||
:aria-label="$i18n.get('label_button_delete_thumb')"
|
||||
@click="deleteThumbnail()">
|
||||
<span
|
||||
|
@ -701,30 +704,32 @@
|
|||
|
||||
<b-switch
|
||||
id="tainacan-checkbox-cover-page"
|
||||
v-model="form.enable_cover_page"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
v-model="form.enable_cover_page" />
|
||||
false-value="no" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'cover_page_id')"
|
||||
:message="$i18n.getHelperMessage('collections', 'cover_page_id')" />
|
||||
<template v-if="form.enable_cover_page == 'yes'">
|
||||
<b-autocomplete
|
||||
v-if="coverPage == undefined || coverPage.title == undefined"
|
||||
id="tainacan-text-cover-page"
|
||||
v-model="coverPageTitle"
|
||||
:placeholder="$i18n.get('instruction_cover_page')"
|
||||
:data="coverPages"
|
||||
v-model="coverPageTitle"
|
||||
@select="onSelectCoverPage($event)"
|
||||
:loading="isFetchingPages"
|
||||
@input="fecthCoverPages"
|
||||
@focus="clearErrors('cover_page_id')"
|
||||
v-if="coverPage == undefined || coverPage.title == undefined"
|
||||
check-infinite-scroll
|
||||
@select="onSelectCoverPage($event)"
|
||||
@update:model-value="fecthCoverPages"
|
||||
@focus="clearErrors('cover_page_id')"
|
||||
@infinite-scroll="fetchMoreCoverPages">
|
||||
<template slot-scope="props">
|
||||
<template #default="props">
|
||||
{{ props.option.title.rendered }}
|
||||
</template>
|
||||
<template slot="empty">{{ $i18n.get('info_no_page_found') }}</template>
|
||||
<template #empty>
|
||||
{{ $i18n.get('info_no_page_found') }}
|
||||
</template>
|
||||
</b-autocomplete>
|
||||
|
||||
<div
|
||||
|
@ -844,28 +849,30 @@
|
|||
type="button"
|
||||
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
||||
</div>
|
||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
||||
<p class="help is-danger">
|
||||
{{ formErrorMessage }}
|
||||
</p>
|
||||
<div
|
||||
style="margin-left: auto;"
|
||||
class="control">
|
||||
<button
|
||||
v-if="isNewCollection && $userCaps.hasCapability('tnc_rep_edit_metadata') && !fromImporter"
|
||||
id="button-submit-goto-metadata"
|
||||
@click.prevent="onSubmit('metadata')"
|
||||
class="button is-secondary">{{ $i18n.get('label_save_goto_metadata') }}</button>
|
||||
class="button is-secondary"
|
||||
@click.prevent="onSubmit('metadata')">{{ $i18n.get('label_save_goto_metadata') }}</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button
|
||||
v-if="isNewCollection && $userCaps.hasCapability('tnc_rep_edit_metadata') && !fromImporter"
|
||||
id="button-submit-goto-filter"
|
||||
@click.prevent="onSubmit('filters')"
|
||||
class="button is-secondary">{{ $i18n.get('label_save_goto_filter') }}</button>
|
||||
class="button is-secondary"
|
||||
@click.prevent="onSubmit('filters')">{{ $i18n.get('label_save_goto_filter') }}</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button
|
||||
id="button-submit-collection-creation"
|
||||
@click.prevent="onSubmit('items')"
|
||||
class="button is-success">{{ $i18n.get('finish') }}</button>
|
||||
class="button is-success"
|
||||
@click.prevent="onSubmit('items')">{{ $i18n.get('finish') }}</button>
|
||||
</div>
|
||||
</footer>
|
||||
</form>
|
||||
|
@ -884,26 +891,27 @@
|
|||
</div>
|
||||
|
||||
<b-loading
|
||||
:active.sync="isLoading"
|
||||
v-model="isLoading"
|
||||
:can-cancel="false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { nextTick } from 'vue';
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
import wpMediaFrames from '../../js/wp-media-frames';
|
||||
import FileItem from '../other/file-item.vue';
|
||||
import { wpAjax, formHooks } from '../../js/mixins';
|
||||
import { permalinkGetter, formHooks } from '../../js/mixins';
|
||||
|
||||
export default {
|
||||
name: 'CollectionEditionForm',
|
||||
components: {
|
||||
FileItem
|
||||
},
|
||||
mixins: [ wpAjax, formHooks ],
|
||||
mixins: [ permalinkGetter, formHooks ],
|
||||
data(){
|
||||
return {
|
||||
collectionId: Number,
|
||||
collectionId: [String, Number],
|
||||
collection: null,
|
||||
isLoading: false,
|
||||
form: {
|
||||
|
@ -1027,7 +1035,7 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted(){
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('settings') }]);
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('settings') }]);
|
||||
|
||||
|
||||
if (this.$route.query.fromImporter != undefined)
|
||||
|
@ -1050,7 +1058,7 @@ export default {
|
|||
|
||||
// Initializes Media Frames now that collectonId exists
|
||||
this.initializeMediaFrames();
|
||||
this.$nextTick()
|
||||
nextTick()
|
||||
.then(() => {
|
||||
// Fills hook forms with it's real values
|
||||
this.updateExtraFormData(this.collection);
|
||||
|
@ -1300,7 +1308,7 @@ export default {
|
|||
this.form.default_view_mode = this.collection.default_view_mode;
|
||||
this.form.default_order = this.collection.default_order;
|
||||
this.form.default_orderby = this.collection.default_orderby;
|
||||
this.form.enabled_view_modes = [];
|
||||
this.form.enabled_view_modes = this.collection.enabled_view_modes;
|
||||
this.form.allow_comments = this.collection.allow_comments;
|
||||
this.form.allows_submission = this.collection.allows_submission;
|
||||
this.form.submission_anonymous_user = this.collection.submission_anonymous_user;
|
||||
|
@ -1715,7 +1723,7 @@ export default {
|
|||
font-size: 0.8em;
|
||||
}
|
||||
img,
|
||||
/deep/ .image-wrapper {
|
||||
:deep(.image-wrapper) {
|
||||
height: 146px;
|
||||
width: 146px;
|
||||
border: 6px solid var(--tainacan-background-color);
|
||||
|
@ -1794,7 +1802,8 @@ export default {
|
|||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
justify-content: space-between;
|
||||
/deep/ .b-checkbox.checkbox {
|
||||
:deep(.b-checkbox.checkbox),
|
||||
:deep(.b-radio.radio) {
|
||||
width: auto
|
||||
}
|
||||
.control-label {
|
||||
|
@ -1836,13 +1845,13 @@ export default {
|
|||
position: relative;
|
||||
z-index: 101;
|
||||
|
||||
/deep/ .dropdown-item {
|
||||
:deep(.dropdown-item) {
|
||||
display: flex !important;
|
||||
}
|
||||
p {
|
||||
white-space: normal;
|
||||
}
|
||||
/deep/ svg {
|
||||
:deep(svg) {
|
||||
margin-left: -2px;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
{ path: '', label: exporterType != undefined ? (exporterName != undefined ? exporterName : exporterType) : $i18n.get('title_exporter_page') }
|
||||
]" />
|
||||
<b-loading
|
||||
:active.sync="isLoading"
|
||||
v-model="isLoading"
|
||||
:can-cancel="false" />
|
||||
<form
|
||||
@click="formErrorMessage = ''"
|
||||
label-width="120px"
|
||||
v-if="exporterSession"
|
||||
class="tainacan-form">
|
||||
label-width="120px"
|
||||
class="tainacan-form"
|
||||
@click="formErrorMessage = ''">
|
||||
<div class="columns">
|
||||
|
||||
<div class="column is-gapless">
|
||||
|
@ -34,38 +34,38 @@
|
|||
extra-classes="tainacan-repository-tooltip" />
|
||||
<br>
|
||||
<b-select
|
||||
@input="formErrorMessage = null"
|
||||
expanded
|
||||
v-model="selectedCollection"
|
||||
expanded
|
||||
:loading="isFetchingCollections"
|
||||
:placeholder="$i18n.get('instruction_select_a_collection')">
|
||||
:placeholder="$i18n.get('instruction_select_a_collection')"
|
||||
@update:model-value="formErrorMessage = null">
|
||||
<option
|
||||
v-for="collection in collections"
|
||||
:value="collection.id"
|
||||
:key="collection.id">
|
||||
:key="collection.id"
|
||||
:value="collection.id">
|
||||
{{ collection.name }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
|
||||
<b-field
|
||||
class="is-block"
|
||||
v-if="Object.keys(exporterSession).length &&
|
||||
Object.keys(exporterSession.mapping_accept).length &&
|
||||
exporterSession.mapping_list.length"
|
||||
class="is-block"
|
||||
:label="$i18n.get('mapping')">
|
||||
<b-select
|
||||
@input="formErrorMessage = null"
|
||||
expanded
|
||||
v-model="selectedMapping"
|
||||
:placeholder="$i18n.get('instruction_select_a_mapper')">
|
||||
expanded
|
||||
:placeholder="$i18n.get('instruction_select_a_mapper')"
|
||||
@update:model-value="formErrorMessage = null">
|
||||
<option
|
||||
v-if="exporterSession.accept_no_mapping"
|
||||
:value="''">{{ $i18n.get('label_no_mapping') }}</option>
|
||||
<option
|
||||
v-for="(mapping) in exporterSession.mapping_list"
|
||||
:value="mapping"
|
||||
:key="mapping">
|
||||
:key="mapping"
|
||||
:value="mapping">
|
||||
{{ mapping.replace(/-/, ' ') }}
|
||||
</option>
|
||||
</b-select>
|
||||
|
@ -79,10 +79,10 @@
|
|||
:message="'<span>' + $i18n.get('info_send_email') + ` <a href='` + adminFullURL + $routerHelper.getProcessesPage() + `'>` + $i18n.get('activities') + ` ` + $i18n.get('label_page') + '</a></span>'"
|
||||
extra-classes="tainacan-repository-tooltip" />
|
||||
<b-checkbox
|
||||
v-model="sendEmail"
|
||||
true-value="1"
|
||||
false-value="0"
|
||||
v-model="sendEmail"
|
||||
@input="formErrorMessage = null">
|
||||
@update:model-value="formErrorMessage = null">
|
||||
{{ $i18n.get('label_yes') }}
|
||||
</b-checkbox>
|
||||
</b-field>
|
||||
|
@ -93,17 +93,17 @@
|
|||
|
||||
<div class="column">
|
||||
<button
|
||||
@click.prevent="$router.go(-1)"
|
||||
class="button is-pulled-left is-outlined">
|
||||
class="button is-pulled-left is-outlined"
|
||||
@click.prevent="$router.go(-1)">
|
||||
{{ $i18n.get('cancel') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="column">
|
||||
<button
|
||||
:class="{'is-loading': runButtonLoading}"
|
||||
@click.prevent="runExporter()"
|
||||
:disabled="!formIsValid()"
|
||||
class="button is-pulled-right is-success">
|
||||
class="button is-pulled-right is-success"
|
||||
@click.prevent="runExporter()">
|
||||
{{ $i18n.get('run') }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
:message="$i18n.getHelperMessage('filters', 'description')" />
|
||||
</label>
|
||||
<b-input
|
||||
v-model="form.description"
|
||||
type="textarea"
|
||||
name="description"
|
||||
:rows="3"
|
||||
v-model="form.description"
|
||||
@focus="clearErrors('description')" />
|
||||
</b-field>
|
||||
|
||||
|
@ -61,11 +61,11 @@
|
|||
</label>
|
||||
<div class="inline-block">
|
||||
<b-radio
|
||||
@focus="clearErrors('label_status')"
|
||||
id="tainacan-select-status-publish"
|
||||
name="status"
|
||||
v-model="form.status"
|
||||
native-value="publish">
|
||||
name="status"
|
||||
native-value="publish"
|
||||
@focus="clearErrors('label_status')">
|
||||
<span class="icon has-text-gray3">
|
||||
<i class="tainacan-icon tainacan-icon-public" />
|
||||
</span>
|
||||
|
@ -73,11 +73,11 @@
|
|||
</b-radio>
|
||||
<br>
|
||||
<b-radio
|
||||
@focus="clearErrors('label_status')"
|
||||
id="tainacan-select-status-private"
|
||||
name="status"
|
||||
v-model="form.status"
|
||||
native-value="private">
|
||||
name="status"
|
||||
native-value="private"
|
||||
@focus="clearErrors('label_status')">
|
||||
<span class="icon has-text-gray3">
|
||||
<i class="tainacan-icon tainacan-icon-private" />
|
||||
</span>
|
||||
|
@ -87,8 +87,8 @@
|
|||
</b-field>
|
||||
|
||||
<b-field
|
||||
:addons="false"
|
||||
v-if="form.filter_type_object && form.filter_type_object.use_max_options">
|
||||
v-if="form.filter_type_object && form.filter_type_object.use_max_options"
|
||||
:addons="false">
|
||||
<label class="label is-inline">
|
||||
{{ $i18n.get('label_max_options_to_show') }}
|
||||
<help-button
|
||||
|
@ -100,12 +100,18 @@
|
|||
v-if="!showEditMaxOptions"
|
||||
class="is-flex">
|
||||
<b-select
|
||||
name="max_options"
|
||||
v-model="form.max_options"
|
||||
name="max_options"
|
||||
:placeholder="$i18n.get('instruction_select_max_options_to_show')">
|
||||
<option value="4">4</option>
|
||||
<option value="8">8</option>
|
||||
<option value="12">12</option>
|
||||
<option value="4">
|
||||
4
|
||||
</option>
|
||||
<option value="8">
|
||||
8
|
||||
</option>
|
||||
<option value="12">
|
||||
12
|
||||
</option>
|
||||
<option
|
||||
v-if="form.max_options && ![4,8,12].find( (element) => element == form.max_options )"
|
||||
:value="form.max_options">
|
||||
|
@ -131,13 +137,13 @@
|
|||
v-if="showEditMaxOptions"
|
||||
class="is-flex">
|
||||
<b-input
|
||||
name="max_options"
|
||||
v-model="form.max_options"
|
||||
name="max_options"
|
||||
type="number"
|
||||
step="1" />
|
||||
<button
|
||||
@click.prevent="showEditMaxOptions = false"
|
||||
class="button is-white is-pulled-right">
|
||||
class="button is-white is-pulled-right"
|
||||
@click.prevent="showEditMaxOptions = false">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('close'),
|
||||
|
@ -159,13 +165,13 @@
|
|||
:message="formErrors['begin_with_filter_collapsed'] != undefined ? formErrors['begin_with_filter_collapsed'] : ''">
|
||||
|
||||
<b-switch
|
||||
size="is-small"
|
||||
@input="clearErrors('begin_with_filter_collapsed')"
|
||||
v-model="form.begin_with_filter_collapsed"
|
||||
size="is-small"
|
||||
:true-value="'yes'"
|
||||
:false-value="'no'"
|
||||
:native-value="form.begin_with_filter_collapsed == 'yes' ? 'yes' : 'no'"
|
||||
name="begin_with_filter_collapsed">
|
||||
name="begin_with_filter_collapsed"
|
||||
@update:model-value="clearErrors('begin_with_filter_collapsed')">
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('filters', 'begin_with_filter_collapsed')"
|
||||
:message="$i18n.getHelperMessage('filters', 'begin_with_filter_collapsed')"
|
||||
|
@ -181,13 +187,13 @@
|
|||
:message="formErrors['display_in_repository_level_lists'] != undefined ? formErrors['display_in_repository_level_lists'] : ''">
|
||||
|
||||
<b-switch
|
||||
size="is-small"
|
||||
@input="clearErrors('display_in_repository_level_lists')"
|
||||
v-model="form.display_in_repository_level_lists"
|
||||
size="is-small"
|
||||
:true-value="'yes'"
|
||||
:false-value="'no'"
|
||||
:native-value="form.display_in_repository_level_lists == 'yes' ? 'yes' : 'no'"
|
||||
name="display_in_repository_level_lists">
|
||||
name="display_in_repository_level_lists"
|
||||
@update:model-value="clearErrors('display_in_repository_level_lists')">
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('filters', 'display_in_repository_level_lists')"
|
||||
:message="$i18n.getHelperMessage('filters', 'display_in_repository_level_lists')"
|
||||
|
@ -196,14 +202,14 @@
|
|||
</b-field>
|
||||
|
||||
<component
|
||||
:errors="formErrors['filter_type_options']"
|
||||
v-if="(form.filter_type_object && form.filter_type_object.form_component) || form.edit_form == ''"
|
||||
:is="form.filter_type_object.form_component"
|
||||
:filter="form"
|
||||
v-model="form.filter_type_options"/>
|
||||
v-if="(form.filter_type_object && form.filter_type_object.form_component) || form.edit_form == ''"
|
||||
v-model="form.filter_type_options"
|
||||
:errors="formErrors['filter_type_options']"
|
||||
:filter="form" />
|
||||
<div
|
||||
v-html="form.edit_form"
|
||||
v-else/>
|
||||
v-else
|
||||
v-html="form.edit_form" />
|
||||
|
||||
<!-- Hook for extra Form options -->
|
||||
<template v-if="hasEndLeftForm">
|
||||
|
@ -219,8 +225,9 @@
|
|||
<button
|
||||
type="button"
|
||||
class="button is-outlined"
|
||||
@click.prevent="cancelEdition()"
|
||||
slot="trigger">{{ $i18n.get('cancel') }}</button>
|
||||
@click.prevent="cancelEdition()">
|
||||
{{ $i18n.get('cancel') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<b-button
|
||||
|
@ -231,22 +238,41 @@
|
|||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
||||
<p class="help is-danger">
|
||||
{{ formErrorMessage }}
|
||||
</p>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { nextTick } from 'vue';
|
||||
import { mapActions } from 'vuex';
|
||||
import { formHooks } from "../../js/mixins";
|
||||
|
||||
import FormFilterNumeric from '../filter-types/numeric/FormNumeric.vue';
|
||||
import FormFilterNumericInterval from '../filter-types/numeric-interval/FormNumericInterval.vue';
|
||||
import FormFilterNumericListInterval from '../filter-types/numeric-list-interval/FormNumericListInterval.vue';
|
||||
|
||||
export default {
|
||||
name: 'FilterEditionForm',
|
||||
components: {
|
||||
'tainacan-filter-form-numeric': FormFilterNumeric,
|
||||
'tainacan-filter-form-numeric-interval': FormFilterNumericInterval,
|
||||
'tainacan-filter-form-numeric-list-interval': FormFilterNumericListInterval
|
||||
},
|
||||
mixins: [ formHooks ],
|
||||
props: {
|
||||
index: '',
|
||||
editedFilter: Object,
|
||||
originalFilter: Object,
|
||||
isRepositoryLevel: Boolean
|
||||
},
|
||||
emits: [
|
||||
'on-update-saved-state',
|
||||
'on-edition-finished',
|
||||
'on-edition-canceled',
|
||||
'on-error-found'
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
form: {},
|
||||
|
@ -259,7 +285,6 @@ export default {
|
|||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
this.form = this.editedFilter;
|
||||
|
@ -270,20 +295,20 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
// Fills hook forms with it's real values
|
||||
this.$nextTick()
|
||||
nextTick()
|
||||
.then(() => {
|
||||
this.updateExtraFormData(this.form);
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.closedByForm) {
|
||||
this.$emit('onUpdateSavedState', true);
|
||||
this.$emit('on-update-saved-state', true);
|
||||
} else {
|
||||
this.oldForm.saved = this.form.saved;
|
||||
if (JSON.stringify(this.form) != JSON.stringify(this.oldForm))
|
||||
this.$emit('onUpdateSavedState', false);
|
||||
this.$emit('on-update-saved-state', false);
|
||||
else
|
||||
this.$emit('onUpdateSavedState', true);
|
||||
this.$emit('on-update-saved-state', true);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -310,7 +335,7 @@ export default {
|
|||
this.formErrorMessage = '';
|
||||
this.isLoading = false;
|
||||
this.closedByForm = true;
|
||||
this.$emit('onEditionFinished');
|
||||
this.$emit('on-edition-finished');
|
||||
})
|
||||
.catch((errors) => {
|
||||
this.isLoading = false;
|
||||
|
@ -319,7 +344,7 @@ export default {
|
|||
this.formErrors[attribute] = error[attribute];
|
||||
}
|
||||
this.formErrorMessage = errors.error_message;
|
||||
this.$emit('onErrorFound');
|
||||
this.$emit('on-error-found');
|
||||
|
||||
this.form.formErrors = this.formErrors;
|
||||
this.form.formErrorMessage = this.formErrorMessage;
|
||||
|
@ -349,7 +374,7 @@ export default {
|
|||
this.formErrorMessage = '';
|
||||
this.isLoading = false;
|
||||
this.closedByForm = true;
|
||||
this.$emit('onEditionFinished');
|
||||
this.$emit('on-edition-finished');
|
||||
})
|
||||
.catch((errors) => {
|
||||
this.isLoading = false;
|
||||
|
@ -358,7 +383,7 @@ export default {
|
|||
this.formErrors[attribute] = error[attribute];
|
||||
}
|
||||
this.formErrorMessage = errors.error_message;
|
||||
this.$emit('onErrorFound');
|
||||
this.$emit('on-error-found');
|
||||
|
||||
this.form.formErrors = this.formErrors;
|
||||
this.form.formErrorMessage = this.formErrorMessage;
|
||||
|
@ -370,7 +395,7 @@ export default {
|
|||
},
|
||||
cancelEdition() {
|
||||
this.closedByForm = true;
|
||||
this.$emit('onEditionCanceled');
|
||||
this.$emit('on-edition-canceled');
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
{ path: '', label: importerType != undefined ? (importerName != undefined ? importerName :importerType) : $i18n.get('title_importer_page') }
|
||||
]" />
|
||||
<form
|
||||
@click="formErrorMessage = ''"
|
||||
v-if="importer != undefined && importer != null"
|
||||
class="tainacan-form"
|
||||
label-width="120px"
|
||||
v-if="importer != undefined && importer != null">
|
||||
@click="formErrorMessage = ''">
|
||||
<div
|
||||
v-if="importer.manual_collection || importer.accepts.file || importer.accepts.url"
|
||||
class="columns">
|
||||
|
@ -44,8 +44,8 @@
|
|||
</section>
|
||||
</b-upload>
|
||||
<div
|
||||
class="control selected-source-file"
|
||||
v-if="importerFile != undefined">
|
||||
v-if="importerFile != undefined"
|
||||
class="control selected-source-file">
|
||||
<span>{{ (importerFile.length != undefined && importerFile.length > 0 ) ? importerFile[0].name : importerFile.name }}</span>
|
||||
<a
|
||||
target="_blank"
|
||||
|
@ -63,8 +63,8 @@
|
|||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="control selected-source-file"
|
||||
v-if="importerFile == undefined && importer.tmp_file">
|
||||
v-if="importerFile == undefined && importer.tmp_file"
|
||||
class="control selected-source-file">
|
||||
<p>{{ $i18n.get('label_select_file') + ': ' + importer.tmp_file }}</p>
|
||||
</div>
|
||||
</b-field>
|
||||
|
@ -107,12 +107,12 @@
|
|||
<br>
|
||||
<div class="is-inline">
|
||||
<b-select
|
||||
expanded
|
||||
id="tainacan-select-target-collection"
|
||||
:value="collectionId"
|
||||
@input="onSelectCollection($event)"
|
||||
expanded
|
||||
:model-value="collectionId"
|
||||
:loading="isFetchingCollections"
|
||||
:placeholder="$i18n.get('instruction_select_a_target_collection')">
|
||||
:placeholder="$i18n.get('instruction_select_a_target_collection')"
|
||||
@update:model-value="onSelectCollection($event)">
|
||||
<option
|
||||
v-for="collection of collections"
|
||||
:key="collection.id"
|
||||
|
@ -121,7 +121,6 @@
|
|||
</b-select>
|
||||
<router-link
|
||||
v-if="$userCaps.hasCapability('tnc_rep_edit_collections')"
|
||||
tag="a"
|
||||
style="font-size: 0.875em;"
|
||||
class="add-link"
|
||||
:to="{ path: $routerHelper.getNewCollectionPath(), query: { fromImporter: true }}">
|
||||
|
@ -159,6 +158,7 @@
|
|||
v-if="!importer.manual_mapping"
|
||||
class="control">
|
||||
<button
|
||||
id="button-submit-importer-creation"
|
||||
:disabled="
|
||||
(formErrorMessage != undefined && formErrorMessage != '') ||
|
||||
sessionId == undefined ||
|
||||
|
@ -167,15 +167,15 @@
|
|||
(importer.accepts.file && !importer.accepts.url && !importerFile) ||
|
||||
(!importer.accepts.file && importer.accepts.url && !url) ||
|
||||
(importer.accepts.file && importer.accepts.url && !importerFile && !url)"
|
||||
id="button-submit-importer-creation"
|
||||
@click.prevent="onFinishImporter()"
|
||||
:class="{ 'is-loading': isLoadingRun, 'is-success': !isLoadingRun }"
|
||||
class="button">{{ $i18n.get('run') }}</button>
|
||||
class="button"
|
||||
@click.prevent="onFinishImporter()">{{ $i18n.get('run') }}</button>
|
||||
</div>
|
||||
<div
|
||||
v-if="importer.manual_mapping"
|
||||
class="control">
|
||||
<button
|
||||
id="button-submit-collection-creation"
|
||||
:disabled="
|
||||
(formErrorMessage != undefined && formErrorMessage != '') ||
|
||||
sessionId == undefined ||
|
||||
|
@ -184,16 +184,15 @@
|
|||
(importer.accepts.file && !importer.accepts.url && !importerFile) ||
|
||||
(!importer.accepts.file && importer.accepts.url && !url) ||
|
||||
(importer.accepts.file && importer.accepts.url && !importerFile && !url)"
|
||||
id="button-submit-collection-creation"
|
||||
@click.prevent="onFinishImporter()"
|
||||
:class="{ 'is-loading': isLoadingUpload, 'is-success': !isLoadingUpload }"
|
||||
class="button">{{ $i18n.get('next') }}</button>
|
||||
class="button"
|
||||
@click.prevent="onFinishImporter()">{{ $i18n.get('next') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<b-loading
|
||||
:active.sync="isLoading"
|
||||
v-model="isLoading"
|
||||
:can-cancel="false" />
|
||||
</div>
|
||||
</template>
|
||||
|
@ -462,7 +461,7 @@ export default {
|
|||
|
||||
@import "../../scss/_variables.scss";
|
||||
|
||||
/deep/ .columns {
|
||||
:deep(.columns) {
|
||||
padding-left: var(--tainacan-one-column);
|
||||
padding-right: var(--tainacan-one-column);
|
||||
}
|
||||
|
|
|
@ -4,42 +4,38 @@
|
|||
<div class="tainacan-page-title">
|
||||
<h1>{{ $i18n.get('label_metadata_mapping') }} </h1>
|
||||
<a
|
||||
@click="$router.go(-1)"
|
||||
class="back-link has-text-secondary">
|
||||
class="back-link has-text-secondary"
|
||||
@click="$router.go(-1)">
|
||||
{{ $i18n.get('back') }}
|
||||
</a>
|
||||
<hr>
|
||||
<nav class="breadcrumbs">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link> >
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getAvailableImportersPath()">{{ $i18n.get('importers') }}</router-link> >
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getImporterPath(importerType, sessionId)">{{ importerType != undefined ? (importerName != undefined ? importerName :importerType) : $i18n.get('title_importer_page') }}</router-link> >
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getImporterMappingPath(importerType, sessionId, collectionId)">{{ $i18n.get('label_metadata_mapping') }}</router-link>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
<b-loading
|
||||
:active.sync="isLoading"
|
||||
v-model="isLoading"
|
||||
:can-cancel="false" />
|
||||
|
||||
<form
|
||||
v-if="importer != undefined && importer != null"
|
||||
class="tainacan-form"
|
||||
label-width="120px"
|
||||
v-if="importer != undefined && importer != null">
|
||||
label-width="120px">
|
||||
<p>{{ $i18n.get('info_metadata_mapping_helper') }}</p>
|
||||
<br>
|
||||
|
||||
<b-loading
|
||||
v-model="isLoadingSourceInfo"
|
||||
:is-full-page="false"
|
||||
:active.sync="isLoadingSourceInfo"
|
||||
:can-cancel="false" />
|
||||
|
||||
<!-- Metadata Mapping -->
|
||||
|
@ -70,8 +66,8 @@
|
|||
</a>
|
||||
</div>
|
||||
<div
|
||||
class="mapping-header"
|
||||
v-if="importerSourceInfo.source_metadata.length > 0 || (importerSourceInfo.source_special_fields && importerSourceInfo.source_special_fields.length > 0)">
|
||||
v-if="importerSourceInfo.source_metadata.length > 0 || (importerSourceInfo.source_special_fields && importerSourceInfo.source_special_fields.length > 0)"
|
||||
class="mapping-header">
|
||||
<p>{{ $i18n.get('label_from_source_collection') }}</p>
|
||||
<hr>
|
||||
<span class="icon">
|
||||
|
@ -82,19 +78,19 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
class="source-metadatum"
|
||||
:class="{ 'has-children': typeof sourceMetadatum == 'object' && Object.entries(sourceMetadatum)[0] }"
|
||||
v-for="(sourceMetadatum, index) of importerSourceInfo.source_metadata"
|
||||
:key="index">
|
||||
:key="index"
|
||||
class="source-metadatum"
|
||||
:class="{ 'has-children': typeof sourceMetadatum == 'object' && Object.entries(sourceMetadatum)[0] }">
|
||||
<template v-if="typeof sourceMetadatum == 'string'">
|
||||
<p>{{ sourceMetadatum }}</p>
|
||||
<b-select
|
||||
v-if="collectionMetadata != undefined &&
|
||||
collectionMetadata.length > 0 &&
|
||||
!isFetchingCollectionMetadata"
|
||||
:value="checkCurrentSelectedCollectionMetadatum(sourceMetadatum)"
|
||||
@input="onSelectCollectionMetadata($event, sourceMetadatum)"
|
||||
:placeholder="$i18n.get('label_select_metadatum')">
|
||||
:model-value="checkCurrentSelectedCollectionMetadatum(sourceMetadatum)"
|
||||
:placeholder="$i18n.get('label_select_metadatum')"
|
||||
@update:model-value="onSelectCollectionMetadata($event, sourceMetadatum)">
|
||||
<option :value="null">
|
||||
{{ $i18n.get('label_select_metadatum') }}
|
||||
</option>
|
||||
|
@ -128,9 +124,9 @@
|
|||
v-if="collectionMetadata != undefined &&
|
||||
collectionMetadata.length > 0 &&
|
||||
!isFetchingCollectionMetadata"
|
||||
:value="checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true)"
|
||||
@input="onSelectCollectionMetadata($event, Object.entries(sourceMetadatum)[0][0], true, Object.entries(sourceMetadatum)[0][1])"
|
||||
:placeholder="$i18n.get('label_select_metadatum')">
|
||||
:model-value="checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true)"
|
||||
:placeholder="$i18n.get('label_select_metadatum')"
|
||||
@update:model-value="onSelectCollectionMetadata($event, Object.entries(sourceMetadatum)[0][0], true, Object.entries(sourceMetadatum)[0][1])">
|
||||
<option :value="null">
|
||||
{{ $i18n.get('label_select_metadatum') }}
|
||||
</option>
|
||||
|
@ -156,18 +152,18 @@
|
|||
:class="{ 'disabled-child-source-metadatum': [undefined, null, false, 'create_metadata' + index].includes(checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true)) }"
|
||||
class="child-source-metadatum">
|
||||
<div
|
||||
class="source-metadatum"
|
||||
v-for="(childSourceMetadatum, childIndex) of Object.entries(sourceMetadatum)[0][1]"
|
||||
:key="childIndex">
|
||||
:key="childIndex"
|
||||
class="source-metadatum">
|
||||
<p>{{ childSourceMetadatum }}</p>
|
||||
<b-select
|
||||
v-if="collectionMetadata != undefined &&
|
||||
collectionMetadata.length > 0 &&
|
||||
!isFetchingCollectionMetadata"
|
||||
:disabled="[undefined, null, false, 'create_metadata' + index].includes(checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true))"
|
||||
:value="checkCurrentSelectedCollectionChildMetadatum(childSourceMetadatum, checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true))"
|
||||
@input="onSelectCollectionChildMetadata($event, childSourceMetadatum, checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true), Object.entries(sourceMetadatum)[0][0])"
|
||||
:placeholder="$i18n.get('label_select_metadatum')">
|
||||
:model-value="checkCurrentSelectedCollectionChildMetadatum(childSourceMetadatum, checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true))"
|
||||
:placeholder="$i18n.get('label_select_metadatum')"
|
||||
@update:model-value="onSelectCollectionChildMetadata($event, childSourceMetadatum, checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true), Object.entries(sourceMetadatum)[0][0])">
|
||||
<option :value="null">
|
||||
{{ $i18n.get('label_select_metadatum') }}
|
||||
</option>
|
||||
|
@ -187,38 +183,46 @@
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<p v-if="collectionMetadata == undefined || collectionMetadata.length <= 0">{{ $i18n.get('info_select_collection_to_list_metadata') }}</p>
|
||||
<p v-if="collectionMetadata == undefined || collectionMetadata.length <= 0">
|
||||
{{ $i18n.get('info_select_collection_to_list_metadata') }}
|
||||
</p>
|
||||
</div>
|
||||
<template v-if="importerSourceInfo.source_special_fields">
|
||||
<div
|
||||
v-for="(specialField, specialFieldIndex) of importerSourceInfo.source_special_fields"
|
||||
:key="specialFieldIndex"
|
||||
class="source-metadatum">
|
||||
<p style="font-style: italic">{{ specialField }}</p>
|
||||
<p style="font-style: italic">
|
||||
{{ specialField }}
|
||||
</p>
|
||||
<p>{{ $i18n.get('info_special_fields_mapped_default') }}</p>
|
||||
</div>
|
||||
</template>
|
||||
<p v-if="importerSourceInfo.source_metadata.length <= 0">{{ $i18n.get('info_no_metadata_source_file') }}<br></p>
|
||||
<p v-if="importerSourceInfo.source_metadata.length <= 0">
|
||||
{{ $i18n.get('info_no_metadata_source_file') }}<br>
|
||||
</p>
|
||||
|
||||
<p v-if="(!importerSourceInfo.source_special_fields || importerSourceInfo.source_special_fields.length <= 0)">{{ $i18n.get('info_no_special_fields_available') }}<br></p>
|
||||
<p v-if="(!importerSourceInfo.source_special_fields || importerSourceInfo.source_special_fields.length <= 0)">
|
||||
{{ $i18n.get('info_no_special_fields_available') }}<br>
|
||||
</p>
|
||||
|
||||
<b-modal
|
||||
@close="onMetadatumEditionCanceled()"
|
||||
:active.sync="isNewMetadatumModalActive"
|
||||
v-model="isNewMetadatumModalActive"
|
||||
trap-focus
|
||||
aria-modal
|
||||
aria-role="dialog"
|
||||
:close-button-aria-label="$i18n.get('close')"
|
||||
custom-class="tainacan-modal">
|
||||
custom-class="tainacan-modal"
|
||||
@close="onMetadatumEditionCanceled()">
|
||||
<div
|
||||
v-if="selectedMetadatumType == undefined && !isEditingMetadatum"
|
||||
autofocus="true"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-modal
|
||||
v-if="selectedMetadatumType == undefined && !isEditingMetadatum">
|
||||
aria-modal>
|
||||
<b-loading
|
||||
:is-full-page="isFullPage"
|
||||
:active.sync="isLoadingMetadatumTypes"/>
|
||||
v-model="isLoadingMetadatumTypes"
|
||||
:is-full-page="false" />
|
||||
<div
|
||||
|
||||
class="tainacan-modal-content">
|
||||
|
@ -229,9 +233,9 @@
|
|||
<section class="tainacan-form">
|
||||
<div class="metadata-types-container">
|
||||
<div
|
||||
class="metadata-type"
|
||||
v-for="(metadatumType, index) of metadatumTypes"
|
||||
:key="index"
|
||||
class="metadata-type"
|
||||
@click="onSelectMetadatumType(metadatumType)">
|
||||
<h4>{{ metadatumType.name }}</h4>
|
||||
</div>
|
||||
|
@ -254,11 +258,11 @@
|
|||
v-if="selectedMetadatumType && isEditingMetadatum"
|
||||
:collection-id="collectionId"
|
||||
:is-repository-level="false"
|
||||
@onEditionFinished="onMetadatumEditionFinished()"
|
||||
@onEditionCanceled="onMetadatumEditionCanceled()"
|
||||
:index="0"
|
||||
:original-metadatum="metadatum"
|
||||
:is-inside-importer-flow="true" />
|
||||
:is-inside-importer-flow="true"
|
||||
@on-edition-finished="onMetadatumEditionFinished()"
|
||||
@on-edition-canceled="onMetadatumEditionCanceled()" />
|
||||
</b-modal>
|
||||
</div>
|
||||
<div
|
||||
|
@ -276,14 +280,16 @@
|
|||
type="button"
|
||||
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
||||
</div>
|
||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
||||
<p class="help is-danger">
|
||||
{{ formErrorMessage }}
|
||||
</p>
|
||||
<div class="control">
|
||||
<button
|
||||
:disabled="sessionId == undefined || importer == undefined"
|
||||
id="button-submit-importer-mapping"
|
||||
@click.prevent="onRunImporter"
|
||||
:disabled="sessionId == undefined || importer == undefined"
|
||||
:class="{ 'is-loading': isLoadingRun, 'is-success': !isLoadingRun }"
|
||||
class="button">{{ $i18n.get('run') }}</button>
|
||||
class="button"
|
||||
@click.prevent="onRunImporter">{{ $i18n.get('run') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -291,7 +297,7 @@
|
|||
<!-- Prompt to show title -->
|
||||
<b-modal
|
||||
v-if="importerSourceInfo"
|
||||
:active.sync="showTitlePromptModal"
|
||||
v-model="showTitlePromptModal"
|
||||
:can-cancel="false"
|
||||
:width="820"
|
||||
scroll="keep"
|
||||
|
@ -309,11 +315,13 @@
|
|||
</div>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<p style="margin: 12px 0px 24px 0px">{{ $i18n.get('info_title_mapping') }}</p>
|
||||
<p style="margin: 12px 0px 24px 0px">
|
||||
{{ $i18n.get('info_title_mapping') }}
|
||||
</p>
|
||||
<b-field>
|
||||
<b-select
|
||||
expanded
|
||||
v-model="selectedTitle"
|
||||
expanded
|
||||
:placeholder="$i18n.get('label_select_metadatum')">
|
||||
<option
|
||||
v-for="(sourceMetadatum, index) of importerSourceInfo.source_metadata"
|
||||
|
@ -363,8 +371,8 @@
|
|||
<button
|
||||
type="submit"
|
||||
class="button is-success"
|
||||
@click="onConfirmTitleSelection"
|
||||
:disabled="selectedTitle === '' || selectedTitle == undefined">
|
||||
:disabled="selectedTitle === '' || selectedTitle == undefined"
|
||||
@click="onConfirmTitleSelection">
|
||||
{{ $i18n.get('apply') }}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -415,9 +423,9 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
metadatumTypes() {
|
||||
return this.getMetadatumTypes();
|
||||
},
|
||||
...mapGetters('metadata', {
|
||||
'metadatumTypes': 'getMetadatumTypes'
|
||||
}),
|
||||
collectionNonChildMetadata() {
|
||||
return Array.isArray(this.collectionMetadata) ? this.collectionMetadata.filter((metadatum) => !this.checkIfMetadatumIsChild(metadatum)) : [];
|
||||
}
|
||||
|
@ -441,7 +449,7 @@ export default {
|
|||
this.collection = collection;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
@ -468,12 +476,6 @@ export default {
|
|||
'fetchMetadatumTypes',
|
||||
'sendMetadatum'
|
||||
]),
|
||||
...mapGetters('metadata', [
|
||||
'getMetadatumTypes'
|
||||
]),
|
||||
...mapGetters('bgprocess', [
|
||||
'getProcess'
|
||||
]),
|
||||
...mapActions('collection', [
|
||||
'fetchCollectionBasics'
|
||||
]),
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
style="float: right; font-size: 0.875em; margin: 2px 5px;"
|
||||
type="button"
|
||||
class="link-style"
|
||||
@click.prevent="($event) => $emit('openAttachmentsMediaFrame', $event)"
|
||||
:disabled="isLoading">
|
||||
:disabled="isLoading"
|
||||
@click.prevent="($event) => $emit('open-attachments-media-frame', $event)">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-edit" />
|
||||
</span>
|
||||
|
@ -41,7 +41,7 @@
|
|||
:collection="collection"
|
||||
:is-editable="true"
|
||||
:should-load-attachments="shouldLoadAttachments"
|
||||
@onDeleteAttachment="($event) => $emit('onDeleteAttachment', $event)"/>
|
||||
@on-delete-attachment="($event) => $emit('on-delete-attachment', $event)" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -60,7 +60,11 @@ export default {
|
|||
totalAttachments: Number,
|
||||
isLoading: Boolean,
|
||||
shouldLoadAttachments: Boolean
|
||||
}
|
||||
},
|
||||
emits: [
|
||||
'open-attachments-media-frame',
|
||||
'on-delete-attachment'
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<div>
|
||||
<b-loading
|
||||
v-model="isLoading"
|
||||
:is-full-page="false"
|
||||
:active.sync="isLoading"
|
||||
:can-cancel="false" />
|
||||
<div
|
||||
v-if="!$adminOptions.hideBulkEditionPageTitle"
|
||||
class="tainacan-page-title">
|
||||
<h1>{{ $i18n.get('add_items_bulk') }}</h1>
|
||||
<a
|
||||
@click="$router.go(-1)"
|
||||
class="back-link has-text-secondary">
|
||||
class="back-link has-text-secondary"
|
||||
@click="$router.go(-1)">
|
||||
{{ $i18n.get('back') }}
|
||||
</a>
|
||||
<hr>
|
||||
|
@ -25,18 +25,18 @@
|
|||
<label class="label">{{ $i18n.get('label_documents_upload') }}</label>
|
||||
<br>
|
||||
<b-upload
|
||||
native
|
||||
v-model="submitedFileList"
|
||||
native
|
||||
drag-drop
|
||||
multiple
|
||||
@input="uploadFiles()"
|
||||
class="source-file-upload">
|
||||
class="source-file-upload"
|
||||
@update:model-value="uploadFiles()">
|
||||
<section class="drop-inner">
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
<b-icon
|
||||
icon="upload"
|
||||
size="is-large"/>
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-30px tainacan-icon-upload" />
|
||||
</span>
|
||||
</p>
|
||||
<p>{{ $i18n.get('instruction_drop_file_or_click_to_upload') }}</p>
|
||||
</div>
|
||||
|
@ -84,9 +84,9 @@
|
|||
<!-- Uploaded Items -->
|
||||
<transition-group name="item-appear">
|
||||
<div
|
||||
class="document-item"
|
||||
v-for="(item, index) of uploadedItems"
|
||||
:key="item.id">
|
||||
:key="item.id"
|
||||
class="document-item">
|
||||
<img
|
||||
v-if="item.document != undefined && item.document != '' && item.document_type != 'empty'"
|
||||
class="document-thumb"
|
||||
|
@ -108,7 +108,6 @@
|
|||
</span>
|
||||
<span
|
||||
v-if="item.document != '' && item.document_type != 'empty'"
|
||||
class="icon has-text-success"
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
shown: 500,
|
||||
|
@ -118,7 +117,8 @@
|
|||
autoHide: false,
|
||||
placement: 'auto-start',
|
||||
popperClass: ['tainacan-tooltip', 'tooltip']
|
||||
}">
|
||||
}"
|
||||
class="icon has-text-success">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-approvedcircle" />
|
||||
</span>
|
||||
</div>
|
||||
|
@ -150,8 +150,9 @@
|
|||
<button
|
||||
type="button"
|
||||
class="button is-outlined"
|
||||
@click.prevent="$router.go(-1)"
|
||||
slot="trigger">{{ $i18n.get('cancel') }}</button>
|
||||
@click.prevent="$router.go(-1)">
|
||||
{{ $i18n.get('cancel') }}
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
style="margin-left: auto;"
|
||||
|
@ -160,15 +161,17 @@
|
|||
:disabled="!(uploadedItems.length > 0 && uploadedItems.length == amountFinished)"
|
||||
class="button is-secondary"
|
||||
:class="{'is-loading': isCreatingSequenceEditGroup }"
|
||||
@click.prevent="sequenceEditGroup()"
|
||||
type="submit">{{ $i18n.get('label_sequence_edit_items') }}</button>
|
||||
type="submit"
|
||||
@click.prevent="sequenceEditGroup()">
|
||||
{{ $i18n.get('label_sequence_edit_items') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button
|
||||
:disabled="!(uploadedItems.length > 0 && uploadedItems.length == amountFinished)"
|
||||
class="button is-secondary"
|
||||
@click.prevent="openBulkEditionModal()"
|
||||
type="submit">{{ $i18n.get('label_bulk_edit_items') }}</button>
|
||||
type="submit"
|
||||
@click.prevent="openBulkEditionModal()">{{ $i18n.get('label_bulk_edit_items') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -206,12 +209,9 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
uploadedFileList() {
|
||||
return this.getFiles();
|
||||
},
|
||||
collection() {
|
||||
return this.getCollection()
|
||||
}
|
||||
...mapGetters('collection', {
|
||||
'collection': 'getCollection'
|
||||
})
|
||||
},
|
||||
created() {
|
||||
// Obtains collection ID
|
||||
|
@ -220,7 +220,7 @@ export default {
|
|||
this.cleanFiles();
|
||||
|
||||
// Updates Collection BreadCrumb
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||
{ path: '', label: this.$i18n.get('add_items_bulk') }
|
||||
]);
|
||||
|
@ -230,10 +230,6 @@ export default {
|
|||
'sendFile',
|
||||
'cleanFiles',
|
||||
'deleteItem'
|
||||
]),
|
||||
...mapGetters('collection', [
|
||||
'getFiles',
|
||||
'getCollection'
|
||||
]),
|
||||
...mapActions('item', [
|
||||
'sendItem',
|
||||
|
@ -257,7 +253,7 @@ export default {
|
|||
|
||||
let index = this.uploadedItems.findIndex(existingItem => existingItem.id === item.id);
|
||||
if ( index >= 0)
|
||||
this.$set( this.uploadedItems, index, item );
|
||||
Object.assign(this.uploadedItems, { [index]: item });
|
||||
else
|
||||
this.uploadedItems.push( item );
|
||||
|
||||
|
@ -276,7 +272,7 @@ export default {
|
|||
|
||||
let index = this.uploadedItems.findIndex(existingItem => existingItem.id === item.id);
|
||||
if ( index >= 0)
|
||||
this.$set( this.uploadedItems, index, item);
|
||||
Object.assign(this.uploadedItems, { [index]: item });
|
||||
else
|
||||
this.uploadedItems.unshift( item );
|
||||
})
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
<div v-html="item.document_as_html" />
|
||||
<div class="document-buttons-row">
|
||||
<a
|
||||
id="button-edit-document"
|
||||
class="button is-rounded is-secondary"
|
||||
size="is-small"
|
||||
id="button-edit-document"
|
||||
:aria-label="$i18n.get('label_button_edit_document')"
|
||||
@click.prevent="($event) => $emit('onSetDocument', $event, form.document_type)">
|
||||
@click.prevent="($event) => $emit('on-set-document', $event, form.document_type)">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('edit'),
|
||||
|
@ -38,11 +38,11 @@
|
|||
</span>
|
||||
</a>
|
||||
<a
|
||||
id="button-delete-document"
|
||||
class="button is-rounded is-secondary"
|
||||
size="is-small"
|
||||
id="button-delete-document"
|
||||
:aria-label="$i18n.get('label_button_delete_document')"
|
||||
@click.prevent="$emit('onRemoveDocument')">
|
||||
@click.prevent="$emit('on-remove-document')">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('delete'),
|
||||
|
@ -62,7 +62,7 @@
|
|||
<li v-if="!$adminOptions.hideItemEditionDocumentFileInput && (collection && collection.item_enabled_document_types && collection.item_enabled_document_types['attachment'] && collection.item_enabled_document_types['attachment']['enabled'] === 'yes')">
|
||||
<button
|
||||
type="button"
|
||||
@click.prevent="($event) => $emit('onSetFileDocument', $event)">
|
||||
@click.prevent="($event) => $emit('on-set-file-document', $event)">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-upload" />
|
||||
</span>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<li v-if="!$adminOptions.hideItemEditionDocumentTextInput && (collection && collection.item_enabled_document_types && collection.item_enabled_document_types['text'] && collection.item_enabled_document_types['text']['enabled'] === 'yes')">
|
||||
<button
|
||||
type="button"
|
||||
@click.prevent="$emit('onSetTextDocument')">
|
||||
@click.prevent="$emit('on-set-text-document')">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-text" />
|
||||
</span>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<li v-if="!$adminOptions.hideItemEditionDocumentUrlInput && (collection && collection.item_enabled_document_types && collection.item_enabled_document_types['url'] && collection.item_enabled_document_types['url']['enabled'] === 'yes')">
|
||||
<button
|
||||
type="button"
|
||||
@click.prevent="$emit('onSetURLDocument')">
|
||||
@click.prevent="$emit('on-set-url-document')">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-url" />
|
||||
</span>
|
||||
|
@ -100,7 +100,14 @@ export default {
|
|||
item: Object,
|
||||
form: Object,
|
||||
collection: Object
|
||||
}
|
||||
},
|
||||
emits: [
|
||||
'on-set-file-document',
|
||||
'on-set-text-document',
|
||||
'on-set-url-document',
|
||||
'on-set-document',
|
||||
'on-remove-document'
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -114,48 +121,46 @@ export default {
|
|||
&.document-field-content--text {
|
||||
padding-bottom: 2rem;
|
||||
|
||||
/deep/ article {
|
||||
:deep(article) {
|
||||
max-height: calc(32vh - 2rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ img,
|
||||
/deep/ video,
|
||||
/deep/ figure {
|
||||
:deep(img),
|
||||
:deep(video),
|
||||
:deep(figure) {
|
||||
max-width: 100%;
|
||||
max-height: 32vh;
|
||||
width: auto !important;
|
||||
margin: 0;
|
||||
}
|
||||
/deep/ a {
|
||||
:deep(a){
|
||||
min-height: 60px;
|
||||
display: block;
|
||||
}
|
||||
/deep/ audio,
|
||||
/deep/ iframe,
|
||||
/deep/ blockquote {
|
||||
:deep(audio),
|
||||
:deep(iframe),
|
||||
:deep(blockquote) {
|
||||
max-width: 100%;
|
||||
max-height: 32vh;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
min-height: 150px;
|
||||
}
|
||||
/deep/ audio {
|
||||
:deep(audio) {
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
@media screen and (max-height: 760px) {
|
||||
max-height: 25vh;
|
||||
|
||||
/deep/ img,
|
||||
/deep/ video,
|
||||
/deep/ figure {
|
||||
max-height: 25vh;
|
||||
}
|
||||
/deep/ audio,
|
||||
/deep/ iframe,
|
||||
/deep/ blockquote {
|
||||
:deep(img),
|
||||
:deep(video),
|
||||
:deep(figure),
|
||||
:deep(audio),
|
||||
:deep(iframe),
|
||||
:deep(blockquote) {
|
||||
max-height: 25vh;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div :class="isCreatingNewItem ? 'item-creation-container' : 'item-edition-container'"><!-- Do NOT remove this classes, they may be used by third party plugins -->
|
||||
<b-loading
|
||||
v-model="isLoading"
|
||||
:is-full-page="false"
|
||||
:active.sync="isLoading"
|
||||
:can-cancel="false" />
|
||||
|
||||
<tainacan-title
|
||||
|
@ -80,7 +80,7 @@
|
|||
</h1>
|
||||
</transition>
|
||||
<button
|
||||
v-if="!formErrors.length || isUpdatingValues"
|
||||
v-if="!errors.length || isUpdatingValues"
|
||||
@click="isMobileSubheaderOpen = !isMobileSubheaderOpen">
|
||||
<span
|
||||
v-if="isUpdatingValues"
|
||||
|
@ -106,14 +106,14 @@
|
|||
</button>
|
||||
<item-metadatum-errors-tooltip
|
||||
v-else
|
||||
:form-errors="formErrors" />
|
||||
:form-errors="errors" />
|
||||
</div>
|
||||
|
||||
<transition name="item-appear">
|
||||
<div
|
||||
v-if="isMobileSubheaderOpen"
|
||||
@click="isMobileSubheaderOpen = false;"
|
||||
class="tainacan-mobile-app-header_panel-backdrop" />
|
||||
class="tainacan-mobile-app-header_panel-backdrop"
|
||||
@click="isMobileSubheaderOpen = false;" />
|
||||
</transition>
|
||||
<transition name="panel-from-top">
|
||||
<div
|
||||
|
@ -127,7 +127,7 @@
|
|||
{{ $i18n.get('title_edit_item') + ' ' }}
|
||||
<span style="font-weight: 600;">{{ (item != null && item != undefined) ? item.title : '' }}</span>
|
||||
</h1>
|
||||
<span v-if="!formErrors.length">{{ ($i18n.get('info_updated_at') + ' ' + lastUpdated) }}</span>
|
||||
<span v-if="!errors.length">{{ ($i18n.get('info_updated_at') + ' ' + lastUpdated) }}</span>
|
||||
<span
|
||||
v-else
|
||||
class="help is-danger">
|
||||
|
@ -196,11 +196,11 @@
|
|||
<ul class="swiper-wrapper">
|
||||
<li
|
||||
v-for="(tab, tabIndex) of tabs"
|
||||
:id="tab.slug + '-tab-label'"
|
||||
:key="tabIndex"
|
||||
:class="{ 'is-active': activeTab === tab.slug }"
|
||||
@click="activeTab = tab.slug"
|
||||
class="swiper-slide"
|
||||
:id="tab.slug + '-tab-label'">
|
||||
@click="activeTab = tab.slug">
|
||||
<a>
|
||||
<span class="icon has-text-gray4">
|
||||
<i :class="'tainacan-icon tainacan-icon-18px tainacan-icon-' + tab.icon" />
|
||||
|
@ -215,9 +215,8 @@
|
|||
</li>
|
||||
</ul>
|
||||
<button
|
||||
class="swiper-button-prev"
|
||||
id="tainacan-tabs-prev"
|
||||
slot="button-prev">
|
||||
class="swiper-button-prev">
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
|
@ -229,9 +228,8 @@
|
|||
</svg>
|
||||
</button>
|
||||
<button
|
||||
class="swiper-button-next"
|
||||
id="tainacan-tabs-next"
|
||||
slot="button-next">
|
||||
class="swiper-button-next">
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
|
@ -288,9 +286,9 @@
|
|||
:style="$adminOptions.hideItemEditionCollapses ? 'padding-left: 0.35em !important;' : ''">
|
||||
<b-button
|
||||
v-if="!$adminOptions.hideItemEditionFocusMode && (collection && collection.item_enable_metadata_focus_mode === 'yes') && !isMetadataNavigation && !showOnlyRequiredMetadata && !metadataNameFilterString"
|
||||
@click="isMetadataNavigation = true; setMetadatumFocus({ index: 0, scrollIntoView: true });"
|
||||
class="collapse-all has-text-secondary"
|
||||
size="is-small">
|
||||
size="is-small"
|
||||
@click="isMetadataNavigation = true; setMetadatumFocus({ index: 0, scrollIntoView: true });">
|
||||
<span
|
||||
class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-play" />
|
||||
|
@ -300,8 +298,8 @@
|
|||
<b-button
|
||||
v-if="isMetadataNavigation"
|
||||
:disabled="focusedMetadatum === 0"
|
||||
@click="focusPreviousMetadatum"
|
||||
outlined>
|
||||
outlined
|
||||
@click="focusPreviousMetadatum">
|
||||
<span
|
||||
class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-showmore tainacan-icon-rotate-180" />
|
||||
|
@ -311,8 +309,8 @@
|
|||
<b-button
|
||||
v-if="isMetadataNavigation"
|
||||
:disabled="(focusedMetadatum === itemMetadata.length - 1) && (!isCurrentlyFocusedOnCompoundMetadatum || isOnLastMetadatumOfCompoundNavigation)"
|
||||
@click="focusNextMetadatum"
|
||||
outlined>
|
||||
outlined
|
||||
@click="focusNextMetadatum">
|
||||
<span
|
||||
class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-showmore" />
|
||||
|
@ -321,8 +319,8 @@
|
|||
</b-button>
|
||||
<b-button
|
||||
v-if="isMetadataNavigation"
|
||||
@click="setMetadatumFocus({ index: 0, scrollIntoView: true }); isMetadataNavigation = false;"
|
||||
outlined>
|
||||
outlined
|
||||
@click="setMetadatumFocus({ index: 0, scrollIntoView: true }); isMetadataNavigation = false;">
|
||||
<span
|
||||
class="icon has-success-color">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-finish" />
|
||||
|
@ -342,9 +340,9 @@
|
|||
<b-switch
|
||||
v-if="!isMetadataNavigation && !$adminOptions.hideItemEditionRequiredOnlySwitch && (collection && collection.item_enable_metadata_required_filter === 'yes')"
|
||||
id="tainacan-switch-required-metadata"
|
||||
v-model="showOnlyRequiredMetadata"
|
||||
:style="'font-size: 0.625em;' + (isMobileScreen ? 'margin-right: 2rem;' : '')"
|
||||
size="is-small"
|
||||
v-model="showOnlyRequiredMetadata">
|
||||
size="is-small">
|
||||
{{ isMobileScreen ? $i18n.get('label_required') : $i18n.get('label_only_required') }} *
|
||||
</b-switch>
|
||||
|
||||
|
@ -353,17 +351,17 @@
|
|||
class="header-item metadata-name-search">
|
||||
<b-input
|
||||
v-if="!isMobileScreen || openMetadataNameFilter"
|
||||
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
|
||||
v-model="metadataNameFilterString"
|
||||
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
|
||||
icon="magnify"
|
||||
size="is-small"
|
||||
icon-right="close-circle"
|
||||
icon-right-clickable
|
||||
@icon-right-click="openMetadataNameFilterClose" />
|
||||
<span
|
||||
@click="openMetadataNameFilter = true"
|
||||
v-else
|
||||
class="icon is-small metadata-name-search-icon">
|
||||
class="icon is-small metadata-name-search-icon"
|
||||
@click="openMetadataNameFilter = true">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-search" />
|
||||
</span>
|
||||
</b-field>
|
||||
|
@ -371,15 +369,15 @@
|
|||
|
||||
<div
|
||||
v-for="(metadataSection, sectionIndex) of metadataSections"
|
||||
:key="sectionIndex"
|
||||
:class="'metadata-section-slug-' + metadataSection.slug + (isSectionHidden(metadataSection.id) ? ' metadata-section-hidden' : '')"
|
||||
:id="'metadata-section-id-' + metadataSection.id"
|
||||
:key="sectionIndex"
|
||||
v-tooltip="{
|
||||
content: isSectionHidden(metadataSection.id) ? $i18n.get('info_metadata_section_hidden_conditional') : false,
|
||||
autoHide: true,
|
||||
placement: 'auto',
|
||||
popperClass: ['tainacan-tooltip', 'tooltip']
|
||||
}">
|
||||
}"
|
||||
:class="'metadata-section-slug-' + metadataSection.slug + (isSectionHidden(metadataSection.id) ? ' metadata-section-hidden' : '')">
|
||||
<div class="metadata-section-header section-label">
|
||||
<span
|
||||
class="collapse-handle"
|
||||
|
@ -389,8 +387,8 @@
|
|||
class="icon">
|
||||
<i
|
||||
:class="{
|
||||
'tainacan-icon-arrowdown' : (metadataSectionCollapses[sectionIndex] || errorMessage) && !isSectionHidden(metadataSection.id),
|
||||
'tainacan-icon-arrowright' : !(metadataSectionCollapses[sectionIndex] || errorMessage) || isSectionHidden(metadataSection.id)
|
||||
'tainacan-icon-arrowdown' : (metadataSectionCollapses[sectionIndex] || formErrorMessage) && !isSectionHidden(metadataSection.id),
|
||||
'tainacan-icon-arrowright' : !(metadataSectionCollapses[sectionIndex] || formErrorMessage) || isSectionHidden(metadataSection.id)
|
||||
}"
|
||||
class="has-text-secondary tainacan-icon tainacan-icon-1-25em" />
|
||||
</span>
|
||||
|
@ -399,7 +397,7 @@
|
|||
<i class="tainacan-icon tainacan-icon-metadata" />
|
||||
</span>
|
||||
<span
|
||||
v-if="metadataSections.length > 1 && collection.item_enable_metadata_enumeration === 'yes'"
|
||||
v-if="metadataSections.length > 1 && collection && collection.item_enable_metadata_enumeration === 'yes'"
|
||||
style="opacity: 0.65;"
|
||||
class="metadata-section-enumeration">
|
||||
{{ Number(sectionIndex) + 1 }}.
|
||||
|
@ -420,22 +418,23 @@
|
|||
</div>
|
||||
<transition name="filter-item">
|
||||
<div
|
||||
class="metadata-section-metadata-list"
|
||||
v-show="(metadataSectionCollapses[sectionIndex] || isMetadataNavigation) && !isSectionHidden(metadataSection.id)">
|
||||
v-show="(metadataSectionCollapses[sectionIndex] || isMetadataNavigation) && !isSectionHidden(metadataSection.id)"
|
||||
class="metadata-section-metadata-list">
|
||||
<p
|
||||
class="metadatum-description-help-info"
|
||||
v-if="metadataSection.description && metadataSection.description_bellow_name == 'yes'">
|
||||
v-if="metadataSection.description && metadataSection.description_bellow_name == 'yes'"
|
||||
class="metadatum-description-help-info">
|
||||
{{ metadataSection.description }}
|
||||
</p>
|
||||
|
||||
<template v-for="(itemMetadatum, index) of itemMetadata">
|
||||
<template
|
||||
v-for="(itemMetadatum, index) of itemMetadata"
|
||||
:key="index">
|
||||
<tainacan-form-item
|
||||
v-if="itemMetadatum.metadatum.metadata_section_id == metadataSection.id"
|
||||
:key="index"
|
||||
:id="'metadatum-index--' + index"
|
||||
v-show="(!showOnlyRequiredMetadata || itemMetadatum.metadatum.required === 'yes') && (metadataNameFilterString == '' || filterByMetadatumName(itemMetadatum))"
|
||||
:class="{ 'is-metadata-navigation-active': isMetadataNavigation }"
|
||||
:id="'metadatum-index--' + index"
|
||||
:ref="'tainacan-form-item--' + index"
|
||||
:class="{ 'is-metadata-navigation-active': isMetadataNavigation }"
|
||||
:item-metadatum="itemMetadatum"
|
||||
:metadata-name-filter-string="metadataNameFilterString"
|
||||
:is-collapsed="metadataCollapses[index]"
|
||||
|
@ -444,14 +443,15 @@
|
|||
:hide-help-buttons="false"
|
||||
:help-info-bellow-label="false"
|
||||
:is-mobile-screen="isMobileScreen"
|
||||
:enumerate-metadatum="metadataSections.length > 1 && collection.item_enable_metadata_enumeration === 'yes' ? ( (Number(sectionIndex) + 1) + '.' + (Number(getMetadatumOrderInSection(sectionIndex, itemMetadatum.metadatum)) + 1) ) : false"
|
||||
:enumerate-metadatum="metadataSections.length > 1 && collection && collection.item_enable_metadata_enumeration === 'yes' ? ( (Number(sectionIndex) + 1) + '.' + (Number(getMetadatumOrderInSection(sectionIndex, itemMetadatum.metadatum)) + 1) ) : false"
|
||||
:is-last-metadatum="index > 2 && (index == itemMetadata.length - 1)"
|
||||
:is-focused="focusedMetadatum === index"
|
||||
:is-metadata-navigation="isMetadataNavigation"
|
||||
@changeCollapse="onChangeCollapse($event, index)"
|
||||
@touchstart.native="isMetadataNavigation ? setMetadatumFocus({ index: index, scrollIntoView: false }): ''"
|
||||
@mousedown.native="isMetadataNavigation ? setMetadatumFocus({ index: index, scrollIntoView: false }) : ''"
|
||||
@mobileSpecialFocus="setMetadatumFocus({ index: index, scrollIntoView: true })" />
|
||||
@input="updateItemMetadataValue"
|
||||
@change-collapse="onChangeCollapse($event, index)"
|
||||
@touchstart="isMetadataNavigation ? setMetadatumFocus({ index: index, scrollIntoView: false }): ''"
|
||||
@mousedown="isMetadataNavigation ? setMetadatumFocus({ index: index, scrollIntoView: false }) : ''"
|
||||
@mobile-special-focus="setMetadatumFocus({ index: index, scrollIntoView: true })" />
|
||||
</template>
|
||||
</div>
|
||||
</transition>
|
||||
|
@ -484,11 +484,11 @@
|
|||
</div>
|
||||
|
||||
<related-items-list
|
||||
v-model:is-loading="isLoading"
|
||||
:item-id="itemId"
|
||||
:collection-id="collectionId"
|
||||
:related-items="item.related_items"
|
||||
:is-editable="!$adminOptions.itemEditionMode"
|
||||
:is-loading.sync="isLoading" />
|
||||
:is-editable="!$adminOptions.itemEditionMode" />
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -503,19 +503,19 @@
|
|||
:item="item"
|
||||
:form="form"
|
||||
:collection="collection"
|
||||
@onSetDocument="setDocument"
|
||||
@onRemoveDocument="removeDocument"
|
||||
@onSetFileDocument="setFileDocument"
|
||||
@onSetTextDocument="setTextDocument"
|
||||
@onSetURLDocument="setURLDocument" />
|
||||
@on-set-document="setDocument"
|
||||
@on-remove-document="removeDocument"
|
||||
@on-set-file-document="setFileDocument"
|
||||
@on-set-text-document="setTextDocument"
|
||||
@on-set-url-document="setURLDocument" />
|
||||
<item-thumbnail-edition-form
|
||||
:item="item"
|
||||
:form="form"
|
||||
:collection="collection"
|
||||
:is-loading="isLoading"
|
||||
@onDeleteThumbnail="deleteThumbnail"
|
||||
@onUpdateThumbnailAlt="($event) => onUpdateThumbnailAlt($event)"
|
||||
@openThumbnailMediaFrame="thumbnailMediaFrame.openFrame($event)" />
|
||||
@on-delete-thumbnail="deleteThumbnail"
|
||||
@on-update-thumbnail-alt="($event) => onUpdateThumbnailAlt($event)"
|
||||
@open-thumbnail-media-frame="thumbnailMediaFrame.openFrame($event)" />
|
||||
</div>
|
||||
|
||||
<!-- Attachments on mobile modal -->
|
||||
|
@ -532,8 +532,8 @@
|
|||
:is-loading="isLoading"
|
||||
:total-attachments="totalAttachments"
|
||||
:should-load-attachments="shouldLoadAttachments"
|
||||
@openAttachmentsMediaFrame="($event) => attachmentsMediaFrame.openFrame($event)"
|
||||
@onDeleteAttachment="deleteAttachment($event)" />
|
||||
@open-attachments-media-frame="($event) => attachmentsMediaFrame.openFrame($event)"
|
||||
@on-delete-attachment="deleteAttachment($event)" />
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
@ -564,11 +564,11 @@
|
|||
:item="item"
|
||||
:form="form"
|
||||
:collection="collection"
|
||||
@onSetDocument="setDocument"
|
||||
@onRemoveDocument="removeDocument"
|
||||
@onSetFileDocument="setFileDocument"
|
||||
@onSetTextDocument="setTextDocument"
|
||||
@onSetURLDocument="setURLDocument" />
|
||||
@on-set-document="setDocument"
|
||||
@on-remove-document="removeDocument"
|
||||
@on-set-file-document="setFileDocument"
|
||||
@on-set-text-document="setTextDocument"
|
||||
@on-set-url-document="setURLDocument" />
|
||||
|
||||
<hr v-if="shouldDisplayItemEditionDocument && shouldDisplayItemEditionThumbnail">
|
||||
|
||||
|
@ -579,9 +579,9 @@
|
|||
:form="form"
|
||||
:collection="collection"
|
||||
:is-loading="isLoading"
|
||||
@onDeleteThumbnail="deleteThumbnail"
|
||||
@onUpdateThumbnailAlt="($event) => onUpdateThumbnailAlt($event)"
|
||||
@openThumbnailMediaFrame="thumbnailMediaFrame.openFrame($event)" />
|
||||
@on-delete-thumbnail="deleteThumbnail"
|
||||
@on-update-thumbnail-alt="($event) => onUpdateThumbnailAlt($event)"
|
||||
@open-thumbnail-media-frame="thumbnailMediaFrame.openFrame($event)" />
|
||||
|
||||
<hr v-if="(shouldDisplayItemEditionAttachments && !$adminOptions.itemEditionAttachmentsInsideTabs) || hasEndLeftForm">
|
||||
|
||||
|
@ -594,8 +594,8 @@
|
|||
:is-loading="isLoading"
|
||||
:total-attachments="totalAttachments"
|
||||
:should-load-attachments="shouldLoadAttachments"
|
||||
@openAttachmentsMediaFrame="($event) => attachmentsMediaFrame.openFrame($event)"
|
||||
@onDeleteAttachment="deleteAttachment($event)" />
|
||||
@open-attachments-media-frame="($event) => attachmentsMediaFrame.openFrame($event)"
|
||||
@on-delete-attachment="deleteAttachment($event)" />
|
||||
|
||||
<hr v-if="hasEndLeftForm">
|
||||
|
||||
|
@ -615,6 +615,12 @@
|
|||
|
||||
</form>
|
||||
|
||||
</transition>
|
||||
|
||||
<transition
|
||||
mode="out-in"
|
||||
:name="(isOnSequenceEdit && sequenceRightDirection != undefined) ? (sequenceRightDirection ? 'page-right' : 'page-left') : ''">
|
||||
|
||||
<!-- In case user enters this page whithout having permission -->
|
||||
<template v-if="!isLoading && ((isCreatingNewItem && collection && collection.current_user_can_edit_items == false) || (!isCreatingNewItem && item && item.current_user_can_edit != undefined && collection && collection.current_user_can_edit_items == false))">
|
||||
<section class="section">
|
||||
|
@ -649,8 +655,8 @@
|
|||
v-if="!$adminOptions.mobileAppMode"
|
||||
class="update-info-section">
|
||||
<p
|
||||
class="footer-message"
|
||||
v-if="isOnSequenceEdit">
|
||||
v-if="isOnSequenceEdit"
|
||||
class="footer-message">
|
||||
{{ $i18n.get('label_sequence_editing_item') + " " + itemPosition + " " + $i18n.get('info_of') + " " + ((group != null && group.items_count != undefined) ? group.items_count : '') + "." }}
|
||||
</p>
|
||||
<p class="footer-message">
|
||||
|
@ -662,28 +668,37 @@
|
|||
</span>
|
||||
<span>{{ $i18n.get('info_updating_metadata_values') }}</span>
|
||||
</span>
|
||||
<span v-else>{{ ($i18n.get('info_updated_at') + ' ' + lastUpdated) }}</span>
|
||||
<template v-else>
|
||||
<span
|
||||
v-if="form.status === 'auto-draft'"
|
||||
class="has-text-warning">
|
||||
{{ $i18n.get('info_autodraft_updated') }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ ($i18n.get('info_updated_at') + ' ' + lastUpdated) }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<span class="help is-danger">
|
||||
{{ formErrorMessage }}
|
||||
<item-metadatum-errors-tooltip
|
||||
v-if="formErrors.length"
|
||||
:form-errors="formErrors" />
|
||||
v-if="errors.length"
|
||||
:form-errors="errors" />
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<!-- Comment Status ------------------------ -->
|
||||
<div
|
||||
v-if="collection && collection.allow_comments && collection.allow_comments == 'open' && !$adminOptions.hideItemEditionCommentsToggle"
|
||||
style="margin-left: 2em;"
|
||||
class="section-status"
|
||||
v-if="collection && collection.allow_comments && collection.allow_comments == 'open' && !$adminOptions.hideItemEditionCommentsToggle">
|
||||
class="section-status">
|
||||
<div class="field has-addons">
|
||||
<b-switch
|
||||
id="tainacan-checkbox-comment-status"
|
||||
v-model="form.comment_status"
|
||||
size="is-small"
|
||||
true-value="open"
|
||||
false-value="closed"
|
||||
v-model="form.comment_status">
|
||||
false-value="closed">
|
||||
<span class="icon has-text-gray4">
|
||||
<i class="tainacan-icon tainacan-icon-comment" />
|
||||
</span>
|
||||
|
@ -708,21 +723,22 @@
|
|||
:current-user-can-delete="item && item.current_user_can_delete"
|
||||
:current-user-can-publish="collection && collection.current_user_can_publish_items"
|
||||
:is-editing-item-metadata-inside-iframe="isEditingItemMetadataInsideIframe"
|
||||
@onSubmit="onSubmit"
|
||||
@onDiscard="onDiscard"
|
||||
@onPrevInSequence="onPrevInSequence"
|
||||
@onNextInSequence="onNextInSequence" />
|
||||
@on-submit="onSubmit"
|
||||
@on-discard="onDiscard"
|
||||
@on-prev-in-sequence="onPrevInSequence"
|
||||
@on-next-in-sequence="onNextInSequence" />
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { nextTick, defineAsyncComponent } from 'vue';
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
|
||||
import { eventBusItemMetadata } from '../../js/event-bus-item-metadata';
|
||||
import wpMediaFrames from '../../js/wp-media-frames';
|
||||
import { formHooks } from '../../js/mixins';
|
||||
import { itemMetadataMixin } from '../../js/item-metadata-mixin';
|
||||
|
||||
import RelatedItemsList from '../lists/related-items-list.vue';
|
||||
import CustomDialog from '../other/custom-dialog.vue';
|
||||
|
@ -737,7 +753,9 @@ import ItemFormFooterButtons from './item-form-footer-buttons.vue';
|
|||
import 'swiper/css';
|
||||
import 'swiper/css/mousewheel';
|
||||
import 'swiper/css/navigation';
|
||||
import Swiper, { Mousewheel, Navigation } from 'swiper';
|
||||
|
||||
import Swiper from 'swiper';
|
||||
import { Mousewheel, Navigation } from 'swiper/modules';
|
||||
|
||||
export default {
|
||||
name: 'ItemEditionForm',
|
||||
|
@ -747,9 +765,10 @@ export default {
|
|||
ItemThumbnailEditionForm,
|
||||
ItemDocumentEditionForm,
|
||||
ItemAttachmentsEditionForm,
|
||||
ItemFormFooterButtons
|
||||
ItemFormFooterButtons,
|
||||
TainacanFormItem: defineAsyncComponent(() => import('../metadata-types/tainacan-form-item.vue')),
|
||||
},
|
||||
mixins: [ formHooks ],
|
||||
mixins: [ formHooks, itemMetadataMixin ],
|
||||
beforeRouteLeave ( to, from, next ) {
|
||||
if (this.item.status == 'auto-draft') {
|
||||
this.$buefy.modal.open({
|
||||
|
@ -771,15 +790,18 @@ export default {
|
|||
next()
|
||||
}
|
||||
},
|
||||
emits: [
|
||||
'toggleItemEditionFooterDropdown'
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
swiper: {},
|
||||
selected: 'Home',
|
||||
pageTitle: '',
|
||||
itemId: Number,
|
||||
itemId: [String, Number],
|
||||
item: {},
|
||||
itemRequestCancel: undefined,
|
||||
collectionId: Number,
|
||||
collectionId: [String, Number],
|
||||
sequenceId: Number,
|
||||
itemPosition: Number,
|
||||
isCreatingNewItem: false,
|
||||
|
@ -791,7 +813,7 @@ export default {
|
|||
metadataSectionCollapses: [],
|
||||
collapseAll: true,
|
||||
form: {
|
||||
collectionId: Number,
|
||||
collectionId: [String, Number],
|
||||
status: '',
|
||||
document: '',
|
||||
document_type: '',
|
||||
|
@ -827,11 +849,12 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
collection() {
|
||||
return this.getCollection()
|
||||
},
|
||||
...mapGetters('collection', {
|
||||
'collection': 'getCollection'
|
||||
}),
|
||||
itemMetadata() {
|
||||
const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata()));
|
||||
|
||||
const tweakedItemMetadata = realItemMetadata.map((anItemMetadatum) => {
|
||||
|
||||
// We need this because repository level metadata have an array of section IDs
|
||||
|
@ -854,30 +877,20 @@ export default {
|
|||
});
|
||||
return tweakedItemMetadata;
|
||||
},
|
||||
metadataSections() {
|
||||
return this.getMetadataSections();
|
||||
},
|
||||
lastUpdated() {
|
||||
return this.getLastUpdated();
|
||||
},
|
||||
group() {
|
||||
return this.getGroup();
|
||||
},
|
||||
itemIdInSequence() {
|
||||
return this.getItemIdInSequence();
|
||||
},
|
||||
totalAttachments() {
|
||||
return this.getTotalAttachments();
|
||||
},
|
||||
...mapGetters('metadata', {
|
||||
'metadataSections': 'getMetadataSections'
|
||||
}),
|
||||
...mapGetters('item', {
|
||||
'totalAttachments': 'getTotalAttachments',
|
||||
'lastUpdated': 'getLastUpdated'
|
||||
}),
|
||||
...mapGetters('bulkedition', {
|
||||
'itemIdInSequence': 'getItemIdInSequence',
|
||||
'group': 'getGroup'
|
||||
}),
|
||||
totalRelatedItems() {
|
||||
return (this.item && this.item.related_items) ? Object.values(this.item.related_items).reduce((totalItems, aRelatedItemsGroup) => totalItems + parseInt(aRelatedItemsGroup.total_items), 0) : false;
|
||||
},
|
||||
formErrors() {
|
||||
return eventBusItemMetadata && eventBusItemMetadata.errors && eventBusItemMetadata.errors.length ? eventBusItemMetadata.errors : []
|
||||
},
|
||||
conditionalSections() {
|
||||
return eventBusItemMetadata && eventBusItemMetadata.conditionalSections ? eventBusItemMetadata.conditionalSections : [];
|
||||
},
|
||||
isEditingItemMetadataInsideIframe() {
|
||||
return this.$route.query && this.$route.query.editingmetadata;
|
||||
},
|
||||
|
@ -946,7 +959,7 @@ export default {
|
|||
|
||||
// Clear form variables
|
||||
this.cleanItemMetadata();
|
||||
eventBusItemMetadata.clearAllErrors();
|
||||
this.clearAllErrors();
|
||||
this.formErrorMessage = '';
|
||||
|
||||
this.isLoading = true;
|
||||
|
@ -974,7 +987,7 @@ export default {
|
|||
if (typeof this.swiper.update == 'function')
|
||||
this.swiper.update();
|
||||
else {
|
||||
this.$nextTick(() => {
|
||||
nextTick(() => {
|
||||
this.swiper = new Swiper('#tainacanTabsSwiper', {
|
||||
watchOverflow: true,
|
||||
mousewheel: true,
|
||||
|
@ -994,13 +1007,14 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// Obtains collection ID
|
||||
this.cleanItemMetadata();
|
||||
eventBusItemMetadata.clearAllErrors();
|
||||
this.clearAllErrors();
|
||||
this.formErrorMessage = '';
|
||||
this.collectionId = this.$route.params.collectionId;
|
||||
this.form.collectionId = this.collectionId;
|
||||
|
@ -1062,12 +1076,12 @@ export default {
|
|||
* Creates the conditional metadata set to later watch values
|
||||
* of certain metadata that control sections visibility.
|
||||
*/
|
||||
eventBusItemMetadata.conditionalSections = {};
|
||||
this.conditionalSections = {};
|
||||
for (let metadataSection of metadataSections) {
|
||||
if ( metadataSection.is_conditional_section == 'yes') {
|
||||
const conditionalSectionId = Object.keys(metadataSection.conditional_section_rules);
|
||||
if ( conditionalSectionId.length ) {
|
||||
eventBusItemMetadata.conditionalSections[metadataSection.id] = {
|
||||
this.conditionalSections[metadataSection.id] = {
|
||||
sectionId: metadataSection.id,
|
||||
metadatumId: conditionalSectionId[0],
|
||||
metadatumValues: metadataSection.conditional_section_rules[conditionalSectionId[0]],
|
||||
|
@ -1083,22 +1097,13 @@ export default {
|
|||
});
|
||||
|
||||
// Sets feedback variables
|
||||
eventBusItemMetadata.$on('isUpdatingValue', (status) => {
|
||||
this.isUpdatingValues = status;
|
||||
});
|
||||
eventBusItemMetadata.$on('hasErrorsOnForm', (hasErrors) => {
|
||||
if (hasErrors)
|
||||
this.formErrorMessage = this.formErrorMessage ? this.formErrorMessage : this.$i18n.get('info_errors_in_form');
|
||||
else
|
||||
this.formErrorMessage = '';
|
||||
});
|
||||
this.cleanLastUpdated();
|
||||
|
||||
// Updates variables for metadata navigation from compound childs
|
||||
eventBusItemMetadata.$on('isOnFirstMetadatumOfCompoundNavigation', (isOnFirstMetadatumOfCompoundNavigation) => {
|
||||
this.$emitter.on('isOnFirstMetadatumOfCompoundNavigation', (isOnFirstMetadatumOfCompoundNavigation) => {
|
||||
this.isOnFirstMetadatumOfCompoundNavigation = isOnFirstMetadatumOfCompoundNavigation
|
||||
});
|
||||
eventBusItemMetadata.$on('isOnLastMetadatumOfCompoundNavigation', (isOnLastMetadatumOfCompoundNavigation) => {
|
||||
this.$emitter.on('isOnLastMetadatumOfCompoundNavigation', (isOnLastMetadatumOfCompoundNavigation) => {
|
||||
this.isOnLastMetadatumOfCompoundNavigation = isOnLastMetadatumOfCompoundNavigation
|
||||
});
|
||||
|
||||
|
@ -1110,11 +1115,9 @@ export default {
|
|||
if (this.$adminOptions.mobileAppMode)
|
||||
this.isMobileSubheaderOpen = true;
|
||||
},
|
||||
beforeDestroy () {
|
||||
eventBusItemMetadata.$off('isUpdatingValue');
|
||||
eventBusItemMetadata.$off('hasErrorsOnForm');
|
||||
eventBusItemMetadata.$off('isOnFirstMetadatumOfCompoundNavigation');
|
||||
eventBusItemMetadata.$off('isOnLastMetadatumOfCompoundNavigation');
|
||||
beforeUnmount () {
|
||||
this.$emitter.off('isOnFirstMetadatumOfCompoundNavigation');
|
||||
this.$emitter.off('isOnLastMetadatumOfCompoundNavigation');
|
||||
window.removeEventListener('resize', this.handleWindowResize);
|
||||
if (typeof this.swiper.destroy == 'function')
|
||||
this.swiper.destroy();
|
||||
|
@ -1137,30 +1140,17 @@ export default {
|
|||
]),
|
||||
...mapGetters('item',[
|
||||
'getItemMetadata',
|
||||
'getTotalAttachments',
|
||||
'getLastUpdated',
|
||||
'getAttachments'
|
||||
]),
|
||||
...mapActions('collection', [
|
||||
'deleteItem',
|
||||
]),
|
||||
...mapGetters('collection', [
|
||||
'getCollection',
|
||||
]),
|
||||
...mapActions('bulkedition', [
|
||||
'fetchItemIdInSequence',
|
||||
'fetchSequenceGroup'
|
||||
]),
|
||||
...mapGetters('bulkedition', [
|
||||
'getItemIdInSequence',
|
||||
'getGroup'
|
||||
]),
|
||||
...mapActions('metadata',[
|
||||
'fetchMetadataSections'
|
||||
]),
|
||||
...mapGetters('metadata',[
|
||||
'getMetadataSections'
|
||||
]),
|
||||
onSubmit(status, sequenceDirection) {
|
||||
|
||||
// Puts loading on Item edition
|
||||
|
@ -1182,7 +1172,7 @@ export default {
|
|||
promise = this.updateItem(data);
|
||||
|
||||
// Clear errors so we don't have them duplicated from api
|
||||
eventBusItemMetadata.errors = [];
|
||||
this.errors = [];
|
||||
|
||||
promise.then(updatedItem => {
|
||||
|
||||
|
@ -1241,7 +1231,7 @@ export default {
|
|||
if (errors.errors) {
|
||||
for (let error of errors.errors) {
|
||||
for (let metadatum of Object.keys(error)){
|
||||
eventBusItemMetadata.errors.push({
|
||||
this.errors.push({
|
||||
metadatum_id: metadatum,
|
||||
errors: error[metadatum]
|
||||
});
|
||||
|
@ -1255,6 +1245,12 @@ export default {
|
|||
this.isLoading = false;
|
||||
});
|
||||
},
|
||||
hasErrorsOnForm(hasErrors) {
|
||||
if (hasErrors)
|
||||
this.formErrorMessage = this.formErrorMessage ? this.formErrorMessage : this.$i18n.get('info_errors_in_form');
|
||||
else
|
||||
this.formErrorMessage = '';
|
||||
},
|
||||
onDiscard() {
|
||||
if (!this.$adminOptions.itemEditionMode && !this.$adminOptions.mobileAppMode)
|
||||
this.$router.go(-1);
|
||||
|
@ -1271,13 +1267,13 @@ export default {
|
|||
this.isLoading = true;
|
||||
|
||||
// Updates Collection BreadCrumb
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||
{ path: '', label: this.$i18n.get('new') }
|
||||
]);
|
||||
|
||||
// Clear errors so we don't have them duplicated from api
|
||||
eventBusItemMetadata.errors = [];
|
||||
this.errors = [];
|
||||
|
||||
// Creates draft Item
|
||||
this.form.comment_status = this.form.comment_status == 'open' ? 'open' : 'closed';
|
||||
|
@ -1306,7 +1302,7 @@ export default {
|
|||
|
||||
// If a parameter was passed with a suggestion of item title, also send a patch to item metadata
|
||||
if (this.$route.query.newitemtitle) {
|
||||
eventBusItemMetadata.$emit('input', {
|
||||
this.updateItemMetadataValue({
|
||||
itemId: this.itemId,
|
||||
metadatumId: this.$route.query.newmetadatumid,
|
||||
values: this.$route.query.newitemtitle,
|
||||
|
@ -1350,8 +1346,8 @@ export default {
|
|||
const currentItemMetadatum = metadata.find(anItemMetadatum => anItemMetadatum.metadatum.id == this.conditionalSections[conditionalSectionId].metadatumId);
|
||||
if (currentItemMetadatum) {
|
||||
const itemMetadatumValues = Array.isArray(currentItemMetadatum.value) ? currentItemMetadatum.value : [ currentItemMetadatum.value ];
|
||||
const conditionalValues = Array.isArray(eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues) ? eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues : [eventBusItemMetadata.conditionalSections[conditionalSectionId].metadatumValues];
|
||||
eventBusItemMetadata.conditionalSections[conditionalSectionId].hide = Array.isArray(itemMetadatumValues) ? itemMetadatumValues.every(aValue => conditionalValues.indexOf(aValue['id'] ? aValue['id'] : aValue) < 0) : conditionalValues.indexOf(itemMetadatumValues) < 0;
|
||||
const conditionalValues = Array.isArray(this.conditionalSections[conditionalSectionId].metadatumValues) ? this.conditionalSections[conditionalSectionId].metadatumValues : [this.conditionalSections[conditionalSectionId].metadatumValues];
|
||||
this.conditionalSections[conditionalSectionId].hide = Array.isArray(itemMetadatumValues) ? itemMetadatumValues.every(aValue => conditionalValues.indexOf(aValue['id'] ? aValue['id'] : aValue) < 0) : conditionalValues.indexOf(itemMetadatumValues) < 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1405,7 +1401,7 @@ export default {
|
|||
.catch((errors) => {
|
||||
for (let error of errors.errors) {
|
||||
for (let metadatum of Object.keys(error)){
|
||||
eventBusItemMetadata.errors.push({
|
||||
this.errors.push({
|
||||
metadatum_id: metadatum,
|
||||
errors: error[metadatum]
|
||||
});
|
||||
|
@ -1488,7 +1484,7 @@ export default {
|
|||
.catch((errors) => {
|
||||
for (let error of errors.errors) {
|
||||
for (let metadatum of Object.keys(error)){
|
||||
eventBusItemMetadata.errors.push({
|
||||
this.errors.push({
|
||||
metadatum_id: metadatum,
|
||||
errors: error[metadatum]
|
||||
});
|
||||
|
@ -1516,7 +1512,7 @@ export default {
|
|||
.catch((errors) => {
|
||||
for (let error of errors.errors) {
|
||||
for (let metadatum of Object.keys(error)){
|
||||
eventBusItemMetadata.errors.push({
|
||||
this.errors.push({
|
||||
metadatum_id: metadatum,
|
||||
errors: error[metadatum]
|
||||
});
|
||||
|
@ -1591,7 +1587,7 @@ export default {
|
|||
.catch((errors) => {
|
||||
for (let error of errors.errors) {
|
||||
for (let metadatum of Object.keys(error)){
|
||||
eventBusItemMetadata.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
||||
this.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
||||
}
|
||||
}
|
||||
this.formErrorMessage = errors.error_message;
|
||||
|
@ -1657,18 +1653,18 @@ export default {
|
|||
this.metadataCollapses[i] = this.collapseAll;
|
||||
|
||||
for (let i = 0; i < this.metadataSectionCollapses.length; i++)
|
||||
this.$set(this.metadataSectionCollapses, i, this.collapseAll);
|
||||
Object.assign(this.metadataSectionCollapses, { [i]: this.collapseAll });
|
||||
|
||||
},
|
||||
onChangeCollapse(event, index) {
|
||||
if (event && !this.metadataCollapses[index] && this.itemMetadata[index].metadatum && this.itemMetadata[index].metadatum['metadata_type'] === "Tainacan\\Metadata_Types\\GeoCoordinate")
|
||||
eventBusItemMetadata.$emit('itemEditionFormResize');
|
||||
this.$emitter.emit('itemEditionFormResize');
|
||||
|
||||
this.metadataCollapses.splice(index, 1, event);
|
||||
},
|
||||
toggleMetadataSectionCollapse(sectionIndex) {
|
||||
if (!this.isMetadataNavigation)
|
||||
this.$set(this.metadataSectionCollapses, sectionIndex, (this.errorMessage ? true : !this.metadataSectionCollapses[sectionIndex]));
|
||||
Object.assign( this.metadataSectionCollapses, { [sectionIndex]: (this.formErrorMessage ? true : !this.metadataSectionCollapses[sectionIndex]) });
|
||||
},
|
||||
onDeletePermanently() {
|
||||
this.$buefy.modal.open({
|
||||
|
@ -1709,14 +1705,14 @@ export default {
|
|||
|
||||
// Updates Collection BreadCrumb
|
||||
if (this.isOnSequenceEdit) {
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||
{ path: '', label: this.$i18n.get('sequence') },
|
||||
{ path: '', label: this.item.title },
|
||||
{ path: '', label: this.$i18n.get('edit') }
|
||||
]);
|
||||
} else {
|
||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
||||
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||
{ path: this.$routerHelper.getItemPath(this.form.collectionId, this.itemId), label: this.item.title },
|
||||
{ path: '', label: this.$i18n.get('edit') }
|
||||
|
@ -1724,7 +1720,7 @@ export default {
|
|||
}
|
||||
|
||||
// Fills hook forms with it's real values
|
||||
this.$nextTick()
|
||||
nextTick()
|
||||
.then(() => {
|
||||
this.updateExtraFormData(this.item);
|
||||
});
|
||||
|
@ -1801,8 +1797,8 @@ export default {
|
|||
this.openMetadataNameFilter = false;
|
||||
},
|
||||
handleWindowResize: _.debounce( function() {
|
||||
this.$nextTick(() => {
|
||||
eventBusItemMetadata.$emit('itemEditionFormResize');
|
||||
nextTick(() => {
|
||||
this.$emitter.emit('itemEditionFormResize');
|
||||
if (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)
|
||||
this.isMobileScreen = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= 768;
|
||||
});
|
||||
|
@ -1812,14 +1808,14 @@ export default {
|
|||
const isPreviouslyFocusedOnCompoundMetadatum = previouslyFocusedMetadatum.metadatum && previouslyFocusedMetadatum.metadatum.metadata_type === 'Tainacan\\Metadata_Types\\Compound';
|
||||
|
||||
if (isPreviouslyFocusedOnCompoundMetadatum || this.isCurrentlyFocusedOnCompoundMetadatum)
|
||||
eventBusItemMetadata.$emit('focusPreviousChildMetadatum');
|
||||
this.$emitter.emit('focusPreviousChildMetadatum');
|
||||
|
||||
if ( !this.isCurrentlyFocusedOnCompoundMetadatum || (this.isCurrentlyFocusedOnCompoundMetadatum && this.isOnFirstMetadatumOfCompoundNavigation) )
|
||||
this.setMetadatumFocus({ index: this.focusedMetadatum - 1, scrollIntoView: true });
|
||||
},
|
||||
focusNextMetadatum() {
|
||||
if (this.isCurrentlyFocusedOnCompoundMetadatum && !this.isOnLastMetadatumOfCompoundNavigation)
|
||||
eventBusItemMetadata.$emit('focusNextChildMetadatum');
|
||||
this.$emitter.emit('focusNextChildMetadatum');
|
||||
|
||||
if ( !this.isCurrentlyFocusedOnCompoundMetadatum || (this.isCurrentlyFocusedOnCompoundMetadatum && this.isOnLastMetadatumOfCompoundNavigation) )
|
||||
this.setMetadatumFocus({ index: this.focusedMetadatum + 1, scrollIntoView: true });
|
||||
|
@ -1879,7 +1875,7 @@ export default {
|
|||
},
|
||||
getMetadatumOrderInSection(sectionIndex, metadatum) {
|
||||
|
||||
if ( !Array.isArray(this.collection['metadata_section_order']) || !this.collection['metadata_section_order'][sectionIndex] || !Array.isArray(this.collection['metadata_section_order'][sectionIndex]['metadata_order']) )
|
||||
if ( !this.collection || !Array.isArray(this.collection['metadata_section_order']) || !this.collection['metadata_section_order'][sectionIndex] || !Array.isArray(this.collection['metadata_section_order'][sectionIndex]['metadata_order']) )
|
||||
return -1;
|
||||
|
||||
let enabledMetadata = [];
|
||||
|
@ -2153,7 +2149,7 @@ export default {
|
|||
.metadata-navigation {
|
||||
margin-right: auto;
|
||||
}
|
||||
.metadata-navigation /deep/ .button {
|
||||
.metadata-navigation :deep(.button) {
|
||||
border-radius: 0 !important;
|
||||
margin-left: 0;
|
||||
min-height: 2.25em;
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<!-- Item edition inside iframe -->
|
||||
<template v-if="isEditingItemMetadataInsideIframe">
|
||||
<button
|
||||
@click="$emit('onSubmit')"
|
||||
type="button"
|
||||
class="button is-secondary">
|
||||
class="button is-secondary"
|
||||
@click="$emit('on-submit')">
|
||||
{{ $i18n.get('label_back_to_related_item') }}
|
||||
</button>
|
||||
</template>
|
||||
|
@ -17,9 +17,9 @@
|
|||
<!-- Sequence edition Previous -->
|
||||
<button
|
||||
v-if="isOnSequenceEdit && hasPreviousItemOnSequenceEdit"
|
||||
@click="$emit('onPrevInSequence')"
|
||||
type="button"
|
||||
class="button sequence-button">
|
||||
class="button sequence-button"
|
||||
@click="$emit('on-prev-in-sequence')">
|
||||
<span class="icon is-large">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-previous" />
|
||||
</span>
|
||||
|
@ -30,14 +30,14 @@
|
|||
<template v-if="(status == 'auto-draft' || status == undefined)">
|
||||
<button
|
||||
v-if="!$adminOptions.mobileAppMode"
|
||||
@click="$emit('onDiscard')"
|
||||
type="button"
|
||||
class="button is-outlined">{{ $i18n.get('label_discard') }}</button>
|
||||
class="button is-outlined"
|
||||
@click="$emit('on-discard')">{{ $i18n.get('label_discard') }}</button>
|
||||
<button
|
||||
@click="openItemCreationStatusDialog"
|
||||
type="button"
|
||||
class="button is-secondary"
|
||||
:style="{ marginLeft: $adminOptions.mobileAppMode ? 'auto' : '0.5em' }">{{ $i18n.get('label_create_item') }}</button>
|
||||
:style="{ marginLeft: $adminOptions.mobileAppMode ? 'auto' : '0.5em' }"
|
||||
@click="openItemCreationStatusDialog">{{ $i18n.get('label_create_item') }}</button>
|
||||
</template>
|
||||
|
||||
<!-- Item is public, draft or private -->
|
||||
|
@ -46,9 +46,9 @@
|
|||
<!-- Send items to Trash -->
|
||||
<button
|
||||
v-if="!isOnSequenceEdit && currentUserCanDelete && !$adminOptions.mobileAppMode"
|
||||
@click="$emit('onSubmit', 'trash')"
|
||||
type="button"
|
||||
class="button is-outlined">
|
||||
class="button is-outlined"
|
||||
@click="$emit('on-submit', 'trash')">
|
||||
<span v-if="!isMobileScreen">{{ $i18n.get('label_send_to_trash') }}</span>
|
||||
<span v-else>{{ $i18n.get('status_trash') }}</span>
|
||||
</button>
|
||||
|
@ -67,17 +67,17 @@
|
|||
<template #trigger>
|
||||
<button
|
||||
:disabled="hasSomeError && (status == 'publish' || status == 'private')"
|
||||
@click="!$adminOptions.mobileAppMode && !isMobileScreen ? $emit(
|
||||
'onSubmit',
|
||||
( currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption ) ? status : 'draft',
|
||||
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
||||
) : ($refs && $refs['item-edition-footer-dropdown'] && !$refs['item-edition-footer-dropdown'].isActive ? $refs['item-edition-footer-dropdown'].toggle() : null)"
|
||||
type="button"
|
||||
class="button"
|
||||
:class="{
|
||||
'is-success': status == 'publish' || status == 'private',
|
||||
'is-secondary': status == 'draft'
|
||||
}">
|
||||
}"
|
||||
@click="!$adminOptions.mobileAppMode && !isMobileScreen ? $emit(
|
||||
'on-submit',
|
||||
( currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption ) ? status : 'draft',
|
||||
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
||||
) : ($refs && $refs['item-edition-footer-dropdown'] && !$refs['item-edition-footer-dropdown'].isActive ? $refs['item-edition-footer-dropdown'].toggle() : null)">
|
||||
{{ $i18n.get('label_update') }}
|
||||
<span
|
||||
v-if="isOnSequenceEdit && !isCurrentItemOnSequenceEdit"
|
||||
|
@ -87,21 +87,21 @@
|
|||
</span>
|
||||
<span
|
||||
v-if="!$adminOptions.mobileAppMode"
|
||||
@mouseenter="$refs && $refs['item-edition-footer-dropdown'] && !$refs['item-edition-footer-dropdown'].isActive ? $refs['item-edition-footer-dropdown'].toggle() : null"
|
||||
style="margin-left: 0.5em;"
|
||||
class="icon is-small">
|
||||
class="icon is-small"
|
||||
@mouseenter="$refs && $refs['item-edition-footer-dropdown'] && !$refs['item-edition-footer-dropdown'].isActive ? $refs['item-edition-footer-dropdown'].toggle() : null">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowup" />
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
<b-dropdown-item
|
||||
:class="{ 'is-forced-last-option': status == 'draft' }"
|
||||
aria-role="listitem"
|
||||
@click="$emit(
|
||||
'onSubmit',
|
||||
'on-submit',
|
||||
'draft',
|
||||
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
||||
)"
|
||||
:class="{ 'is-forced-last-option': status == 'draft' }"
|
||||
aria-role="listitem">
|
||||
)">
|
||||
<span class="icon has-text-gray4">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-draft" />
|
||||
</span>
|
||||
|
@ -109,13 +109,13 @@
|
|||
</b-dropdown-item>
|
||||
<b-dropdown-item
|
||||
v-if="currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption"
|
||||
:class="{ 'is-forced-last-option': status == 'private' }"
|
||||
aria-role="listitem"
|
||||
@click="$emit(
|
||||
'onSubmit',
|
||||
'on-submit',
|
||||
'private',
|
||||
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
||||
)"
|
||||
:class="{ 'is-forced-last-option': status == 'private' }"
|
||||
aria-role="listitem">
|
||||
)">
|
||||
<span class="icon has-text-gray4">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-private" />
|
||||
</span>
|
||||
|
@ -123,12 +123,12 @@
|
|||
</b-dropdown-item>
|
||||
<b-dropdown-item
|
||||
v-if="currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption"
|
||||
aria-role="listitem"
|
||||
@click="$emit(
|
||||
'onSubmit',
|
||||
'on-submit',
|
||||
'publish',
|
||||
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
||||
)"
|
||||
aria-role="listitem">
|
||||
)">
|
||||
<span class="icon has-text-gray4">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-public" />
|
||||
</span>
|
||||
|
@ -140,13 +140,13 @@
|
|||
<button
|
||||
v-else
|
||||
:disabled="hasSomeError && (status == 'publish' || status == 'private')"
|
||||
@click="$emit('onSubmit', status)"
|
||||
type="button"
|
||||
class="button"
|
||||
:class="{
|
||||
'is-success': status == 'publish' || status == 'private',
|
||||
'is-secondary': status == 'draft'
|
||||
}">
|
||||
}"
|
||||
@click="$emit('on-submit', status)">
|
||||
{{ $i18n.get('label_update') }}
|
||||
</button>
|
||||
|
||||
|
@ -156,9 +156,9 @@
|
|||
<button
|
||||
v-if="!currentUserCanPublish && isOnSequenceEdit && hasNextItemOnSequenceEdit"
|
||||
:disabled="(status == 'publish' || status == 'private') && hasSomeError"
|
||||
@click="$emit('onNextInSequence')"
|
||||
type="button"
|
||||
class="button is-success">
|
||||
class="button is-success"
|
||||
@click="$emit('on-next-in-sequence')">
|
||||
<span>{{ $i18n.get('label_next') }}</span>
|
||||
<span class="icon is-large">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-next" />
|
||||
|
@ -168,9 +168,9 @@
|
|||
<!-- Sequence edition Finish -->
|
||||
<button
|
||||
v-if="isOnSequenceEdit && isCurrentItemOnSequenceEdit"
|
||||
@click="$router.push($routerHelper.getCollectionPath(collectionId))"
|
||||
type="button"
|
||||
class="button sequence-button">
|
||||
class="button sequence-button"
|
||||
@click="$router.push($routerHelper.getCollectionPath(collectionId))">
|
||||
<span class="icon is-large">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-approved" />
|
||||
</span>
|
||||
|
@ -188,7 +188,7 @@ import ItemCreationStatusDialog from '../other/item-creation-status-dialog.vue';
|
|||
export default {
|
||||
props: {
|
||||
status: String,
|
||||
collectionId: Number,
|
||||
collectionId: [Number, String],
|
||||
isOnSequenceEdit: Boolean,
|
||||
isCurrentItemOnSequenceEdit: Boolean,
|
||||
hasNextItemOnSequenceEdit: Boolean,
|
||||
|
@ -199,14 +199,20 @@ export default {
|
|||
currentUserCanPublish: Boolean,
|
||||
isEditingItemMetadataInsideIframe: Boolean
|
||||
},
|
||||
emits: [
|
||||
'on-submit',
|
||||
'on-next-in-sequence',
|
||||
'on-prev-in-sequence',
|
||||
'on-discard',
|
||||
],
|
||||
mounted() {
|
||||
this.$parent.$on('toggleItemEditionFooterDropdown', () => {
|
||||
this.$emitter.on('toggleItemEditionFooterDropdown', () => {
|
||||
if (this.$refs && this.$refs['item-edition-footer-dropdown'])
|
||||
this.$refs['item-edition-footer-dropdown'].toggle();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$parent.$off('toggleItemEditionFooterDropdown');
|
||||
beforeUnmount() {
|
||||
this.$emitter.off('toggleItemEditionFooterDropdown');
|
||||
},
|
||||
methods: {
|
||||
openItemCreationStatusDialog() {
|
||||
|
@ -219,7 +225,7 @@ export default {
|
|||
icon: 'item',
|
||||
currentUserCanPublish: this.currentUserCanPublish,
|
||||
onConfirm: (selectedStatus) => {
|
||||
this.$emit('onSubmit', selectedStatus);
|
||||
this.$emit('on-submit', selectedStatus);
|
||||
}
|
||||
},
|
||||
trapFocus: true,
|
||||
|
@ -244,7 +250,7 @@ export default {
|
|||
margin-right: 0px;
|
||||
}
|
||||
|
||||
/deep/ .item-edition-footer-dropdown {
|
||||
:deep(.item-edition-footer-dropdown) {
|
||||
.dropdown-trigger .button>.icon.is-small {
|
||||
border-left: 1px solid rgba(255,255,255,0.6);
|
||||
margin-left: 0.5em;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
</div>
|
||||
<div
|
||||
v-if="!isLoading && !$adminOptions.hideItemEditionThumbnail"
|
||||
v-if="!$adminOptions.hideItemEditionThumbnail"
|
||||
class="section-box section-thumbnail">
|
||||
<div class="thumbnail-field">
|
||||
<file-item
|
||||
|
@ -33,8 +33,8 @@
|
|||
v-if="item.thumbnail == undefined || ((item.thumbnail.medium == undefined || item.thumbnail.medium == false) && (item.thumbnail['tainacan-medium'] == undefined || item.thumbnail['tainacan-medium'] == false))"
|
||||
class="image">
|
||||
<span
|
||||
class="image-placeholder"
|
||||
v-if="item.document_type == 'empty' && item.document_mimetype == 'empty'">
|
||||
v-if="item.document_type == 'empty' && item.document_mimetype == 'empty'"
|
||||
class="image-placeholder">
|
||||
{{ $i18n.get('label_empty_thumbnail') }}
|
||||
</span>
|
||||
<img
|
||||
|
@ -57,10 +57,10 @@
|
|||
</b-field>
|
||||
<div class="thumbnail-buttons-row">
|
||||
<a
|
||||
class="button is-rounded is-secondary"
|
||||
id="button-edit-thumbnail"
|
||||
class="button is-rounded is-secondary"
|
||||
:aria-label="$i18n.get('label_button_edit_thumb')"
|
||||
@click.prevent="($event) => $emit('openThumbnailMediaFrame', $event)">
|
||||
@click.prevent="($event) => $emit('open-thumbnail-media-frame', $event)">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('edit'),
|
||||
|
@ -77,7 +77,7 @@
|
|||
id="button-delete-thumbnail"
|
||||
class="button is-rounded is-secondary"
|
||||
:aria-label="$i18n.get('label_button_delete_thumb')"
|
||||
@click="$emit('onDeleteThumbnail')">
|
||||
@click="$emit('on-delete-thumbnail')">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('delete'),
|
||||
|
@ -107,9 +107,14 @@ export default {
|
|||
collection: Object,
|
||||
form: Object
|
||||
},
|
||||
emits: [
|
||||
'open-thumbnail-media-frame',
|
||||
'on-delete-thumbnail',
|
||||
'on-update-thumbnail-alt'
|
||||
],
|
||||
methods: {
|
||||
updateThumbnailAlt: _.debounce(function($event) {
|
||||
this.$emit('onUpdateThumbnailAlt', $event.target.value);
|
||||
this.$emit('on-update-thumbnail-alt', $event.target.value);
|
||||
}, 750)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<form
|
||||
id="metadataSectionEditForm"
|
||||
@submit.prevent="saveEdition(form)"
|
||||
autofocus="true"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-modal>
|
||||
aria-modal
|
||||
@submit.prevent="saveEdition(form)">
|
||||
<div
|
||||
v-if="form && Object.keys(form).length"
|
||||
class="tainacan-modal-content">
|
||||
|
@ -31,8 +31,7 @@
|
|||
:class="formErrors['name'] != undefined ? 'is-danger' : ''">*</span>
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata-sections', 'name')"
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'name')"
|
||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'name')" />
|
||||
</label>
|
||||
<b-input
|
||||
v-model="form.name"
|
||||
|
@ -57,14 +56,13 @@
|
|||
{{ $i18n.get('label_description') }}
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata-sections', 'description')"
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'description')"
|
||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'description')" />
|
||||
</label>
|
||||
<b-input
|
||||
v-model="form.description"
|
||||
type="textarea"
|
||||
name="description"
|
||||
rows="3"
|
||||
v-model="form.description"
|
||||
@focus="clearErrors('description')" />
|
||||
</b-field>
|
||||
|
||||
|
@ -75,16 +73,15 @@
|
|||
:message="formErrors['description_bellow_name'] != undefined ? formErrors['description_bellow_name'] : ''">
|
||||
|
||||
<b-switch
|
||||
size="is-small"
|
||||
@input="clearErrors('description_bellow_name')"
|
||||
v-model="form.description_bellow_name"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
name="description_bellow_name">
|
||||
name="description_bellow_name"
|
||||
@update:model-value="clearErrors('description_bellow_name')">
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata-sections', 'description_bellow_name')"
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'description_bellow_name')"
|
||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'description_bellow_name')" />
|
||||
</b-switch>
|
||||
</b-field>
|
||||
|
||||
|
@ -97,27 +94,26 @@
|
|||
{{ $i18n.get('label_status') }}
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata-sections', 'status')"
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'status')"
|
||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'status')" />
|
||||
</label>
|
||||
<div class="is-flex is-justify-content-space-between">
|
||||
<b-radio
|
||||
@focus="clearErrors('label_status')"
|
||||
id="tainacan-select-status-publish"
|
||||
name="status"
|
||||
v-model="form.status"
|
||||
native-value="publish">
|
||||
name="status"
|
||||
native-value="publish"
|
||||
@focus="clearErrors('label_status')">
|
||||
<span class="icon has-text-gray3">
|
||||
<i class="tainacan-icon tainacan-icon-public" />
|
||||
</span>
|
||||
{{ $i18n.get('status_public') }}
|
||||
</b-radio>
|
||||
<b-radio
|
||||
@focus="clearErrors('label_status')"
|
||||
id="tainacan-select-status-private"
|
||||
name="status"
|
||||
v-model="form.status"
|
||||
native-value="private">
|
||||
name="status"
|
||||
native-value="private"
|
||||
@focus="clearErrors('label_status')">
|
||||
<span class="icon has-text-gray3">
|
||||
<i class="tainacan-icon tainacan-icon-private" />
|
||||
</span>
|
||||
|
@ -130,8 +126,8 @@
|
|||
|
||||
<div
|
||||
v-if="form.id !== 'default_section'"
|
||||
@click="hideConditionalSectionSettings = !hideConditionalSectionSettings;"
|
||||
class="metadata-form-section">
|
||||
class="metadata-form-section"
|
||||
@click="hideConditionalSectionSettings = !hideConditionalSectionSettings;">
|
||||
<span class="icon">
|
||||
<i
|
||||
class="tainacan-icon"
|
||||
|
@ -155,20 +151,21 @@
|
|||
:message="formErrors['is_conditional_section'] != undefined ? formErrors['is_conditional_section'] : ''">
|
||||
|
||||
<b-switch
|
||||
size="is-small"
|
||||
@input="clearErrors('is_conditional_section')"
|
||||
v-model="form.is_conditional_section"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
name="is_conditional_section">
|
||||
name="is_conditional_section"
|
||||
@update:model-value="clearErrors('is_conditional_section')">
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata-sections', 'is_conditional_section')"
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'is_conditional_section')"
|
||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'is_conditional_section')" />
|
||||
</b-switch>
|
||||
</b-field>
|
||||
<div v-if="isConditionalSection && !availableConditionalMetadata.length">
|
||||
<p style="break-inside: avoid;">{{ $i18n.get('info_create_select_metadatum_for_conditional_section') }}</p>
|
||||
<p style="break-inside: avoid;">
|
||||
{{ $i18n.get('info_create_select_metadatum_for_conditional_section') }}
|
||||
</p>
|
||||
</div>
|
||||
<transition name="filter-item">
|
||||
<b-field
|
||||
|
@ -180,13 +177,12 @@
|
|||
{{ $i18n.getHelperTitle('metadata-sections', 'conditional_section_rules') }}
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata-sections', 'conditional_section_rules')"
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'conditional_section_rules')"
|
||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||
:message="$i18n.getHelperMessage('metadata-sections', 'conditional_section_rules')" />
|
||||
</label>
|
||||
<b-select
|
||||
v-model="selectedConditionalMetadatumId"
|
||||
:placeholder="$i18n.get('label_select_metadatum')"
|
||||
@input="reloadConditionalValueComponent()">
|
||||
@update:model-value="reloadConditionalValueComponent()">
|
||||
<option
|
||||
v-for="conditionalMetadatum of availableConditionalMetadata"
|
||||
:key="conditionalMetadatum.id"
|
||||
|
@ -206,14 +202,14 @@
|
|||
{{ selectedConditionalMetadatum.name }}
|
||||
</label>
|
||||
<component
|
||||
v-if="shouldUpdateConditionalValue"
|
||||
:is="selectedConditionalMetadatum.metadata_type_object.component"
|
||||
v-if="shouldUpdateConditionalValue"
|
||||
:forced-component-type="selectedConditionalMetadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
||||
:item-metadatum="{ metadatum: selectedConditionalMetadatum }"
|
||||
:value="Array.isArray(selectedConditionalValue) ? selectedConditionalValue[0] : selectedConditionalValue"
|
||||
:allow-new="false"
|
||||
:maxtags="1"
|
||||
@input="selectConditionalValue"
|
||||
@update:value="($event) => selectConditionalValue($event)"
|
||||
/>
|
||||
</b-field>
|
||||
</transition>
|
||||
|
@ -235,11 +231,13 @@
|
|||
<button
|
||||
type="button"
|
||||
class="button is-outlined"
|
||||
@click.prevent="cancelEdition()"
|
||||
slot="trigger">{{ $i18n.get('cancel') }}
|
||||
@click.prevent="cancelEdition()">
|
||||
{{ $i18n.get('cancel') }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
||||
<p class="help is-danger">
|
||||
{{ formErrorMessage }}
|
||||
</p>
|
||||
<div class="control">
|
||||
<b-button
|
||||
:loading="isUpdating"
|
||||
|
@ -253,11 +251,16 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { nextTick, defineAsyncComponent } from 'vue';
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import { formHooks } from "../../js/mixins";
|
||||
|
||||
export default {
|
||||
name: 'MetadataSectionEditionForm',
|
||||
components:{
|
||||
TainacanSelectbox: defineAsyncComponent(() => import('../metadata-types/selectbox/TainacanSelectbox.vue')),
|
||||
TainacanTaxonomy: defineAsyncComponent(() => import('../metadata-types/taxonomy/TainacanTaxonomy.vue')),
|
||||
},
|
||||
mixins: [ formHooks ],
|
||||
props: {
|
||||
index: '',
|
||||
|
@ -265,6 +268,10 @@
|
|||
collectionId: '',
|
||||
isInsideImporterFlow: false,
|
||||
},
|
||||
emits: [
|
||||
'on-edition-finished',
|
||||
'on-edition-canceled'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
|
@ -317,7 +324,7 @@
|
|||
},
|
||||
mounted() {
|
||||
// Fills hook forms with it's real values
|
||||
this.$nextTick()
|
||||
nextTick()
|
||||
.then(() => {
|
||||
this.updateExtraFormData(this.form);
|
||||
});
|
||||
|
@ -348,7 +355,7 @@
|
|||
this.isUpdating = false;
|
||||
this.closedByForm = true;
|
||||
|
||||
this.$emit('onEditionFinished');
|
||||
this.$emit('on-edition-finished');
|
||||
})
|
||||
.catch((errors) => {
|
||||
this.isUpdating = false;
|
||||
|
@ -367,7 +374,7 @@
|
|||
},
|
||||
cancelEdition() {
|
||||
this.closedByForm = true;
|
||||
this.$emit('onEditionCanceled');
|
||||
this.$emit('on-edition-canceled');
|
||||
},
|
||||
selectConditionalValue(selected) {
|
||||
const selectedValues = Array.isArray(selected) ? selected : [ selected ];
|
||||
|
@ -408,7 +415,7 @@
|
|||
.field > .field:not(:last-child) {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
/deep/ .field {
|
||||
:deep(.field) {
|
||||
-webkit-column-break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
break-inside: avoid;
|
||||
|
@ -427,7 +434,7 @@
|
|||
.tainacan-form .field:not(:last-child) {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.tainacan-form /deep/ .control-label {
|
||||
.tainacan-form :deep(.control-label) {
|
||||
white-space: normal;
|
||||
}
|
||||
.metadata-form-section {
|
||||
|
@ -478,10 +485,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .is-special-hidden-for-mobile,
|
||||
/deep/ .is-special-hidden-for-mobile:focus,
|
||||
/deep/ .is-special-hidden-for-mobile:focus-visible {
|
||||
:deep(.is-special-hidden-for-mobile) {
|
||||
&,
|
||||
&:focus,
|
||||
&:focus-visible {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0 !important;
|
||||
|
@ -495,6 +502,7 @@
|
|||
font-size: 0px !important;
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
.form-submit {
|
||||
background-color: var(--tainacan-gray1);
|
||||
position: sticky;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<form
|
||||
id="metadatumEditForm"
|
||||
@submit.prevent="saveEdition(form)"
|
||||
autofocus="true"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-modal>
|
||||
aria-modal
|
||||
@submit.prevent="saveEdition(form)">
|
||||
<div
|
||||
v-if="form && Object.keys(form).length"
|
||||
class="tainacan-modal-content">
|
||||
|
@ -69,10 +69,10 @@
|
|||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||
</label>
|
||||
<b-input
|
||||
v-model="form.description"
|
||||
type="textarea"
|
||||
name="description"
|
||||
rows="3"
|
||||
v-model="form.description"
|
||||
@focus="clearErrors('description')" />
|
||||
</b-field>
|
||||
|
||||
|
@ -83,12 +83,12 @@
|
|||
:message="formErrors['description_bellow_name'] != undefined ? formErrors['description_bellow_name'] : ''">
|
||||
|
||||
<b-switch
|
||||
size="is-small"
|
||||
@input="clearErrors('description_bellow_name')"
|
||||
v-model="form.description_bellow_name"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
name="description_bellow_name">
|
||||
name="description_bellow_name"
|
||||
@update:model-value="clearErrors('description_bellow_name')">
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata', 'description_bellow_name')"
|
||||
:message="$i18n.getHelperMessage('metadata', 'description_bellow_name')"
|
||||
|
@ -97,7 +97,7 @@
|
|||
</b-field>
|
||||
|
||||
<b-field
|
||||
v-if="form.metadata_type_object.component != 'tainacan-compound'"
|
||||
v-if="form.metadata_type_object.component != 'tainacan-geocoordinate' && form.metadata_type_object.component != 'tainacan-compound'"
|
||||
:addons="false"
|
||||
:type="formErrors['placeholder'] != undefined ? 'is-danger' : ''"
|
||||
:message="formErrors['placeholder'] != undefined ? formErrors['placeholder'] : ''">
|
||||
|
@ -128,22 +128,22 @@
|
|||
</label>
|
||||
<div class="is-flex is-justify-content-space-between">
|
||||
<b-radio
|
||||
@focus="clearErrors('label_status')"
|
||||
id="tainacan-select-status-publish"
|
||||
name="status"
|
||||
v-model="form.status"
|
||||
native-value="publish">
|
||||
name="status"
|
||||
native-value="publish"
|
||||
@focus="clearErrors('label_status')">
|
||||
<span class="icon has-text-gray3">
|
||||
<i class="tainacan-icon tainacan-icon-public" />
|
||||
</span>
|
||||
{{ $i18n.get('status_public') }}
|
||||
</b-radio>
|
||||
<b-radio
|
||||
@focus="clearErrors('label_status')"
|
||||
id="tainacan-select-status-private"
|
||||
name="status"
|
||||
v-model="form.status"
|
||||
native-value="private">
|
||||
name="status"
|
||||
native-value="private"
|
||||
@focus="clearErrors('label_status')">
|
||||
<span class="icon has-text-gray3">
|
||||
<i class="tainacan-icon tainacan-icon-private" />
|
||||
</span>
|
||||
|
@ -166,9 +166,9 @@
|
|||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||
</label>
|
||||
<b-select
|
||||
expanded
|
||||
v-model="form.display"
|
||||
@input="clearErrors('display')">
|
||||
expanded
|
||||
@update:model-value="clearErrors('display')">
|
||||
<option value="yes">
|
||||
{{ $i18n.get('label_display_default') }}
|
||||
</option>
|
||||
|
@ -190,12 +190,12 @@
|
|||
:type="formErrors['required'] != undefined ? 'is-danger' : ''"
|
||||
:message="formErrors['required'] != undefined ? formErrors['required'] : ''">
|
||||
<b-checkbox
|
||||
@input="clearErrors('required')"
|
||||
v-model="form.required"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
class="is-inline-block"
|
||||
name="required">
|
||||
name="required"
|
||||
@update:model-value="clearErrors('required')">
|
||||
{{ $i18n.get('label_required') }}
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata', 'required')"
|
||||
|
@ -209,12 +209,12 @@
|
|||
:type="formErrors['collection_key'] != undefined ? 'is-danger' : ''"
|
||||
:message="formErrors['collection_key'] != undefined ? formErrors['collection_key'] : ''">
|
||||
<b-checkbox
|
||||
@input="clearErrors('collection_key')"
|
||||
v-model="form.collection_key"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
class="is-inline-block"
|
||||
name="collection_key">
|
||||
name="collection_key"
|
||||
@update:model-value="clearErrors('collection_key')">
|
||||
{{ $i18n.get('label_unique_value') }}
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata', 'collection_key')"
|
||||
|
@ -228,12 +228,12 @@
|
|||
:type="formErrors['multiple'] != undefined ? 'is-danger' : ''"
|
||||
:message="formErrors['multiple'] != undefined ? formErrors['multiple'] : ''">
|
||||
<b-checkbox
|
||||
@input="clearErrors('multiple')"
|
||||
v-model="form.multiple"
|
||||
true-value="yes"
|
||||
false-value="no"
|
||||
class="is-inline-block"
|
||||
name="multiple">
|
||||
name="multiple"
|
||||
@update:model-value="clearErrors('multiple')">
|
||||
{{ $i18n.get('label_allow_multiple') }}
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata', 'multiple')"
|
||||
|
@ -250,9 +250,9 @@
|
|||
:label="$i18n.get('label_limit_max_values')">
|
||||
|
||||
<b-switch
|
||||
v-model="showCardinalityOptions"
|
||||
size="is-small"
|
||||
:disabled="form.multiple != 'yes'"
|
||||
v-model="showCardinalityOptions" />
|
||||
:disabled="form.multiple != 'yes'" />
|
||||
</b-field>
|
||||
|
||||
<b-field
|
||||
|
@ -272,17 +272,18 @@
|
|||
name="cardinality"
|
||||
step="1"
|
||||
min="2"
|
||||
v-model="form.cardinality"/>
|
||||
:model-value="form.cardinality ? Number(form.cardinality) : 2"
|
||||
@update:model-value="(newCardinalty) => form.cardinality = newCardinalty" />
|
||||
</b-field>
|
||||
|
||||
<b-field v-if="!isRepositoryLevel && isInsideImporterFlow">
|
||||
<b-checkbox
|
||||
class="is-inline-block"
|
||||
v-model="form.repository_level"
|
||||
@input="clearErrors('repository_level')"
|
||||
class="is-inline-block"
|
||||
name="repository_level"
|
||||
true-value="yes"
|
||||
false-value="no">
|
||||
false-value="no"
|
||||
@update:model-value="clearErrors('repository_level')">
|
||||
{{ $i18n.get('label_repository_metadata') }}
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('metadata', 'repository_level')"
|
||||
|
@ -313,14 +314,14 @@
|
|||
v-show="!hideMetadataTypeOptions"
|
||||
class="options-columns">
|
||||
<component
|
||||
:errors="formErrors['metadata_type_options']"
|
||||
v-if="(form.metadata_type_object && form.metadata_type_object.form_component) || form.edit_form != ''"
|
||||
:is="form.metadata_type_object.form_component"
|
||||
:metadatum="form"
|
||||
v-model="form.metadata_type_options"/>
|
||||
v-if="(form.metadata_type_object && form.metadata_type_object.form_component) || form.edit_form != ''"
|
||||
v-model:value="form.metadata_type_options"
|
||||
:errors="formErrors['metadata_type_options']"
|
||||
:metadatum="form" />
|
||||
<div
|
||||
v-html="form.edit_form"
|
||||
v-else/>
|
||||
v-else
|
||||
v-html="form.edit_form" />
|
||||
|
||||
<!-- Hook for extra Form options -->
|
||||
<template v-if="hasEndLeftForm">
|
||||
|
@ -333,8 +334,8 @@
|
|||
</transition>
|
||||
|
||||
<div
|
||||
@click="showAdvancedOptions = !showAdvancedOptions;"
|
||||
class="metadata-form-section">
|
||||
class="metadata-form-section"
|
||||
@click="showAdvancedOptions = !showAdvancedOptions;">
|
||||
<span class="icon">
|
||||
<i
|
||||
class="tainacan-icon"
|
||||
|
@ -374,11 +375,13 @@
|
|||
<button
|
||||
type="button"
|
||||
class="button is-outlined"
|
||||
@click.prevent="cancelEdition()"
|
||||
slot="trigger">{{ $i18n.get('cancel') }}
|
||||
@click.prevent="cancelEdition()">
|
||||
{{ $i18n.get('cancel') }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
||||
<p class="help is-danger">
|
||||
{{ formErrorMessage }}
|
||||
</p>
|
||||
<div class="control">
|
||||
<b-button
|
||||
:loading="isUpdating"
|
||||
|
@ -392,11 +395,33 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { nextTick } from 'vue';
|
||||
import {mapActions} from 'vuex';
|
||||
import { formHooks } from "../../js/mixins";
|
||||
|
||||
import FormText from '../metadata-types/text/FormText.vue';
|
||||
import FormTextarea from '../metadata-types/textarea/FormTextarea.vue';
|
||||
import FormRelationship from '../metadata-types/relationship/FormRelationship.vue';
|
||||
import FormTaxonomy from '../metadata-types/taxonomy/FormTaxonomy.vue';
|
||||
import FormSelectbox from '../metadata-types/selectbox/FormSelectbox.vue';
|
||||
import FormNumeric from '../metadata-types/numeric/FormNumeric.vue';
|
||||
import FormUser from '../metadata-types/user/FormUser.vue';
|
||||
import FormGeoCoordinate from '../metadata-types/geocoordinate/FormGeoCoordinate.vue';
|
||||
import FormUrl from '../metadata-types/url/FormUrl.vue';
|
||||
|
||||
export default {
|
||||
name: 'MetadatumEditionForm',
|
||||
components: {
|
||||
'tainacan-form-text': FormText,
|
||||
'tainacan-form-textarea': FormTextarea,
|
||||
'tainacan-form-relationship': FormRelationship,
|
||||
'tainacan-form-taxonomy': FormTaxonomy,
|
||||
'tainacan-form-selectbox': FormSelectbox,
|
||||
'tainacan-form-numeric': FormNumeric,
|
||||
'tainacan-form-user': FormUser,
|
||||
'tainacan-form-geocoordinate': FormGeoCoordinate,
|
||||
'tainacan-form-url': FormUrl
|
||||
},
|
||||
mixins: [ formHooks ],
|
||||
props: {
|
||||
index: '',
|
||||
|
@ -406,6 +431,11 @@
|
|||
isParentMultiple: false,
|
||||
isInsideImporterFlow: false
|
||||
},
|
||||
emits: [
|
||||
'on-edition-finished',
|
||||
'on-edition-canceled',
|
||||
'on-error-found'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
|
@ -421,7 +451,7 @@
|
|||
},
|
||||
watch: {
|
||||
showCardinalityOptions() {
|
||||
this.form.cardinality = !this.showCardinalityOptions ? 1 : Number(this.form.cardinality);
|
||||
this.form.cardinality = !this.showCardinalityOptions ? '' : Number(this.form.cardinality);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -438,7 +468,7 @@
|
|||
},
|
||||
mounted() {
|
||||
// Fills hook forms with it's real values
|
||||
this.$nextTick()
|
||||
nextTick()
|
||||
.then(() => {
|
||||
this.updateExtraFormData(this.form);
|
||||
});
|
||||
|
@ -469,7 +499,7 @@
|
|||
this.isUpdating = false;
|
||||
this.closedByForm = true;
|
||||
|
||||
this.$emit('onEditionFinished');
|
||||
this.$emit('on-edition-finished');
|
||||
})
|
||||
.catch((errors) => {
|
||||
this.isUpdating = false;
|
||||
|
@ -514,7 +544,7 @@
|
|||
this.isUpdating = false;
|
||||
this.closedByForm = true;
|
||||
|
||||
this.$emit('onEditionFinished');
|
||||
this.$emit('on-edition-finished');
|
||||
})
|
||||
.catch((errors) => {
|
||||
this.isUpdating = false;
|
||||
|
@ -524,7 +554,7 @@
|
|||
this.formErrors[attribute] = error[attribute];
|
||||
}
|
||||
this.formErrorMessage = errors.error_message;
|
||||
this.$emit('onErrorFound');
|
||||
this.$emit('on-error-found');
|
||||
|
||||
this.form.formErrors = this.formErrors;
|
||||
this.form.formErrorMessage = this.formErrorMessage;
|
||||
|
@ -536,7 +566,7 @@
|
|||
},
|
||||
cancelEdition() {
|
||||
this.closedByForm = true;
|
||||
this.$emit('onEditionCanceled');
|
||||
this.$emit('on-edition-canceled');
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -568,7 +598,7 @@
|
|||
.field > .field:not(:last-child) {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
/deep/ .field {
|
||||
:deep(.field) {
|
||||
-webkit-column-break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
break-inside: avoid;
|
||||
|
@ -587,7 +617,7 @@
|
|||
.tainacan-form .field:not(:last-child) {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.tainacan-form /deep/ .control-label {
|
||||
.tainacan-form :deep(.control-label) {
|
||||
white-space: normal;
|
||||
}
|
||||
.metadata-form-section {
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
<b-input
|
||||
id="tainacan-text-name"
|
||||
v-model="form.name"
|
||||
@focus="clearErrors('name')"
|
||||
@blur="updateSlug()"
|
||||
:disabled="isUpdatingSlug"
|
||||
:loading="isUpdatingSlug"/>
|
||||
:loading="isUpdatingSlug"
|
||||
@focus="clearErrors('name')"
|
||||
@blur="updateSlug()" />
|
||||
</b-field>
|
||||
|
||||
<!-- Hook for extra Form options -->
|
||||
|
@ -54,9 +54,9 @@
|
|||
extra-classes="tainacan-repository-tooltip" />
|
||||
<b-input
|
||||
id="tainacan-text-description"
|
||||
v-model="form.description"
|
||||
type="textarea"
|
||||
rows="3"
|
||||
v-model="form.description"
|
||||
@focus="clearErrors('description')" />
|
||||
</b-field>
|
||||
|
||||
|
@ -66,8 +66,8 @@
|
|||
{{ $i18n.get('label_taxonomy_allow_new_terms') }}
|
||||
<b-switch
|
||||
id="tainacan-checkbox-allow-insert"
|
||||
size="is-small"
|
||||
v-model="form.allowInsert"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no" />
|
||||
<help-button
|
||||
|
@ -83,8 +83,8 @@
|
|||
{{ $i18n.getHelperTitle('taxonomies', 'hierarchical') }}
|
||||
<b-switch
|
||||
id="tainacan-checkbox-allow-insert"
|
||||
size="is-small"
|
||||
v-model="form.hierarchical"
|
||||
size="is-small"
|
||||
true-value="yes"
|
||||
false-value="no" />
|
||||
<help-button
|
||||
|
@ -105,11 +105,11 @@
|
|||
:message="$i18n.getHelperMessage('taxonomies', 'slug')"
|
||||
extra-classes="tainacan-repository-tooltip" />
|
||||
<b-input
|
||||
@input="updateSlug()"
|
||||
id="tainacan-text-slug"
|
||||
v-model="form.slug"
|
||||
@focus="clearErrors('slug')"
|
||||
:disabled="isUpdatingSlug"/>
|
||||
:disabled="isUpdatingSlug"
|
||||
@update:model-value="updateSlug()"
|
||||
@focus="clearErrors('slug')" />
|
||||
</b-field>
|
||||
|
||||
<!-- Activate for other post types -->
|
||||
|
@ -129,10 +129,10 @@
|
|||
:key="wpPostType.slug"
|
||||
class="field">
|
||||
<b-checkbox
|
||||
v-model="form.enabledPostTypes"
|
||||
:native-value="wpPostType.slug"
|
||||
:true-value="wpPostType.slug"
|
||||
false-value=""
|
||||
v-model="form.enabledPostTypes"
|
||||
name="enabled_post_types">
|
||||
{{ wpPostType.label }}
|
||||
</b-checkbox>
|
||||
|
@ -156,9 +156,9 @@
|
|||
extra-classes="tainacan-repository-tooltip" />
|
||||
<div class="status-radios">
|
||||
<b-radio
|
||||
v-model="form.status"
|
||||
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'draft')"
|
||||
:key="index"
|
||||
v-model="form.status"
|
||||
:native-value="statusOption.slug">
|
||||
<span class="icon has-text-gray">
|
||||
<i
|
||||
|
@ -179,8 +179,8 @@
|
|||
:message="$i18n.get('info_taxonomy_terms_list')"
|
||||
extra-classes="tainacan-repository-tooltip" />
|
||||
<terms-list
|
||||
:is-hierarchical="form.hierarchical !== 'no'"
|
||||
:key="shouldReloadTermsList ? 'termslistreloaded' : 'termslist'"
|
||||
:is-hierarchical="form.hierarchical !== 'no'"
|
||||
:taxonomy-id="taxonomyId"
|
||||
:current-user-can-edit-taxonomy="taxonomy ? taxonomy.current_user_can_edit : false" />
|
||||
</b-field>
|
||||
|
@ -202,8 +202,8 @@
|
|||
class="control">
|
||||
<button
|
||||
id="button-another-taxonomy-creation"
|
||||
@click.prevent="goToCreateAnotherTaxonomy()"
|
||||
class="button is-secondary">{{ $i18n.get('label_create_another_taxonomy') }}</button>
|
||||
class="button is-secondary"
|
||||
@click.prevent="goToCreateAnotherTaxonomy()">{{ $i18n.get('label_create_another_taxonomy') }}</button>
|
||||
</div>
|
||||
<div
|
||||
v-if="!$route.query.recent"
|
||||
|
@ -236,15 +236,15 @@
|
|||
<span>{{ $i18n.get('label_taxonomy_page_on_website') }}</span>
|
||||
</a>
|
||||
<button
|
||||
:class="{ 'is-loading': isLoadingTaxonomy, 'is-success': !isLoadingTaxonomy }"
|
||||
id="button-submit-taxonomy-creation"
|
||||
@click.prevent="onSubmit"
|
||||
class="button">{{ $i18n.get('save') }}</button>
|
||||
:class="{ 'is-loading': isLoadingTaxonomy, 'is-success': !isLoadingTaxonomy }"
|
||||
class="button"
|
||||
@click.prevent="onSubmit">{{ $i18n.get('save') }}</button>
|
||||
</div>
|
||||
</footer>
|
||||
</form>
|
||||
|
||||
<div v-if="!isLoading && (($route.name == 'TaxonomyCreationForm' && !$userCaps.hasCapability('tnc_rep_edit_taxonomies')) || ($route.name == 'TaxonomyEditionForm' && taxonomy && taxonomy.current_user_can_edit != undefined && !taxonomy.current_user_can_edit))">
|
||||
<div v-if="!isLoadingTaxonomy && (($route.name == 'TaxonomyCreationForm' && !$userCaps.hasCapability('tnc_rep_edit_taxonomies')) || ($route.name == 'TaxonomyEditionForm' && taxonomy && taxonomy.current_user_can_edit != undefined && !taxonomy.current_user_can_edit))">
|
||||
<section class="section">
|
||||
<div class="content has-text-grey has-text-centered">
|
||||
<p>
|
||||
|
@ -258,7 +258,7 @@
|
|||
</div>
|
||||
|
||||
<b-loading
|
||||
:active.sync="isLoadingTaxonomy"
|
||||
v-model="isLoadingTaxonomy"
|
||||
:can-cancel="false" />
|
||||
|
||||
</div>
|
||||
|
@ -266,8 +266,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { wpAjax, formHooks } from "../../js/mixins";
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import { nextTick } from 'vue';
|
||||
import { permalinkGetter, formHooks } from "../../js/mixins";
|
||||
import { mapActions } from 'vuex';
|
||||
import TermsList from '../lists/terms-list.vue';
|
||||
import CustomDialog from '../other/custom-dialog.vue';
|
||||
|
||||
|
@ -276,7 +277,7 @@
|
|||
components: {
|
||||
TermsList
|
||||
},
|
||||
mixins: [ wpAjax, formHooks ],
|
||||
mixins: [ permalinkGetter, formHooks ],
|
||||
beforeRouteLeave( to, from, next ) {
|
||||
let formNotSaved = false;
|
||||
|
||||
|
@ -362,7 +363,7 @@
|
|||
this.taxonomy = res.taxonomy;
|
||||
|
||||
// Fills hook forms with it's real values
|
||||
this.$nextTick()
|
||||
nextTick()
|
||||
.then(() => {
|
||||
this.updateExtraFormData(this.taxonomy);
|
||||
});
|
||||
|
@ -388,9 +389,6 @@
|
|||
'fetchTaxonomy',
|
||||
'fetchOnlySlug'
|
||||
]),
|
||||
...mapGetters('taxonomy',[
|
||||
'getTaxonomy',
|
||||
]),
|
||||
onChangeTab(tab) {
|
||||
this.tabIndex = tab;
|
||||
if (this.tabIndex == 1) {
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
<template>
|
||||
<form
|
||||
id="termEditForm"
|
||||
autofocus
|
||||
role="dialog"
|
||||
tabindex="-1"
|
||||
aria-modal
|
||||
id="termEditForm"
|
||||
class="tainacan-form tainacan-modal-content"
|
||||
@submit.prevent="saveEdition(form)">
|
||||
<header
|
||||
class="tainacan-page-title tainacan-modal-title">
|
||||
<h2 style="width: 60%">{{ form & form.id && form.id != 'new' ? $i18n.get("title_term_edit") : $i18n.get("title_term_creation") }}</h2>
|
||||
<h2 style="width: 60%">
|
||||
{{ form & form.id && form.id != 'new' ? $i18n.get("title_term_edit") : $i18n.get("title_term_creation") }}
|
||||
</h2>
|
||||
<a
|
||||
v-if="form && form.url != undefined && form.url!= ''"
|
||||
target="_blank"
|
||||
|
@ -24,8 +26,8 @@
|
|||
|
||||
<div class="modal-card-body">
|
||||
<b-loading
|
||||
:is-full-page="false"
|
||||
:active.sync="isLoading" />
|
||||
v-model="isLoading"
|
||||
:is-full-page="false" />
|
||||
|
||||
<!-- Name -------------- -->
|
||||
<b-field
|
||||
|
@ -41,8 +43,8 @@
|
|||
extra-classes="tainacan-repository-tooltip" />
|
||||
</label>
|
||||
<b-input
|
||||
:placeholder="$i18n.get('label_term_without_name')"
|
||||
v-model="form.name"
|
||||
:placeholder="$i18n.get('label_term_without_name')"
|
||||
name="name"
|
||||
@focus="clearErrors({ name: 'name', repeated: 'repeated' })" />
|
||||
</b-field>
|
||||
|
@ -74,8 +76,8 @@
|
|||
</figure>
|
||||
<div class="thumbnail-buttons-row">
|
||||
<a
|
||||
class="button is-rounded is-secondary"
|
||||
id="button-edit-header"
|
||||
class="button is-rounded is-secondary"
|
||||
:aria-label="$i18n.get('label_button_edit_header_image')"
|
||||
@click="headerImageMediaFrame.openFrame($event)">
|
||||
<span
|
||||
|
@ -90,8 +92,8 @@
|
|||
</span>
|
||||
</a>
|
||||
<a
|
||||
class="button is-rounded is-secondary"
|
||||
id="button-delete-header"
|
||||
class="button is-rounded is-secondary"
|
||||
:aria-label="$i18n.get('label_button_delete_thumb')"
|
||||
@click="deleteHeaderImage()">
|
||||
<span
|
||||
|
@ -124,9 +126,9 @@
|
|||
extra-classes="tainacan-repository-tooltip" />
|
||||
</label>
|
||||
<b-input
|
||||
v-model="form.description"
|
||||
type="textarea"
|
||||
name="description"
|
||||
v-model="form.description"
|
||||
@focus="clearErrors('description')" />
|
||||
</b-field>
|
||||
</div>
|
||||
|
@ -141,10 +143,10 @@
|
|||
<label class="label is-inline">
|
||||
{{ $i18n.get('label_parent_term') }}
|
||||
<b-switch
|
||||
@input="onToggleSwitch()"
|
||||
id="tainacan-checkbox-has-parent"
|
||||
v-model="hasParent"
|
||||
size="is-small"
|
||||
v-model="hasParent" />
|
||||
@update:model-value="onToggleSwitch()" />
|
||||
<help-button
|
||||
:title="$i18n.get('label_parent_term')"
|
||||
:message="$i18n.get('info_help_parent_term')"
|
||||
|
@ -152,20 +154,20 @@
|
|||
</label>
|
||||
<b-autocomplete
|
||||
id="tainacan-add-parent-field"
|
||||
v-model="parentTermName"
|
||||
:placeholder="$i18n.get('instruction_parent_term')"
|
||||
:data="parentTerms"
|
||||
field="name"
|
||||
clearable
|
||||
v-model="parentTermName"
|
||||
@select="onSelectParentTerm($event)"
|
||||
:loading="isFetchingParentTerms"
|
||||
@input="fetchParentTerms"
|
||||
@focus="clearErrors('parent');"
|
||||
:disabled="!hasParent"
|
||||
:append-to-body="true"
|
||||
check-infinite-scroll
|
||||
@select="onSelectParentTerm($event)"
|
||||
@update:model-value="fetchParentTerms"
|
||||
@focus="clearErrors('parent');"
|
||||
@infinite-scroll="fetchMoreParentTerms">
|
||||
<template slot-scope="props">
|
||||
<template #default="props">
|
||||
<div class="media">
|
||||
<div
|
||||
v-if="props.option.header_image"
|
||||
|
@ -179,12 +181,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="empty">{{ $i18n.get('info_no_parent_term_found') }}</template>
|
||||
<template #empty>
|
||||
{{ $i18n.get('info_no_parent_term_found') }}
|
||||
</template>
|
||||
</b-autocomplete>
|
||||
<transition name="fade">
|
||||
<p
|
||||
class="checkboxes-warning"
|
||||
v-show="isTermInsertionFlow != true && showCheckboxesWarning == true">
|
||||
v-show="isTermInsertionFlow != true && showCheckboxesWarning == true"
|
||||
class="checkboxes-warning">
|
||||
{{ $i18n.get('info_warning_changing_parent_term') }}
|
||||
</p>
|
||||
</transition>
|
||||
|
@ -204,8 +208,7 @@
|
|||
<button
|
||||
type="button"
|
||||
class="button is-outlined"
|
||||
@click.prevent="cancelEdition()"
|
||||
slot="trigger">
|
||||
@click.prevent="cancelEdition()">
|
||||
{{ $i18n.get('cancel') }}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -222,6 +225,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { nextTick } from 'vue';
|
||||
import { formHooks } from "../../js/mixins";
|
||||
import { mapActions } from 'vuex';
|
||||
import wpMediaFrames from '../../js/wp-media-frames';
|
||||
|
@ -237,6 +241,10 @@
|
|||
metadatumId: [String, Number],
|
||||
itemId: [String, Number]
|
||||
},
|
||||
emits: [
|
||||
'on-edition-finished',
|
||||
'close'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
formErrors: {},
|
||||
|
@ -262,7 +270,7 @@
|
|||
mounted() {
|
||||
|
||||
// Fills hook forms with it's real values
|
||||
this.$nextTick()
|
||||
nextTick()
|
||||
.then(() => {
|
||||
this.updateExtraFormData(this.form);
|
||||
document.getElementById('termEditForm').scrollIntoView({ behavior: 'smooth' });
|
||||
|
@ -315,18 +323,18 @@
|
|||
itemId: this.itemId
|
||||
})
|
||||
.then((term) => {
|
||||
this.$emit('onEditionFinished', {term: term, hasChangedParent: this.hasChangedParent, initialParent: this.initialParentId });
|
||||
this.$emit('on-edition-finished', {term: term, hasChangedParent: this.hasChangedParent, initialParent: this.initialParentId });
|
||||
this.form = {};
|
||||
this.formErrors = {};
|
||||
this.isLoading = false;
|
||||
this.$parent.close();
|
||||
this.$emit('close');
|
||||
})
|
||||
.catch((errors) => {
|
||||
this.isLoading = false;
|
||||
|
||||
for (let error of errors.errors) {
|
||||
for (let metadatum of Object.keys(error)) {
|
||||
this.$set(this.formErrors, metadatum, (this.formErrors[metadatum] !== undefined ? this.formErrors[metadatum] : '') + error[metadatum] + '\n');
|
||||
Object.assign( this.formErrors, { [metadatum]: (this.formErrors[metadatum] !== undefined ? this.formErrors[metadatum] : '') + error[metadatum] + '\n' });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -352,13 +360,13 @@
|
|||
})
|
||||
.then((term) => {
|
||||
this.formErrors = {};
|
||||
this.$emit('onEditionFinished', { term: term, hasChangedParent: this.hasChangedParent, initialParent: this.initialParentId });
|
||||
this.$parent.close();
|
||||
this.$emit('on-edition-finished', { term: term, hasChangedParent: this.hasChangedParent, initialParent: this.initialParentId });
|
||||
this.$emit('close');
|
||||
})
|
||||
.catch((errors) => {
|
||||
for (let error of errors.errors) {
|
||||
for (let metadatum of Object.keys(error)) {
|
||||
this.$set(this.formErrors, metadatum, (this.formErrors[metadatum] !== undefined ? this.formErrors[metadatum] : '') + error[metadatum] + '\n');
|
||||
Object.assign( this.formErrors, { [metadatum]: (this.formErrors[metadatum] !== undefined ? this.formErrors[metadatum] : '') + error[metadatum] + '\n' });
|
||||
}
|
||||
}
|
||||
this.isLoading = false;
|
||||
|
@ -366,7 +374,7 @@
|
|||
}
|
||||
},
|
||||
cancelEdition() {
|
||||
this.$parent.close();
|
||||
this.$emit('close');
|
||||
},
|
||||
deleteHeaderImage() {
|
||||
this.form = Object.assign({},
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<template>
|
||||
<div class="block">
|
||||
<b-autocomplete
|
||||
v-model="selected"
|
||||
icon="magnify"
|
||||
size="is-small"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
v-model="selected"
|
||||
:data="options"
|
||||
expanded
|
||||
:loading="isLoadingOptions"
|
||||
@input="($event) => { resetPage(); search($event); }"
|
||||
field="label"
|
||||
@select="onSelect"
|
||||
clearable
|
||||
:placeholder="(metadatumType === 'Tainacan\\Metadata_Types\\Relationship') ? $i18n.get('info_type_to_search_items') : $i18n.get('info_type_to_search_metadata')"
|
||||
check-infinite-scroll
|
||||
@update:model-value="($event) => { resetPage(); search($event); }"
|
||||
@select="onSelect"
|
||||
@infinite-scroll="searchMore">
|
||||
<template slot-scope="props">
|
||||
<template #default="props">
|
||||
<div class="media">
|
||||
<div
|
||||
class="media-left"
|
||||
v-if="props.option.img">
|
||||
v-if="props.option.img"
|
||||
class="media-left">
|
||||
<img
|
||||
:alt="$i18n.get('label_thumbnail')"
|
||||
width="24"
|
||||
|
@ -37,7 +37,7 @@
|
|||
</template>
|
||||
<template
|
||||
v-if="!isLoadingOptions"
|
||||
slot="empty">
|
||||
#empty>
|
||||
{{ $i18n.get('info_no_options_found' ) }}
|
||||
</template>
|
||||
</b-autocomplete>
|
||||
|
@ -45,11 +45,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { tainacan as axios, isCancel } from '../../../js/axios'
|
||||
import { tainacanApi, isCancel } from '../../../js/axios'
|
||||
import { filterTypeMixin, dynamicFilterTypeMixin } from '../../../js/filter-types-mixin';
|
||||
|
||||
export default {
|
||||
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
||||
emits: [
|
||||
'input',
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
selected:'',
|
||||
|
@ -62,8 +65,11 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
'query'() {
|
||||
'query': {
|
||||
handler() {
|
||||
this.updateSelectedValues();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -168,7 +174,7 @@
|
|||
|
||||
let endpoint = '/items/' + metadata.value + '?fetch_only=title,thumbnail';
|
||||
|
||||
axios.get(endpoint)
|
||||
tainacanApi.get(endpoint)
|
||||
.then( res => {
|
||||
let item = res.data;
|
||||
this.label = item.title;
|
|
@ -15,8 +15,8 @@
|
|||
<input
|
||||
v-model="selected"
|
||||
:value="option.value"
|
||||
@input="resetPage()"
|
||||
type="checkbox">
|
||||
type="checkbox"
|
||||
@input="resetPage()">
|
||||
<span class="check" />
|
||||
<span class="control-label">
|
||||
<span class="checkbox-label-text">{{ option.label }}</span>
|
||||
|
@ -26,8 +26,8 @@
|
|||
</span>
|
||||
</label>
|
||||
<button
|
||||
class="view-all-button link-style"
|
||||
v-if="option.showViewAllButton && index == options.slice(0, filter.max_options).length - 1"
|
||||
class="view-all-button link-style"
|
||||
@click="openCheckboxModal(option.parent)">
|
||||
{{ $i18n.get('label_view_all') }}
|
||||
</button>
|
||||
|
@ -44,19 +44,19 @@
|
|||
:is-modal="false"
|
||||
:filter="filter"
|
||||
:selected="selected"
|
||||
:metadatum-id="metadatumId"
|
||||
:collection-id="collectionId"
|
||||
:metadatum-type="metadatumType"
|
||||
:is-repository-level="isRepositoryLevel"
|
||||
:query="query"
|
||||
:current-collection-id="currentCollectionId"
|
||||
@input="(newSelected) => {
|
||||
const existingValue = selected.indexOf(newSelected);
|
||||
if (existingValue >= 0)
|
||||
selected.splice(existingValue, 1);
|
||||
else
|
||||
selected.push(newSelected);
|
||||
}"
|
||||
:metadatum-id="metadatumId"
|
||||
:collection-id="collectionId"
|
||||
:metadatum_type="metadatumType"
|
||||
:is-repository-level="isRepositoryLevel"
|
||||
:query="query"
|
||||
:current-collection-id="currentCollectionId" />
|
||||
}" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -72,6 +72,10 @@
|
|||
props: {
|
||||
filtersAsModal: Boolean
|
||||
},
|
||||
emits: [
|
||||
'input',
|
||||
'update-parent-collapse'
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
options: [],
|
||||
|
@ -79,19 +83,23 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
selected(newVal, oldVal) {
|
||||
selected: {
|
||||
handler(newVal, oldVal) {
|
||||
const isEqual = (Array.isArray(newVal) && Array.isArray(oldVal) && (newVal.length == oldVal.length)) && newVal.every((element, index) => {
|
||||
return element === oldVal[index];
|
||||
});
|
||||
if (!isEqual)
|
||||
this.onSelect();
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
facetsFromItemSearch: {
|
||||
handler() {
|
||||
if (this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
},
|
||||
immediate: true
|
||||
immediate: true,
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
@ -99,10 +107,10 @@
|
|||
this.loadOptions();
|
||||
},
|
||||
created() {
|
||||
this.$eventBusSearch.$on('has-to-reload-facets', this.reloadOptions);
|
||||
this.$eventBusSearchEmitter.on('hasToReloadFacets', this.reloadOptions);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$eventBusSearch.$off('has-to-reload-facets', this.reloadOptions);
|
||||
beforeUnmount() {
|
||||
this.$eventBusSearchEmitter.off('hasToReloadFacets', this.reloadOptions);
|
||||
},
|
||||
methods: {
|
||||
reloadOptions(shouldReload) {
|
||||
|
@ -143,7 +151,7 @@
|
|||
this.updateSelectedValues();
|
||||
|
||||
if (res && res.data && res.data.values)
|
||||
this.$emit('updateParentCollapse', res.data.values.length > 0 );
|
||||
this.$emit('update-parent-collapse', res.data.values.length > 0 );
|
||||
})
|
||||
.catch( (error) => {
|
||||
if (isCancel(error)) {
|
||||
|
@ -180,12 +188,12 @@
|
|||
props: {
|
||||
//parent: parent,
|
||||
filter: this.filter,
|
||||
//taxonomy_id: this.taxonomy_id,
|
||||
//taxonomyId: this.taxonomyId,
|
||||
selected: this.selected,
|
||||
metadatumId: this.metadatumId,
|
||||
//taxonomy: this.taxonomy,
|
||||
collectionId: this.collectionId,
|
||||
metadatum_type: this.metadatumType,
|
||||
metadatumType: this.metadatumType,
|
||||
isRepositoryLevel: this.isRepositoryLevel,
|
||||
query: this.query
|
||||
},
|
|
@ -1,11 +1,9 @@
|
|||
<template>
|
||||
<div>
|
||||
<b-datepicker
|
||||
v-model="dateInit"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
:placeholder="$i18n.get('label_selectbox_init')"
|
||||
v-model="dateInit"
|
||||
@focus="isTouched = true"
|
||||
@input="($event) => { resetPage(); validadeValues($event) }"
|
||||
editable
|
||||
:trap-focus="false"
|
||||
:date-formatter="(date) => dateFormatter(date)"
|
||||
|
@ -20,18 +18,18 @@
|
|||
$i18n.get('datepicker_short_thursday'),
|
||||
$i18n.get('datepicker_short_friday'),
|
||||
$i18n.get('datepicker_short_saturday'),
|
||||
]"/>
|
||||
]"
|
||||
@focus="isTouched = true"
|
||||
@update:model-value="($event) => { resetPage(); validadeValues($event) }" />
|
||||
<p
|
||||
style="font-size: 0.75em; margin-bottom: 0.125em;"
|
||||
class="has-text-centered is-marginless">
|
||||
{{ $i18n.get('label_until') }}
|
||||
</p>
|
||||
<b-datepicker
|
||||
v-model="dateEnd"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
:placeholder="$i18n.get('label_selectbox_init')"
|
||||
v-model="dateEnd"
|
||||
@input="validadeValues()"
|
||||
@focus="isTouched = true"
|
||||
editable
|
||||
:trap-focus="false"
|
||||
:date-formatter="(date) => dateFormatter(date)"
|
||||
|
@ -46,21 +44,25 @@
|
|||
$i18n.get('datepicker_short_thursday'),
|
||||
$i18n.get('datepicker_short_friday'),
|
||||
$i18n.get('datepicker_short_saturday'),
|
||||
]"/>
|
||||
]"
|
||||
@update:model-value="validadeValues()"
|
||||
@focus="isTouched = true" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { wpAjax, dateInter } from "../../../js/mixins";
|
||||
import { dateInter } from "../../../js/mixins";
|
||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||
import moment from 'moment';
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
wpAjax,
|
||||
dateInter,
|
||||
filterTypeMixin
|
||||
],
|
||||
emits: [
|
||||
'input',
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
dateInit: undefined,
|
||||
|
@ -76,8 +78,11 @@
|
|||
if ( val && this.dateEnd === null)
|
||||
this.dateEnd = new Date();
|
||||
},
|
||||
'query'() {
|
||||
'query': {
|
||||
handler() {
|
||||
this.updateSelectedValues();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
|
@ -1,43 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<b-field :addons="false">
|
||||
<label class="label is-inline">
|
||||
{{ $i18n.getHelperTitle('tainacan-filter-date', 'type') }}<span> * </span>
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('tainacan-filter-date', 'type')"
|
||||
:message="$i18n.getHelperMessage('tainacan-filter-date', 'type')"/>
|
||||
</label>
|
||||
<b-select
|
||||
name="type_options"
|
||||
v-model="type"
|
||||
@input="onUpdateType">
|
||||
<option value="day">{{ $i18n.get('label_day') }}</option>
|
||||
<option value="month">{{ $i18n.get('label_month') }}</option>
|
||||
<option value="year">{{ $i18n.get('label_year') }}</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
props: {
|
||||
filter: {
|
||||
type: Object
|
||||
},
|
||||
value: [String, Number, Array],
|
||||
disabled: false,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: [String]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onUpdateType(type) {
|
||||
this.$emit('input', { type: type });
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -2,13 +2,13 @@
|
|||
<div class="date-filter-container">
|
||||
<b-dropdown
|
||||
:mobile-modal="true"
|
||||
@input="($event) => { resetPage(); onChangeComparator($event) }"
|
||||
aria-role="list"
|
||||
trap-focus>
|
||||
trap-focus
|
||||
@update:model-value="($event) => { resetPage(); onChangeComparator($event) }">
|
||||
<template #trigger>
|
||||
<button
|
||||
:aria-label="$i18n.get('label_comparator')"
|
||||
class="button is-white"
|
||||
slot="trigger">
|
||||
class="button is-white">
|
||||
<span class="icon is-small">
|
||||
<i v-html="comparatorSymbol" />
|
||||
</span>
|
||||
|
@ -16,6 +16,7 @@
|
|||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
<b-dropdown-item
|
||||
role="button"
|
||||
:class="{ 'is-active': comparator == '=' }"
|
||||
|
@ -67,14 +68,13 @@
|
|||
:aria-plus-label="$i18n.get('label_increase')"
|
||||
size="is-small"
|
||||
step="1"
|
||||
@input="emitOnlyYear($event)"
|
||||
@update:model-value="emitOnlyYear($event)"
|
||||
v-model="yearsOnlyValue"/> -->
|
||||
<b-datepicker
|
||||
v-model="value"
|
||||
position="is-bottom-right"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
:placeholder="$i18n.get('instruction_select_a_date')"
|
||||
v-model="value"
|
||||
@input="($event) => { resetPage(); emit($event); }"
|
||||
editable
|
||||
:trap-focus="false"
|
||||
:date-formatter="(date) => dateFormatter(date)"
|
||||
|
@ -103,7 +103,8 @@
|
|||
$i18n.get('datepicker_month_october'),
|
||||
$i18n.get('datepicker_month_november'),
|
||||
$i18n.get('datepicker_month_december')
|
||||
]" />
|
||||
]"
|
||||
@update:model-value="($event) => { resetPage(); emit($event); }" />
|
||||
<!-- filterTypeOptions FOR TYPE
|
||||
v-else
|
||||
:type="filterTypeOptions.type == 'month' ? 'month' : null"
|
||||
|
@ -113,16 +114,18 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { wpAjax, dateInter } from "../../../js/mixins";
|
||||
import { dateInter } from "../../../js/mixins";
|
||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||
import moment from 'moment';
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
wpAjax,
|
||||
dateInter,
|
||||
filterTypeMixin
|
||||
],
|
||||
emits: [
|
||||
'input',
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
value: null,
|
||||
|
@ -146,9 +149,12 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
'query'() {
|
||||
'query': {
|
||||
handler() {
|
||||
this.updateSelectedValues();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.updateSelectedValues();
|
|
@ -13,11 +13,7 @@ class Date extends Filter_Type {
|
|||
$this->set_name( __('Date', 'tainacan') );
|
||||
$this->set_supported_types(['date']);
|
||||
$this->set_component('tainacan-filter-date');
|
||||
// $this->set_form_component('tainacan-filter-form-date');
|
||||
$this->set_use_max_options(false);
|
||||
// $this->set_default_options([
|
||||
// 'type' => 'day'
|
||||
// ]);
|
||||
$this->set_preview_template('
|
||||
<div>
|
||||
<div>
|
||||
|
@ -61,18 +57,6 @@ class Date extends Filter_Type {
|
|||
');
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @inheritdoc
|
||||
// */
|
||||
// public function get_form_labels(){
|
||||
// return [
|
||||
// 'type' => [
|
||||
// 'title' => __( 'Type', 'tainacan' ),
|
||||
// 'description' => __( 'The type of the date picker, may be for day, month or year.', 'tainacan' ),
|
||||
// ]
|
||||
// ];
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
class Date_Helper {
|
||||
|
|
|
@ -143,6 +143,7 @@ abstract class Filter_Type {
|
|||
* @param $options
|
||||
*/
|
||||
public function set_options( $options ) {
|
||||
$options = $options ?? '';
|
||||
$this->options = ( is_array( $options ) ) ? $options : (!is_array(unserialize( $options )) ? [] : unserialize( $options ));
|
||||
}
|
||||
|
||||
|
|
|
@ -11,18 +11,36 @@
|
|||
v-if="!showEditStepOptions"
|
||||
class="is-flex">
|
||||
<b-select
|
||||
name="step_options"
|
||||
v-model="step"
|
||||
@input="onUpdateStep">
|
||||
<option value="0.001">0.001</option>
|
||||
<option value="0.01">0.01</option>
|
||||
<option value="0.1">0.1</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="100">100</option>
|
||||
<option value="1000">1000</option>
|
||||
name="step_options"
|
||||
@update:model-value="onUpdateStep">
|
||||
<option value="0.001">
|
||||
0.001
|
||||
</option>
|
||||
<option value="0.01">
|
||||
0.01
|
||||
</option>
|
||||
<option value="0.1">
|
||||
0.1
|
||||
</option>
|
||||
<option value="1">
|
||||
1
|
||||
</option>
|
||||
<option value="2">
|
||||
2
|
||||
</option>
|
||||
<option value="5">
|
||||
5
|
||||
</option>
|
||||
<option value="10">
|
||||
10
|
||||
</option>
|
||||
<option value="100">
|
||||
100
|
||||
</option>
|
||||
<option value="1000">
|
||||
1000
|
||||
</option>
|
||||
<option
|
||||
v-if="step && ![0.001,0.01,0.1,1,2,5,10,100,1000].find( (element) => element == step )"
|
||||
:value="step">
|
||||
|
@ -48,14 +66,14 @@
|
|||
v-if="showEditStepOptions"
|
||||
class="is-flex">
|
||||
<b-input
|
||||
name="max_options"
|
||||
v-model="step"
|
||||
@input="onUpdateStep"
|
||||
name="max_options"
|
||||
type="number"
|
||||
step="1" />
|
||||
step="1"
|
||||
@update:model-value="onUpdateStep" />
|
||||
<button
|
||||
@click.prevent="showEditStepOptions = false"
|
||||
class="button is-white is-pulled-right">
|
||||
class="button is-white is-pulled-right"
|
||||
@click.prevent="showEditStepOptions = false">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('close'),
|
||||
|
@ -77,8 +95,11 @@
|
|||
|
||||
export default {
|
||||
props: {
|
||||
value: [String, Number, Array]
|
||||
modelValue: Object
|
||||
},
|
||||
emits: [
|
||||
'update:model-value',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
step: [Number, String],
|
||||
|
@ -86,11 +107,11 @@
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.step = this.value && this.value.step ? this.value.step : 1;
|
||||
this.step = this.modelValue && this.modelValue.step ? this.modelValue.step : 1;
|
||||
},
|
||||
methods: {
|
||||
onUpdateStep(value) {
|
||||
this.$emit('input', { step: value });
|
||||
onUpdateStep(modelValue) {
|
||||
this.$emit('update:model-value', { step: modelValue });
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<div>
|
||||
<b-numberinput
|
||||
v-model="valueInit"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
:aria-minus-label="$i18n.get('label_decrease')"
|
||||
:aria-plus-label="$i18n.get('label_increase')"
|
||||
size="is-small"
|
||||
@input="($event) => { resetPage(); validadeValues($event) }"
|
||||
:step="filterTypeOptions.step"
|
||||
v-model="valueInit"
|
||||
@update:model-value="($event) => { resetPage(); validadeValues($event) }"
|
||||
/>
|
||||
<p
|
||||
style="font-size: 0.75em; margin-bottom: 0.125em;"
|
||||
|
@ -15,13 +15,13 @@
|
|||
{{ $i18n.get('label_until') }}
|
||||
</p>
|
||||
<b-numberinput
|
||||
v-model="valueEnd"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
:aria-minus-label="$i18n.get('label_decrease')"
|
||||
:aria-plus-label="$i18n.get('label_increase')"
|
||||
size="is-small"
|
||||
@input="($event) => { resetPage(); validadeValues($event) }"
|
||||
:step="filterTypeOptions.step"
|
||||
v-model="valueEnd"/>
|
||||
@update:model-value="($event) => { resetPage(); validadeValues($event) }" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
@ -30,6 +30,9 @@
|
|||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||
export default {
|
||||
mixins: [ filterTypeMixin ],
|
||||
emits: [
|
||||
'input',
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
valueInit: null,
|
||||
|
@ -37,9 +40,12 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
'query'() {
|
||||
'query': {
|
||||
handler() {
|
||||
this.updateSelectedValues();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.updateSelectedValues();
|
|
@ -11,7 +11,7 @@
|
|||
<b-field>
|
||||
<b-checkbox
|
||||
v-model="showIntervalOnTag"
|
||||
@input="onUpdateShowIntervalOnTag()">
|
||||
@update:model-value="onUpdateShowIntervalOnTag">
|
||||
{{ $i18n.get('info_show_interval_on_tag') }}
|
||||
</b-checkbox>
|
||||
</b-field>
|
||||
|
@ -26,38 +26,38 @@
|
|||
</label>
|
||||
<transition-group name="filter-item">
|
||||
<div
|
||||
class="options-input"
|
||||
v-for="(interval, index) of intervals"
|
||||
:key="0 + index">
|
||||
:key="0 + index"
|
||||
class="options-input">
|
||||
<b-field>
|
||||
<b-input
|
||||
v-model="interval.label"
|
||||
expanded
|
||||
:placeholder="$i18n.get('label')"
|
||||
@input="onUpdate(interval)"
|
||||
v-model="interval.label" />
|
||||
@update:model-value="onUpdate(interval)" />
|
||||
</b-field>
|
||||
<b-field>
|
||||
<b-input
|
||||
v-model="interval.from"
|
||||
expanded
|
||||
type="number"
|
||||
step="0.01"
|
||||
:placeholder="$i18n.get('info_initial_value')"
|
||||
@input="onUpdate(interval, true)"
|
||||
v-model="interval.from" />
|
||||
@update:model-value="onUpdate(interval, true)" />
|
||||
<b-input
|
||||
v-model="interval.to"
|
||||
expanded
|
||||
type="number"
|
||||
step="0.01"
|
||||
:placeholder="$i18n.get('info_final_value')"
|
||||
@input="onUpdate(interval, true)"
|
||||
v-model="interval.to" />
|
||||
@update:model-value="onUpdate(interval, true)" />
|
||||
</b-field>
|
||||
<p class="control">
|
||||
<a
|
||||
role="button"
|
||||
@click="addInterval(index)"
|
||||
class="add-link"
|
||||
:title="$i18n.get('add_value')">
|
||||
:title="$i18n.get('add_value')"
|
||||
@click="addInterval(index)">
|
||||
<span class="icon is-small">
|
||||
<i class="tainacan-icon has-text-secondary tainacan-icon-add" />
|
||||
</span>
|
||||
|
@ -69,9 +69,9 @@
|
|||
class="control">
|
||||
<a
|
||||
role="button"
|
||||
@click="removeInterval(index)"
|
||||
class="add-link"
|
||||
:title="$i18n.get('remove_value')">
|
||||
:title="$i18n.get('remove_value')"
|
||||
@click="removeInterval(index)">
|
||||
<span class="icon is-small">
|
||||
<i class="tainacan-icon has-text-secondary tainacan-icon-repprovedcircle" />
|
||||
</span>
|
||||
|
@ -89,10 +89,13 @@
|
|||
export default {
|
||||
props: {
|
||||
filter: Object,
|
||||
value: [String, Number, Array],
|
||||
modelValue: Object,
|
||||
id: '',
|
||||
disabled: false,
|
||||
},
|
||||
emits: [
|
||||
'update:model-value',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
showIntervalOnTag: true,
|
||||
|
@ -102,14 +105,14 @@
|
|||
},
|
||||
created() {
|
||||
this.intervals =
|
||||
this.value && this.value.intervals && this.value.intervals.length > 0 ?
|
||||
this.value.intervals :
|
||||
this.modelValue && this.modelValue.intervals && this.modelValue.intervals.length > 0 ?
|
||||
this.modelValue.intervals :
|
||||
[{
|
||||
label: '',
|
||||
to: null,
|
||||
from: null
|
||||
}];
|
||||
this.showIntervalOnTag = this.value && this.value.showIntervalOnTag != undefined ? this.value.showIntervalOnTag : true;
|
||||
this.showIntervalOnTag = this.modelValue && this.modelValue.showIntervalOnTag != undefined ? this.modelValue.showIntervalOnTag : true;
|
||||
},
|
||||
methods: {
|
||||
onUpdate: _.debounce( function(interval, validade) {
|
||||
|
@ -124,7 +127,7 @@
|
|||
this.showErrorMessage()
|
||||
} else {
|
||||
this.isValid = true;
|
||||
this.$emit('input', {
|
||||
this.$emit('update:model-value', {
|
||||
intervals: this.intervals,
|
||||
showIntervalOnTag: this.showIntervalOnTag
|
||||
});
|
||||
|
@ -132,7 +135,7 @@
|
|||
}, 600),
|
||||
onUpdateShowIntervalOnTag() {
|
||||
if (this.isValid) {
|
||||
this.$emit('input', {
|
||||
this.$emit('update:model-value', {
|
||||
intervals: this.intervals,
|
||||
showIntervalOnTag: this.showIntervalOnTag
|
||||
});
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<b-select
|
||||
v-model="selectedInterval"
|
||||
expanded
|
||||
:placeholder="$i18n.get('instruction_select_a_interval')"
|
||||
@input="($event) => { resetPage; changeInterval($event) }"
|
||||
v-model="selectedInterval">
|
||||
@update:model-value="($event) => { resetPage; changeInterval($event) }">
|
||||
<option value="">
|
||||
{{ $i18n.get('label_selectbox_init') }}...
|
||||
</option>
|
||||
<option
|
||||
v-for="(interval, index) in filterTypeOptions.intervals"
|
||||
:value="index"
|
||||
:key="index">
|
||||
:key="index"
|
||||
:value="index">
|
||||
{{ interval.label }}
|
||||
</option>
|
||||
</b-select>
|
||||
|
@ -22,6 +22,9 @@
|
|||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||
export default {
|
||||
mixins: [ filterTypeMixin ],
|
||||
emits: [
|
||||
'input',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
valueInit: 0,
|
||||
|
@ -30,8 +33,11 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
'query'() {
|
||||
'query': {
|
||||
handler() {
|
||||
this.updateSelectedValues();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
|
@ -11,18 +11,36 @@
|
|||
v-if="!showEditStepOptions"
|
||||
class="is-flex">
|
||||
<b-select
|
||||
name="step_options"
|
||||
v-model="step"
|
||||
@input="onUpdateStep">
|
||||
<option value="0.001">0.001</option>
|
||||
<option value="0.01">0.01</option>
|
||||
<option value="0.1">0.1</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="100">100</option>
|
||||
<option value="1000">1000</option>
|
||||
name="step_options"
|
||||
@update:model-value="onUpdateStep">
|
||||
<option value="0.001">
|
||||
0.001
|
||||
</option>
|
||||
<option value="0.01">
|
||||
0.01
|
||||
</option>
|
||||
<option value="0.1">
|
||||
0.1
|
||||
</option>
|
||||
<option value="1">
|
||||
1
|
||||
</option>
|
||||
<option value="2">
|
||||
2
|
||||
</option>
|
||||
<option value="5">
|
||||
5
|
||||
</option>
|
||||
<option value="10">
|
||||
10
|
||||
</option>
|
||||
<option value="100">
|
||||
100
|
||||
</option>
|
||||
<option value="1000">
|
||||
1000
|
||||
</option>
|
||||
<option
|
||||
v-if="step && ![0.001,0.01,0.1,1,2,5,10,100,1000].find( (element) => element == step )"
|
||||
:value="step">
|
||||
|
@ -48,14 +66,14 @@
|
|||
v-if="showEditStepOptions"
|
||||
class="is-flex">
|
||||
<b-input
|
||||
name="max_options"
|
||||
v-model="step"
|
||||
@input="onUpdateStep"
|
||||
name="max_options"
|
||||
type="number"
|
||||
step="1" />
|
||||
step="1"
|
||||
@update:model-value="onUpdateStep" />
|
||||
<button
|
||||
@click.prevent="showEditStepOptions = false"
|
||||
class="button is-white is-pulled-right">
|
||||
class="button is-white is-pulled-right"
|
||||
@click.prevent="showEditStepOptions = false">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('close'),
|
||||
|
@ -76,8 +94,11 @@
|
|||
|
||||
export default {
|
||||
props: {
|
||||
value: [String, Number, Array]
|
||||
modelValue: Object
|
||||
},
|
||||
emits: [
|
||||
'update:model-value',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
step: [Number, String],
|
||||
|
@ -85,11 +106,11 @@
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.step = this.value && this.value.step ? this.value.step : 1;
|
||||
this.step = this.modelValue && this.modelValue.step ? this.modelValue.step : 1;
|
||||
},
|
||||
methods: {
|
||||
onUpdateStep(value) {
|
||||
this.$emit('input', { step: value });
|
||||
onUpdateStep(modelValue) {
|
||||
this.$emit('update:model-value', { step: modelValue });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<div class="numeric-filter-container">
|
||||
<b-dropdown
|
||||
:mobile-modal="true"
|
||||
@input="($event) => { resetPage(); onChangeComparator($event) }"
|
||||
aria-role="list"
|
||||
trap-focus>
|
||||
trap-focus
|
||||
@update:model-value="($event) => { resetPage(); onChangeComparator($event) }">
|
||||
<template #trigger>
|
||||
<button
|
||||
:aria-label="$i18n.get('label_comparator')"
|
||||
class="button is-white"
|
||||
slot="trigger">
|
||||
class="button is-white">
|
||||
<span class="icon is-small">
|
||||
<i v-html="comparatorSymbol" />
|
||||
</span>
|
||||
|
@ -16,6 +16,7 @@
|
|||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
<b-dropdown-item
|
||||
role="button"
|
||||
:class="{ 'is-active': comparator == '=' }"
|
||||
|
@ -61,13 +62,13 @@
|
|||
</b-dropdown>
|
||||
|
||||
<b-numberinput
|
||||
v-model="value"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
:aria-minus-label="$i18n.get('label_decrease')"
|
||||
:aria-plus-label="$i18n.get('label_increase')"
|
||||
size="is-small"
|
||||
:step="Number(filterTypeOptions.step)"
|
||||
@input="($event) => { resetPage($event); emit($event); }"
|
||||
v-model="value"/>
|
||||
@update:model-value="($event) => { resetPage($event); emit($event); }" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -78,6 +79,9 @@
|
|||
mixins: [
|
||||
filterTypeMixin
|
||||
],
|
||||
emits: [
|
||||
'input',
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
value: null,
|
||||
|
@ -99,8 +103,11 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
'query'() {
|
||||
'query': {
|
||||
handler() {
|
||||
this.updateSelectedValues();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
|
@ -4,12 +4,14 @@
|
|||
class="block">
|
||||
<b-select
|
||||
v-if="!isLoadingOptions"
|
||||
:value="selected"
|
||||
:model-value="selected"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
@input="($event) => { resetPage(); onSelect($event) }"
|
||||
:placeholder="$i18n.get('label_selectbox_init')"
|
||||
expanded>
|
||||
<option value="">{{ $i18n.get('label_selectbox_init') }}...</option>
|
||||
expanded
|
||||
@update:model-value="($event) => { resetPage(); onSelect($event) }">
|
||||
<option value="">
|
||||
{{ $i18n.get('label_selectbox_init') }}...
|
||||
</option>
|
||||
<option
|
||||
v-for="(option, index) in options"
|
||||
:key="index"
|
||||
|
@ -30,6 +32,10 @@
|
|||
|
||||
export default {
|
||||
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
||||
emits: [
|
||||
'input',
|
||||
'update-parent-collapse'
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
options: [],
|
||||
|
@ -42,7 +48,8 @@
|
|||
if (this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
},
|
||||
immediate: true
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -50,10 +57,10 @@
|
|||
this.loadOptions();
|
||||
},
|
||||
created() {
|
||||
this.$eventBusSearch.$on('has-to-reload-facets', this.reloadOptions);
|
||||
this.$eventBusSearchEmitter.on('hasToReloadFacets', this.reloadOptions);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$eventBusSearch.$off('has-to-reload-facets', this.reloadOptions);
|
||||
beforeUnmount() {
|
||||
this.$eventBusSearchEmitter.off('hasToReloadFacets', this.reloadOptions);
|
||||
},
|
||||
methods: {
|
||||
reloadOptions(shouldReload) {
|
||||
|
@ -76,7 +83,7 @@
|
|||
this.updateSelectedValues();
|
||||
|
||||
if (res && res.data && res.data.values)
|
||||
this.$emit('updateParentCollapse', res.data.values.length > 0 );
|
||||
this.$emit('update-parent-collapse', res.data.values.length > 0 );
|
||||
})
|
||||
.catch( error => {
|
||||
if (isCancel(error))
|
|
@ -10,18 +10,18 @@
|
|||
:remove-on-keys="[]"
|
||||
field="label"
|
||||
attached
|
||||
@input="($event) => { resetPage(); onSelect($event) }"
|
||||
@typing="search"
|
||||
:aria-close-label="$i18n.get('remove_value')"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
:placeholder="getInputPlaceholder"
|
||||
check-infinite-scroll
|
||||
@update:model-value="($event) => { resetPage(); onSelect($event) }"
|
||||
@typing="search"
|
||||
@infinite-scroll="searchMore">
|
||||
<template slot-scope="props">
|
||||
<template #default="props">
|
||||
<div class="media">
|
||||
<div
|
||||
class="media-left"
|
||||
v-if="props.option.img">
|
||||
v-if="props.option.img"
|
||||
class="media-left">
|
||||
<img
|
||||
:alt="$i18n.get('label_thumbnail')"
|
||||
width="24"
|
||||
|
@ -37,7 +37,7 @@
|
|||
</template>
|
||||
<template
|
||||
v-if="!isLoadingOptions"
|
||||
slot="empty">
|
||||
#empty>
|
||||
{{ $i18n.get('info_no_options_found' ) }}
|
||||
</template>
|
||||
</b-taginput>
|
||||
|
@ -50,6 +50,9 @@
|
|||
|
||||
export default {
|
||||
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
||||
emits: [
|
||||
'input',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
results:'',
|
||||
|
@ -73,8 +76,11 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
'query'() {
|
||||
'query': {
|
||||
handler() {
|
||||
this.updateSelectedValues();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
|
@ -1,19 +1,18 @@
|
|||
<template>
|
||||
<b-field
|
||||
class="filter-item-forms"
|
||||
:ref="isMobileScreen ? ('filter-field-id-' + filter.id) : null"
|
||||
@touchstart.native="setFilterFocus(filter.id)"
|
||||
@mousedown.native="setFilterFocus(filter.id)"
|
||||
:style="{ columnSpan: filtersAsModal && filter.filter_type_object && filter.filter_type_object.component && (filter.filter_type_object.component == 'tainacan-filter-taxonomy-checkbox' || filter.filter_type_object.component == 'tainacan-filter-checkbox') ? 'all' : 'unset'}">
|
||||
class="filter-item-forms"
|
||||
:style="{ columnSpan: filtersAsModal && filter.filter_type_object && filter.filter_type_object.component && (filter.filter_type_object.component == 'tainacan-filter-taxonomy-checkbox' || filter.filter_type_object.component == 'tainacan-filter-checkbox') ? 'all' : 'unset'}"
|
||||
@touchstart="setFilterFocus(filter.id)"
|
||||
@mousedown="setFilterFocus(filter.id)">
|
||||
<b-collapse
|
||||
v-if="displayFilter"
|
||||
v-model="singleCollapseOpen"
|
||||
class="show"
|
||||
:open.sync="singleCollapseOpen"
|
||||
animation="filter-item">
|
||||
<template #trigger="props">
|
||||
<button
|
||||
:for="'filter-input-id-' + filter.id"
|
||||
:aria-controls="'filter-input-id-' + filter.id"
|
||||
:aria-expanded="singleCollapseOpen"
|
||||
:id="'filter-label-id-' + filter.id"
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
shown: 500,
|
||||
|
@ -25,21 +24,22 @@
|
|||
placement: 'top-start',
|
||||
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : '']
|
||||
}"
|
||||
:id="'filter-label-id-' + filter.id"
|
||||
:for="'filter-input-id-' + filter.id"
|
||||
:aria-controls="'filter-input-id-' + filter.id"
|
||||
:aria-expanded="singleCollapseOpen"
|
||||
:aria-label="filter.name"
|
||||
class="label"
|
||||
slot="trigger"
|
||||
slot-scope="props">
|
||||
class="label">
|
||||
<span class="icon">
|
||||
<i
|
||||
:class="{
|
||||
'tainacan-icon-arrowdown' : props.open,
|
||||
'tainacan-icon-arrowright' : !props.open
|
||||
'tainacan-icon-arrowdown' : props && props.open,
|
||||
'tainacan-icon-arrowright' : props && !props.open
|
||||
}"
|
||||
class="tainacan-icon tainacan-icon-1-25em" />
|
||||
</span>
|
||||
<span class="collapse-label">{{ filter.name }}</span>
|
||||
</button>
|
||||
</template>
|
||||
<div :id="'filter-input-id-' + filter.id">
|
||||
<component
|
||||
:is="filter.filter_type_object ? filter.filter_type_object.component : null"
|
||||
|
@ -49,9 +49,9 @@
|
|||
:is-repository-level="isRepositoryLevel"
|
||||
:is-loading-items="isLoadingItems"
|
||||
:current-collection-id="$eventBusSearch.collectionId"
|
||||
:filters-as-modal="filtersAsModal"
|
||||
@input="onInput"
|
||||
@updateParentCollapse="onFilterUpdateParentCollapse"
|
||||
:filters-as-modal="filtersAsModal" />
|
||||
@update-parent-collapse="onFilterUpdateParentCollapse" />
|
||||
</div>
|
||||
</b-collapse>
|
||||
<div
|
||||
|
@ -60,8 +60,6 @@
|
|||
<div class="collapse-trigger">
|
||||
<button
|
||||
|
||||
:for="'filter-input-id-' + filter.id"
|
||||
:aria-controls="'filter-input-id-' + filter.id"
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
shown: 500,
|
||||
|
@ -73,8 +71,10 @@
|
|||
placement: 'top-start',
|
||||
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : '']
|
||||
}"
|
||||
@click="displayFilter = true"
|
||||
class="label">
|
||||
:for="'filter-input-id-' + filter.id"
|
||||
:aria-controls="'filter-input-id-' + filter.id"
|
||||
class="label"
|
||||
@click="displayFilter = true">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-arrowright tainacan-icon-1-25em" />
|
||||
</span>
|
||||
|
@ -86,32 +86,22 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import TainacanFilterNumeric from './numeric/Numeric.vue';
|
||||
import TainacanFilterDate from './date/Date.vue';
|
||||
import TainacanFilterSelectbox from './selectbox/Selectbox.vue';
|
||||
import TainacanFilterAutocomplete from './autocomplete/Autocomplete.vue';
|
||||
import TainacanFilterCheckbox from './checkbox/Checkbox.vue';
|
||||
import TainacanFilterTaginput from './taginput/Taginput.vue';
|
||||
import TainacanFilterTaxonomyCheckbox from './taxonomy/Checkbox.vue';
|
||||
import TainacanFilterTaxonomyTaginput from './taxonomy/Taginput.vue';
|
||||
import TainacanFilterDateInterval from './date-interval/DateInterval.vue';
|
||||
import TainacanFilterNumericInterval from './numeric-interval/NumericInterval.vue';
|
||||
import TainacanFilterNumericListInterval from './numeric-list-interval/NumericListInterval.vue';
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
|
||||
export default {
|
||||
name: 'TainacanFilterItem',
|
||||
components: {
|
||||
TainacanFilterNumeric,
|
||||
TainacanFilterDate,
|
||||
TainacanFilterSelectbox,
|
||||
TainacanFilterAutocomplete,
|
||||
TainacanFilterCheckbox,
|
||||
TainacanFilterTaginput,
|
||||
TainacanFilterTaxonomyCheckbox,
|
||||
TainacanFilterTaxonomyTaginput,
|
||||
TainacanFilterDateInterval,
|
||||
TainacanFilterNumericInterval,
|
||||
TainacanFilterNumericListInterval
|
||||
TainacanFilterNumeric: defineAsyncComponent(() => import('./numeric/TainacanFilterNumeric.vue')),
|
||||
TainacanFilterDate: defineAsyncComponent(() => import('./date/TainacanFilterDate.vue')),
|
||||
TainacanFilterSelectbox: defineAsyncComponent(() => import('./selectbox/TainacanFilterSelectbox.vue')),
|
||||
TainacanFilterAutocomplete: defineAsyncComponent(() => import('./autocomplete/TainacanFilterAutocomplete.vue')),
|
||||
TainacanFilterCheckbox: defineAsyncComponent(() => import('./checkbox/TainacanFilterCheckbox.vue')),
|
||||
TainacanFilterTaginput: defineAsyncComponent(() => import('./taginput/TainacanFilterTaginput.vue')),
|
||||
TainacanFilterTaxonomyCheckbox: defineAsyncComponent(() => import('./taxonomy/TainacanFilterCheckbox.vue')),
|
||||
TainacanFilterTaxonomyTaginput: defineAsyncComponent(() => import('./taxonomy/TainacanFilterTaginput.vue')),
|
||||
TainacanFilterDateInterval: defineAsyncComponent(() => import('./date-interval/TainacanFilterDateInterval.vue')),
|
||||
TainacanFilterNumericInterval: defineAsyncComponent(() => import('./numeric-interval/TainacanFilterNumericInterval.vue')),
|
||||
TainacanFilterNumericListInterval: defineAsyncComponent(() => import('./numeric-list-interval/TainacanFilterNumericListInterval.vue'))
|
||||
},
|
||||
props: {
|
||||
filter: Object,
|
||||
|
@ -150,7 +140,7 @@
|
|||
},
|
||||
methods: {
|
||||
onInput(inputEvent) {
|
||||
this.$eventBusSearch.$emit('input', inputEvent);
|
||||
this.$eventBusSearchEmitter.emit('input', inputEvent);
|
||||
},
|
||||
onFilterUpdateParentCollapse(open) {
|
||||
const componentsThatShouldCollapseIfEmpty = ['tainacan-filter-taxonomy-checkbox', 'tainacan-filter-selectbox', 'tainacan-filter-checkbox'];
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
class="b-checkbox checkbox is-small">
|
||||
<input
|
||||
v-model="selected"
|
||||
@input="resetPage"
|
||||
:value="option.value"
|
||||
type="checkbox">
|
||||
type="checkbox"
|
||||
@input="resetPage">
|
||||
<span class="check" />
|
||||
<span class="control-label">
|
||||
<span class="checkbox-label-text">{{ option.label }}</span>
|
||||
|
@ -27,8 +27,8 @@
|
|||
</span>
|
||||
</label>
|
||||
<button
|
||||
class="view-all-button link-style"
|
||||
v-if="option.showViewAllButton"
|
||||
class="view-all-button link-style"
|
||||
@click="openCheckboxModal(option.parent)">
|
||||
{{ $i18n.get('label_view_all') }}
|
||||
</button>
|
||||
|
@ -44,28 +44,28 @@
|
|||
<checkbox-radio-filter-input
|
||||
:is-modal="false"
|
||||
:filter="filter"
|
||||
:taxonomy_id="taxonomyId"
|
||||
:taxonomy-id="taxonomyId"
|
||||
:selected="selected"
|
||||
:metadatum-id="metadatumId"
|
||||
:taxonomy="taxonomy"
|
||||
:collection-id="collectionId"
|
||||
:is-taxonomy="true"
|
||||
:query="query"
|
||||
:current-collection-id="currentCollectionId"
|
||||
@input="(newSelected) => {
|
||||
const existingValue = selected.indexOf(newSelected);
|
||||
if (existingValue >= 0)
|
||||
selected.splice(existingValue, 1);
|
||||
else
|
||||
selected.push(newSelected);
|
||||
}"
|
||||
:metadatum-id="metadatumId"
|
||||
:taxonomy="taxonomy"
|
||||
:collection-id="collectionId"
|
||||
:is-taxonomy="true"
|
||||
:query="query"
|
||||
:current-collection-id="currentCollectionId" />
|
||||
}" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import qs from 'qs';
|
||||
import { tainacan as axios, CancelToken, isCancel } from '../../../js/axios';
|
||||
import { tainacanApi, CancelToken, isCancel } from '../../../js/axios';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CheckboxRadioFilterInput from '../../../components/other/checkbox-radio-filter-input.vue';
|
||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||
|
@ -75,9 +75,12 @@
|
|||
mixins: [ filterTypeMixin ],
|
||||
props: {
|
||||
isRepositoryLevel: Boolean,
|
||||
currentCollectionId: String,
|
||||
filtersAsModal: Boolean
|
||||
},
|
||||
emits: [
|
||||
'input',
|
||||
'update-parent-collapse'
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
isLoadingOptions: true,
|
||||
|
@ -89,24 +92,28 @@
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
facetsFromItemSearch() {
|
||||
return this.getFacets();
|
||||
}
|
||||
...mapGetters('search', {
|
||||
'facetsFromItemSearch': 'getFacets'
|
||||
}),
|
||||
},
|
||||
watch: {
|
||||
selected(newVal, oldVal) {
|
||||
selected: {
|
||||
handler(newVal, oldVal) {
|
||||
const isEqual = (Array.isArray(newVal) && Array.isArray(oldVal) && (newVal.length == oldVal.length)) && newVal.every((element, index) => {
|
||||
return element === oldVal[index];
|
||||
});
|
||||
if (!isEqual)
|
||||
this.onSelect();
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
facetsFromItemSearch: {
|
||||
handler() {
|
||||
if (this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
},
|
||||
immediate: true
|
||||
immediate: true,
|
||||
deep:true
|
||||
},
|
||||
isLoadingItems: {
|
||||
handler() {
|
||||
|
@ -125,24 +132,21 @@
|
|||
this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id;
|
||||
this.taxonomy = this.filter.metadatum.metadata_type_object.options.taxonomy;
|
||||
}
|
||||
this.$eventBusSearch.$on('has-to-reload-facets', this.reloadOptions);
|
||||
this.$eventBusSearchEmitter.on('hasToReloadFacets', this.reloadOptions);
|
||||
},
|
||||
mounted(){
|
||||
if (!this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
|
||||
// Cancels previous Request
|
||||
if (this.getOptionsValuesCancel != undefined)
|
||||
this.getOptionsValuesCancel.cancel('Facet search Canceled.');
|
||||
|
||||
this.$eventBusSearch.$off('has-to-reload-facets', this.reloadOptions);
|
||||
this.$eventBusSearchEmitter.off('hasToReloadFacets', this.reloadOptions);
|
||||
},
|
||||
methods: {
|
||||
...mapGetters('search', [
|
||||
'getFacets'
|
||||
]),
|
||||
reloadOptions(shouldReload) {
|
||||
if ( !this.isUsingElasticSearch && shouldReload )
|
||||
this.loadOptions();
|
||||
|
@ -175,7 +179,7 @@
|
|||
promise = new Object({
|
||||
request:
|
||||
new Promise((resolve, reject) => {
|
||||
axios.get(route, { cancelToken: source.token})
|
||||
tainacanApi.get(route, { cancelToken: source.token})
|
||||
.then( res => {
|
||||
resolve(res)
|
||||
})
|
||||
|
@ -191,7 +195,7 @@
|
|||
this.prepareOptionsForTaxonomy(res.data.values ? res.data.values : res.data);
|
||||
|
||||
if (res && res.data && res.data.values)
|
||||
this.$emit('updateParentCollapse', res.data.values.length > 0 );
|
||||
this.$emit('update-parent-collapse', res.data.values.length > 0 );
|
||||
})
|
||||
.catch( error => {
|
||||
if (isCancel(error)) {
|
||||
|
@ -210,10 +214,10 @@
|
|||
if (facet == this.filter.id) {
|
||||
if (Array.isArray(this.facetsFromItemSearch[facet])) {
|
||||
this.prepareOptionsForTaxonomy(this.facetsFromItemSearch[facet]);
|
||||
this.$emit('updateParentCollapse', this.facetsFromItemSearch[facet].length > 0 );
|
||||
this.$emit('update-parent-collapse', this.facetsFromItemSearch[facet].length > 0 );
|
||||
} else {
|
||||
this.prepareOptionsForTaxonomy(Object.values(this.facetsFromItemSearch[facet]));
|
||||
this.$emit('updateParentCollapse', Object.values(this.facetsFromItemSearch[facet]).length > 0 );
|
||||
this.$emit('update-parent-collapse', Object.values(this.facetsFromItemSearch[facet]).length > 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +248,7 @@
|
|||
props: {
|
||||
parent: parent,
|
||||
filter: this.filter,
|
||||
taxonomy_id: this.taxonomyId,
|
||||
taxonomyId: this.taxonomyId,
|
||||
selected: this.selected,
|
||||
metadatumId: this.metadatumId,
|
||||
taxonomy: this.taxonomy,
|
|
@ -13,12 +13,12 @@
|
|||
:aria-close-label="$i18n.get('remove_value')"
|
||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||
:class="{'has-selected': selected != undefined && selected != []}"
|
||||
@typing="search"
|
||||
@input="($event) => { resetPage(); onSelect($event) }"
|
||||
:placeholder="$i18n.get('info_type_to_add_terms')"
|
||||
check-infinite-scroll
|
||||
@typing="search"
|
||||
@update:model-value="($event) => { resetPage(); onSelect($event) }"
|
||||
@infinite-scroll="searchMore">
|
||||
<template slot-scope="props">
|
||||
<template #default="props">
|
||||
<div class="media">
|
||||
<div class="media-content">
|
||||
<span class="ellipsed-text">{{ props.option.label }}</span>
|
||||
|
@ -30,7 +30,7 @@
|
|||
</template>
|
||||
<template
|
||||
v-if="!isLoadingOptions"
|
||||
slot="empty">
|
||||
#empty>
|
||||
{{ $i18n.get('info_no_options_found' ) }}
|
||||
</template>
|
||||
</b-taginput>
|
||||
|
@ -39,11 +39,14 @@
|
|||
|
||||
<script>
|
||||
import qs from 'qs';
|
||||
import { tainacan as axios } from '../../../js/axios';
|
||||
import { tainacanApi } from '../../../js/axios';
|
||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||
|
||||
export default {
|
||||
mixins: [ filterTypeMixin ],
|
||||
emits: [
|
||||
'input',
|
||||
],
|
||||
data(){
|
||||
return {
|
||||
isLoadingOptions: false,
|
||||
|
@ -64,8 +67,11 @@
|
|||
},
|
||||
immediate: true
|
||||
},
|
||||
'query'() {
|
||||
'query': {
|
||||
handler() {
|
||||
this.updateSelectedValues();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -126,7 +132,7 @@
|
|||
|
||||
const valuesToIgnore = JSON.parse(JSON.stringify(this.selected));
|
||||
|
||||
return axios.get(endpoint).then( res => {
|
||||
return tainacanApi.get(endpoint).then( res => {
|
||||
for (let term of res.data.values) {
|
||||
|
||||
if (valuesToIgnore != undefined && valuesToIgnore.length > 0) {
|
|
@ -6,15 +6,21 @@
|
|||
<tr>
|
||||
<!-- Title -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_activity_title') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_activity_title') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Created by -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_created_by') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_created_by') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Activity date -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_activity_date') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_activity_date') }}
|
||||
</div>
|
||||
</th>
|
||||
<!--<!– Approbation –>-->
|
||||
<!--<th>-->
|
||||
|
@ -24,14 +30,14 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
:key="index"
|
||||
v-for="(activity, index) of activities">
|
||||
v-for="(activity, index) of activities"
|
||||
:key="index">
|
||||
<!-- Name -->
|
||||
<td
|
||||
class="column-default-width column-main-content"
|
||||
@click="openActivityDetailsModal(activity)"
|
||||
:label="$i18n.get('label_activity_title')"
|
||||
:aria-label="$i18n.get('label_activity_title') + ': ' + activity.title">
|
||||
:aria-label="$i18n.get('label_activity_title') + ': ' + activity.title"
|
||||
@click="openActivityDetailsModal(activity)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
@ -49,9 +55,9 @@
|
|||
<!-- User -->
|
||||
<td
|
||||
class="table-creation column-small-width"
|
||||
@click="openActivityDetailsModal(activity)"
|
||||
:label="$i18n.get('label_created_by')"
|
||||
:aria-label="$i18n.get('label_created_by') + ': ' + activity.user_name">
|
||||
:aria-label="$i18n.get('label_created_by') + ': ' + activity.user_name"
|
||||
@click="openActivityDetailsModal(activity)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
@ -68,9 +74,9 @@
|
|||
<!-- Activity Date -->
|
||||
<td
|
||||
class="table-creation column-small-width"
|
||||
@click="openActivityDetailsModal(activity)"
|
||||
:label="$i18n.get('label_activity_date')"
|
||||
:aria-label="$i18n.get('label_activity_date') + ': ' + activity.date">
|
||||
:aria-label="$i18n.get('label_activity_date') + ': ' + activity.date"
|
||||
@click="openActivityDetailsModal(activity)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
style="position: relative;"
|
||||
class="table-container">
|
||||
<b-loading
|
||||
:is-full-page="false"
|
||||
:active.sync="isLoading" />
|
||||
v-model="isLoading"
|
||||
:is-full-page="false" />
|
||||
<div
|
||||
v-if="attachments.length > 0"
|
||||
class="table-wrapper">
|
||||
|
@ -28,14 +28,14 @@
|
|||
v-if="isEditable && form.document != attachment.id"
|
||||
class="file-item-control">
|
||||
<a
|
||||
@click="onDeleteAttachment(attachment)"
|
||||
v-tooltip="{
|
||||
content: $i18n.get('delete'),
|
||||
autoHide: true,
|
||||
placement: 'bottom',
|
||||
popperClass: ['tainacan-tooltip', 'tooltip']
|
||||
}"
|
||||
class="icon">
|
||||
class="icon"
|
||||
@click="onDeleteAttachment(attachment)">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-delete" />
|
||||
</a>
|
||||
</span>
|
||||
|
@ -59,8 +59,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
class="pagination-area"
|
||||
v-if="attachments.length > 0">
|
||||
v-if="attachments.length > 0"
|
||||
class="pagination-area">
|
||||
<div class="shown-items">
|
||||
{{
|
||||
$i18n.getWithVariables('info_showing_%s', [ collection && collection.item_attachment_label ? collection.item_attachment_label : $i18n.get('label_attachments') ]) + ' ' +
|
||||
|
@ -72,16 +72,16 @@
|
|||
</div>
|
||||
<div class="pagination">
|
||||
<b-pagination
|
||||
@change="onPageChange"
|
||||
v-model="attachmentsPage"
|
||||
:total="totalAttachments"
|
||||
:current.sync="attachmentsPage"
|
||||
order="is-centered"
|
||||
size="is-small"
|
||||
:per-page="attachmentsPerPage"
|
||||
:aria-next-label="$i18n.get('label_next_page')"
|
||||
:aria-previous-label="$i18n.get('label_previous_page')"
|
||||
:aria-page-label="$i18n.get('label_page')"
|
||||
:aria-current-label="$i18n.get('label_current_page')"/>
|
||||
:aria-current-label="$i18n.get('label_current_page')"
|
||||
@change="onPageChange" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -103,6 +103,9 @@
|
|||
shouldLoadAttachments: Boolean,
|
||||
isEditable: Boolean,
|
||||
},
|
||||
emits: [
|
||||
'on-delete-attachment',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
attachmentsPage: 1,
|
||||
|
@ -111,12 +114,10 @@
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
attachments() {
|
||||
return this.getAttachments();
|
||||
},
|
||||
totalAttachments() {
|
||||
return this.getTotalAttachments();
|
||||
}
|
||||
...mapGetters('item', {
|
||||
'attachments': 'getAttachments',
|
||||
'totalAttachments': 'getTotalAttachments'
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
shouldLoadAttachments() {
|
||||
|
@ -131,10 +132,6 @@
|
|||
...mapActions('item', [
|
||||
'fetchAttachments',
|
||||
]),
|
||||
...mapGetters('item', [
|
||||
'getAttachments',
|
||||
'getTotalAttachments'
|
||||
]),
|
||||
onChangeAttachmentsPerPage(value) {
|
||||
|
||||
if (value != this.attachmentsPerPage) {
|
||||
|
@ -167,9 +164,8 @@
|
|||
// excludeDocumentId: this.form.document,
|
||||
// excludeThumbnailId: this.item.thumbnail_id
|
||||
})
|
||||
.then((response) => {
|
||||
.then(() => {
|
||||
this.isLoading = false;
|
||||
this.totalAttachments = response.total;
|
||||
})
|
||||
.catch((error) => {
|
||||
this.isLoading = false;
|
||||
|
@ -177,7 +173,7 @@
|
|||
})
|
||||
},
|
||||
onDeleteAttachment(attachment) {
|
||||
this.$emit('onDeleteAttachment', attachment);
|
||||
this.$emit('on-delete-attachment', attachment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,15 +6,21 @@
|
|||
<tr>
|
||||
<!-- Name -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_name') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_name') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Description -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_description') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_description') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Capability date -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_user_roles') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_user_roles') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Actions -->
|
||||
<th class="actions-header">
|
||||
|
@ -24,8 +30,9 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody v-if="!isLoading">
|
||||
<template v-for="(capability, index) of capabilities">
|
||||
<tr :key="index">
|
||||
<tr
|
||||
v-for="(capability, index) of capabilities"
|
||||
:key="index">
|
||||
<!-- Name -->
|
||||
<td
|
||||
class="column-default-width column-main-content"
|
||||
|
@ -67,8 +74,8 @@
|
|||
<complete-roles-list
|
||||
v-if="capability.roles"
|
||||
:complete-roles-list="getCompleteRolesList(capability.roles, capability.roles_inherited)">
|
||||
<template #props>
|
||||
<td
|
||||
slot-scope="props"
|
||||
class="table-creation column-small-width"
|
||||
:label="$i18n.get('label_associated_roles')"
|
||||
:aria-label="$i18n.get('label_associated_roles') + ': ' + props['complete-roles-list']">
|
||||
|
@ -85,6 +92,7 @@
|
|||
}"
|
||||
v-html="props['complete-roles-list']" />
|
||||
</td>
|
||||
</template>
|
||||
</complete-roles-list>
|
||||
<!-- Actions -->
|
||||
<td
|
||||
|
@ -109,7 +117,6 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -121,8 +128,9 @@
|
|||
|
||||
// Auxiliary component for avoinding multiple calls to getCompleteRolesList
|
||||
const CompleteRolesList = {
|
||||
inheritAttrs: false,
|
||||
render() {
|
||||
return this.$scopedSlots.default(this.$attrs)
|
||||
return !!this.$slots.default && typeof this.$slots.default == 'function' ? this.$slots.default(this.$attrs) : '';
|
||||
}
|
||||
}
|
||||
export default {
|
||||
|
@ -132,7 +140,7 @@
|
|||
},
|
||||
props: {
|
||||
isLoading: false,
|
||||
capabilities: Array
|
||||
capabilities: Object
|
||||
},
|
||||
methods: {
|
||||
openCapabilitiyEditModal(capabilityKey) {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<div class="column">
|
||||
|
||||
<b-loading :active.sync="isLoadingMetadataSections"/>
|
||||
<b-loading v-model="isLoadingMetadataSections" />
|
||||
|
||||
<div class="tainacan-form sub-header">
|
||||
<template v-if="activeMetadataSectionsList">
|
||||
<button
|
||||
v-if="activeMetadataSectionsList.length > 0"
|
||||
aria-controls="filters-items-list"
|
||||
:aria-expanded="!collapseAll"
|
||||
v-if="activeMetadataSectionsList.length > 0"
|
||||
class="link-style collapse-all"
|
||||
@click="collapseAll = !collapseAll">
|
||||
<span class="icon">
|
||||
|
@ -27,15 +27,16 @@
|
|||
class="show metadata-options-dropdown"
|
||||
aria-role="list"
|
||||
trap-focus>
|
||||
<template #trigger>
|
||||
<button
|
||||
:aria-label="$i18n.get('label_filter_by_metadata_type')"
|
||||
class="button is-white"
|
||||
slot="trigger">
|
||||
class="button is-white">
|
||||
<span>{{ $i18n.get('label_filter_by_metadata_type') }}</span>
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
<div class="metadata-options-container">
|
||||
<b-dropdown-item
|
||||
v-for="(metadataType, index) in metadataTypeFilterOptions"
|
||||
|
@ -54,8 +55,8 @@
|
|||
</b-field>
|
||||
<b-field class="header-item">
|
||||
<b-input
|
||||
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
|
||||
v-model="metadataNameFilterString"
|
||||
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
|
||||
icon="magnify"
|
||||
size="is-small"
|
||||
icon-right="close-circle"
|
||||
|
@ -79,21 +80,30 @@
|
|||
</section>
|
||||
|
||||
<!-- The Metadata Sections list -->
|
||||
<draggable
|
||||
v-model="activeMetadataSectionsList"
|
||||
<sortable
|
||||
:list="activeMetadataSectionsList"
|
||||
item-key="id"
|
||||
class="active-metadata-sections-area"
|
||||
@change="handleSectionChange($event)"
|
||||
:group="{ name:'metadata-sections', pull: false, put: [ 'metadata-sections' ] }"
|
||||
:sort="(openedMetadataSectionId == '' || openedMetadataSectionId == undefined) && (openedMetadatumId == '' || openedMetadatumId == undefined)"
|
||||
:handle="'.handle'"
|
||||
ghost-class="sortable-ghost"
|
||||
chosen-class="sortable-chosen"
|
||||
filter=".not-sortable-item"
|
||||
:prevent-on-filter="false"
|
||||
:animation="250">
|
||||
<div
|
||||
v-for="(metadataSection, sectionIndex) in activeMetadataSectionsList"
|
||||
:key="metadataSection.id">
|
||||
:options="{
|
||||
group: {
|
||||
name:'metadata-sections',
|
||||
pull: false,
|
||||
put: [ 'metadata-sections' ]
|
||||
},
|
||||
sort: (openedMetadataSectionId == '' || openedMetadataSectionId == undefined) && (openedMetadatumId == '' || openedMetadatumId == undefined),
|
||||
direction: 'vertical',
|
||||
handle: '.handle',
|
||||
ghostClass: 'sortable-ghost',
|
||||
chosenClass: 'sortable-chosen',
|
||||
filter: '.not-sortable-item',
|
||||
preventOnFilter: false,
|
||||
animation: 250
|
||||
}"
|
||||
@update="handleSectionChange($event)"
|
||||
@add="handleSectionChange($event)"
|
||||
@remove="handleSectionChange($event)">
|
||||
<template #item="{ element: metadataSection, index: sectionIndex }">
|
||||
<div :key="metadataSection.id">
|
||||
<div
|
||||
class="active-metadata-sections-item"
|
||||
:class="{
|
||||
|
@ -133,13 +143,13 @@
|
|||
</button>
|
||||
</span>
|
||||
<span
|
||||
:style="{ opacity: !(metadataSection.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || openedMetadataSectionId != '' || isUpdatingMetadataSectionsOrder || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied) ? '1.0' : '0.0' }"
|
||||
v-tooltip="{
|
||||
content: metadataSection.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || openedMetadataSectionId != '' || isUpdatingMetadataSectionsOrder || isUpdatingMetadatum ? $i18n.get('info_not_allowed_change_order_metadata_sections') : $i18n.get('instruction_drag_and_drop_metadata_sections_sort'),
|
||||
autoHide: true,
|
||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||
placement: 'auto-start'
|
||||
}"
|
||||
:style="{ opacity: !(metadataSection.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || openedMetadataSectionId != '' || isUpdatingMetadataSectionsOrder || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied) ? '1.0' : '0.0' }"
|
||||
class="icon grip-icon">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -172,27 +182,27 @@
|
|||
</span>
|
||||
<span
|
||||
v-if="metadataSection.status === 'private'"
|
||||
class="icon"
|
||||
v-tooltip="{
|
||||
content: $i18n.get('status_private'),
|
||||
autoHide: true,
|
||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||
placement: 'auto-start'
|
||||
}">
|
||||
}"
|
||||
class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-private" />
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
class="loading-spinner"
|
||||
v-if="metadataSection.id == undefined"/>
|
||||
v-if="metadataSection.id == undefined"
|
||||
class="loading-spinner" />
|
||||
<span
|
||||
class="controls"
|
||||
v-if="metadataSection.id !== undefined">
|
||||
v-if="metadataSection.id !== undefined"
|
||||
class="controls">
|
||||
<b-switch
|
||||
:disabled="isUpdatingMetadataSectionsOrder"
|
||||
size="is-small"
|
||||
:value="metadataSection.enabled"
|
||||
@input="onChangeEnableSection($event, sectionIndex)"/>
|
||||
:model-value="metadataSection.enabled"
|
||||
@update:model-value="onChangeEnableSection($event, sectionIndex)" />
|
||||
<a
|
||||
v-if="metadataSection.current_user_can_edit"
|
||||
:style="{ visibility:
|
||||
|
@ -213,7 +223,7 @@
|
|||
</a>
|
||||
<a
|
||||
v-if="metadataSection.current_user_can_delete"
|
||||
:disabled="metadataSection.metadata_object_list.length"
|
||||
:disabled="metadataSection.metadata_object_list.length > 0"
|
||||
:style="{ visibility: metadataSection.collection_id != collectionId || metadataSection.id === 'default_section' || metadataSection.metadata_object_list.length ? 'hidden' : 'visible' }"
|
||||
@click.prevent="removeMetadataSection(metadataSection)">
|
||||
<span
|
||||
|
@ -245,27 +255,41 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<b-loading :active.sync="isUpdatingMetadatum"/>
|
||||
<b-loading v-model="isUpdatingMetadatum" />
|
||||
|
||||
<!-- The Metadata list, inside each metadata section -->
|
||||
<template v-if="metadataSection.metadata_object_list && Array.isArray(metadataSection.metadata_object_list)">
|
||||
<draggable
|
||||
v-model="metadataSection.metadata_object_list"
|
||||
<sortable
|
||||
:list="metadataSection.metadata_object_list"
|
||||
item-key="id"
|
||||
class="active-metadata-area"
|
||||
@change="handleChange($event, sectionIndex)"
|
||||
:group="{ name:'metadata', pull: [ 'metadata' ], put: [ 'metadata' ] }"
|
||||
:sort="(openedMetadatumId == '' || openedMetadatumId == undefined)"
|
||||
:handle="'.handle'"
|
||||
ghost-class="sortable-ghost"
|
||||
chosen-class="sortable-chosen"
|
||||
filter=".not-sortable-item"
|
||||
:prevent-on-filter="false"
|
||||
:animation="250">
|
||||
:options="{
|
||||
group: {
|
||||
name:'metadata',
|
||||
pull: [ 'metadata' ],
|
||||
put: [ 'metadata' ]
|
||||
},
|
||||
sort: (openedMetadatumId == '' || openedMetadatumId == undefined) && (openedMetadataSectionId == '' || openedMetadataSectionId == undefined),
|
||||
handle: '.handle',
|
||||
direction: 'vertical',
|
||||
ghostClass: 'sortable-ghost',
|
||||
chosenClass: 'sortable-chosen',
|
||||
filter: '.not-sortable-item',
|
||||
preventOnFilter: false,
|
||||
animation: 250,
|
||||
dataIdAttr: 'data-metadatum-id'
|
||||
}"
|
||||
@update="handleChange($event, sectionIndex)"
|
||||
@add="handleChange($event, sectionIndex)"
|
||||
@remove="handleChange($event, sectionIndex)">
|
||||
<template #item="{ element: metadatum, index }">
|
||||
<div
|
||||
v-for="(metadatum, index) in metadataSection.metadata_object_list.filter((meta) => meta != undefined && meta.parent == 0)"
|
||||
v-if="metadatum != undefined && metadatum.parent == 0"
|
||||
v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)"
|
||||
:key="metadatum.id"
|
||||
v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)">
|
||||
<div
|
||||
:data-metadatum-id="metadatum.id"
|
||||
:data-collection-id="metadatum.collection_id"
|
||||
:data-original-section-index="sectionIndex"
|
||||
class="active-metadatum-item"
|
||||
:class="{
|
||||
'is-compact-item': !isCollapseOpen(metadatum.id),
|
||||
|
@ -282,8 +306,8 @@
|
|||
<button
|
||||
:disabled="index == 0"
|
||||
class="link-button"
|
||||
@click="moveMetadatumUpViaButton(index, sectionIndex)"
|
||||
:aria-label="$i18n.get('label_move_up')">
|
||||
:aria-label="$i18n.get('label_move_up')"
|
||||
@click="moveMetadatumUpViaButton(index, sectionIndex)">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-previous tainacan-icon-rotate-90" />
|
||||
</span>
|
||||
|
@ -291,21 +315,21 @@
|
|||
<button
|
||||
:disabled="index == metadataSection.metadata_object_list.filter((meta) => meta != undefined && meta.parent == 0).length - 1"
|
||||
class="link-button"
|
||||
@click="moveMetadatumDownViaButton(index, sectionIndex)"
|
||||
:aria-label="$i18n.get('label_move_down')">
|
||||
:aria-label="$i18n.get('label_move_down')"
|
||||
@click="moveMetadatumDownViaButton(index, sectionIndex)">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-next tainacan-icon-rotate-90" />
|
||||
</span>
|
||||
</button>
|
||||
</span>
|
||||
<span
|
||||
:style="{ opacity: !(metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied) ? '1.0' : '0.0' }"
|
||||
v-tooltip="{
|
||||
content: metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || isUpdatingMetadatum ? $i18n.get('info_not_allowed_change_order_metadata') : $i18n.get('instruction_drag_and_drop_metadatum_sort'),
|
||||
autoHide: true,
|
||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||
placement: 'auto-start'
|
||||
}"
|
||||
:style="{ opacity: !(metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied) ? '1.0' : '0.0' }"
|
||||
class="icon grip-icon">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
@ -326,9 +350,9 @@
|
|||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||
placement: 'auto-start'
|
||||
}"
|
||||
@click="$set(collapses, metadatum.id, !isCollapseOpen(metadatum.id))"
|
||||
class="gray-icon icon"
|
||||
:style="{ cursor: 'pointer', opacity: openedMetadatumId != metadatum.id ? '1.0' : '0.0' }">
|
||||
:style="{ cursor: 'pointer', opacity: openedMetadatumId != metadatum.id ? '1.0' : '0.0' }"
|
||||
@click="Object.assign(collapses, { [metadatum.id]: !isCollapseOpen(metadatum.id) })">
|
||||
<i :class="'tainacan-icon tainacan-icon-1-25em tainacan-icon-' + (isCollapseOpen(metadatum.id) ? 'arrowdown' : 'arrowright')" />
|
||||
</span>
|
||||
|
||||
|
@ -352,13 +376,13 @@
|
|||
({{ metadatum.metadata_type_object.name }})
|
||||
<span
|
||||
v-if="metadatum.status === 'private'"
|
||||
class="icon"
|
||||
v-tooltip="{
|
||||
content: $i18n.get('status_private'),
|
||||
autoHide: true,
|
||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||
placement: 'auto-start'
|
||||
}">
|
||||
}"
|
||||
class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-private" />
|
||||
</span>
|
||||
<span
|
||||
|
@ -386,17 +410,17 @@
|
|||
</span>
|
||||
</span>
|
||||
<span
|
||||
class="loading-spinner"
|
||||
v-if="metadatum.id == undefined || isUpdatingMetadatum"/>
|
||||
v-if="metadatum.id == undefined || isUpdatingMetadatum"
|
||||
class="loading-spinner" />
|
||||
<span
|
||||
class="controls"
|
||||
v-if="metadatum.id !== undefined">
|
||||
v-if="metadatum.id !== undefined"
|
||||
class="controls">
|
||||
<b-switch
|
||||
:style="{ visibility: !metadataSection.enabled ? 'hidden' : 'visible' }"
|
||||
:disabled="isUpdatingMetadataOrder || !metadataSection.enabled"
|
||||
size="is-small"
|
||||
:value="metadatum.enabled"
|
||||
@input="onChangeEnable($event, index, sectionIndex)"/>
|
||||
:model-value="metadatum.enabled"
|
||||
@update:model-value="onChangeEnable($event, index, sectionIndex)" />
|
||||
<a
|
||||
v-if="metadatum.current_user_can_edit"
|
||||
:style="{ visibility:
|
||||
|
@ -449,49 +473,50 @@
|
|||
:is-parent-multiple="metadatum.multiple == 'yes'"
|
||||
:is-repository-level="false"
|
||||
:collapse-all="collapseAll"
|
||||
:section-id="metadataSection.id" />
|
||||
:section-id="metadataSection.id + ''" />
|
||||
|
||||
<!-- Metadata edition form, for each metadata -->
|
||||
<b-modal
|
||||
@close="onEditionCanceled()"
|
||||
:active="openedMetadatumId == metadatum.id"
|
||||
:model-value="openedMetadatumId == metadatum.id"
|
||||
trap-focus
|
||||
aria-modal
|
||||
aria-role="dialog"
|
||||
custom-class="tainacan-modal"
|
||||
:close-button-aria-label="$i18n.get('close')">
|
||||
:close-button-aria-label="$i18n.get('close')"
|
||||
@close="onEditionCanceled()">
|
||||
<metadatum-edition-form
|
||||
:collection-id="collectionId"
|
||||
:original-metadatum="metadatum"
|
||||
:is-repository-level="false"
|
||||
@onEditionFinished="onEditionFinished()"
|
||||
@onEditionCanceled="onEditionCanceled()"
|
||||
:index="index" />
|
||||
:index="index"
|
||||
@on-edition-finished="onEditionFinished()"
|
||||
@on-edition-canceled="onEditionCanceled()" />
|
||||
</b-modal>
|
||||
|
||||
</div>
|
||||
</draggable><!-- End of .active-metadata-area -->
|
||||
</template>
|
||||
</sortable><!-- End of .active-metadata-area -->
|
||||
</template>
|
||||
|
||||
<!-- Metadata Section edition form, for each metadata section -->
|
||||
<b-modal
|
||||
@close="onSectionEditionCanceled()"
|
||||
:active="openedMetadataSectionId == metadataSection.id"
|
||||
:model-value="openedMetadataSectionId == metadataSection.id"
|
||||
trap-focus
|
||||
aria-modal
|
||||
aria-role="dialog"
|
||||
custom-class="tainacan-modal"
|
||||
:close-button-aria-label="$i18n.get('close')">
|
||||
:close-button-aria-label="$i18n.get('close')"
|
||||
@close="onSectionEditionCanceled()">
|
||||
<metadata-section-edition-form
|
||||
:collection-id="collectionId"
|
||||
:original-metadata-section="metadataSection"
|
||||
@onEditionFinished="onSectionEditionFinished()"
|
||||
@onEditionCanceled="onSectionEditionCanceled()"
|
||||
:index="sectionIndex" />
|
||||
:index="sectionIndex"
|
||||
@on-edition-finished="onSectionEditionFinished()"
|
||||
@on-edition-canceled="onSectionEditionCanceled()" />
|
||||
</b-modal>
|
||||
|
||||
</div>
|
||||
</draggable> <!-- End of .active-metadata-sections-area -->
|
||||
</template>
|
||||
</sortable> <!-- End of .active-metadata-sections-area -->
|
||||
</div> <!-- End of .columns -->
|
||||
</template>
|
||||
|
||||
|
@ -503,17 +528,23 @@ import ChildMetadataList from '../../components/metadata-types/compound/child-me
|
|||
import CustomDialog from '../../components/other/custom-dialog.vue';
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
|
||||
import { Sortable } from "sortablejs-vue3";
|
||||
|
||||
export default {
|
||||
name: 'CollectionMetadataList',
|
||||
components: {
|
||||
MetadatumEditionForm,
|
||||
MetadataSectionEditionForm,
|
||||
ChildMetadataList,
|
||||
MetadatumDetails
|
||||
MetadatumDetails,
|
||||
Sortable
|
||||
},
|
||||
props: {
|
||||
metadataTypeFilterOptions: Array
|
||||
},
|
||||
emits: [
|
||||
'on-update-highlighted-metadatum',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
collectionId: '',
|
||||
|
@ -521,7 +552,7 @@ export default {
|
|||
isUpdatingMetadataOrder: false,
|
||||
openedMetadatumId: '',
|
||||
openedMetadataSectionId: '',
|
||||
hightlightedMetadatum: '',
|
||||
highlightedMetadatum: '',
|
||||
collapses: {},
|
||||
collapseAll: false,
|
||||
metadataNameFilterString: '',
|
||||
|
@ -532,7 +563,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
hasSomeMetadataTypeFilterApplied() {
|
||||
return this.metadataTypeFilterOptions.length && this.metadataTypeFilterOptions.some((metadatumType) => metadatumType.enabled);
|
||||
return this.metadataTypeFilterOptions.length > 0 && this.metadataTypeFilterOptions.some((metadatumType) => metadatumType.enabled);
|
||||
},
|
||||
activeMetadataSectionsList: {
|
||||
get() {
|
||||
|
@ -541,7 +572,7 @@ export default {
|
|||
set(value) {
|
||||
this.updateMetadataSections(value);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$route.query': {
|
||||
|
@ -566,20 +597,21 @@ export default {
|
|||
this.editMetadataSection(newQuery.sectionEdit);
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
immediate: true,
|
||||
deep: true
|
||||
},
|
||||
collapseAll(isCollapsed) {
|
||||
this.activeMetadataSectionsList.forEach((metadataSection) => {
|
||||
if ( metadataSection.metadata_object_list && Array.isArray(metadataSection.metadata_object_list) )
|
||||
metadataSection.metadata_object_list.forEach((metadatum) => this.$set(this.collapses, metadatum.id, isCollapsed));
|
||||
metadataSection.metadata_object_list.forEach((metadatum) => Object.assign(this.collapses, { [metadatum.id]: isCollapsed }) );
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.cleanMetadataSections();
|
||||
|
||||
this.$eventBusMetadataList.$on('addMetadatumViaButton', this.addMetadatumViaButton);
|
||||
this.$eventBusMetadataList.$on('addMetadataSectionViaButton', this.addMetadataSectionViaButton);
|
||||
this.$emitter.on('addMetadatumViaButton', this.addMetadatumViaButton);
|
||||
this.$emitter.on('addMetadataSectionViaButton', this.addMetadataSectionViaButton);
|
||||
|
||||
this.collectionId = this.$route.params.collectionId;
|
||||
this.isLoadingMetadataSections = true;
|
||||
|
@ -592,13 +624,13 @@ export default {
|
|||
this.isLoadingMetadataSections = false;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
||||
this.$eventBusMetadataList.$off('addMetadatumViaButton', this.addMetadatumViaButton);
|
||||
this.$eventBusMetadataList.$off('addMetadataSectionViaButton', this.addMetadataSectionViaButton);
|
||||
this.$emitter.off('addMetadatumViaButton', this.addMetadatumViaButton);
|
||||
this.$emitter.off('addMetadataSectionViaButton', this.addMetadataSectionViaButton);
|
||||
},
|
||||
methods: {
|
||||
...mapActions('metadata', [
|
||||
|
@ -615,41 +647,89 @@ export default {
|
|||
'moveMetadataSectionUp',
|
||||
'moveMetadataSectionDown',
|
||||
'moveMetadatumUp',
|
||||
'moveMetadatumDown'
|
||||
'moveMetadatumDown',
|
||||
'moveMetadatum'
|
||||
]),
|
||||
...mapGetters('metadata',[
|
||||
'getMetadataSections'
|
||||
'getMetadataSections',
|
||||
'getMetadatumTypes'
|
||||
]),
|
||||
handleSectionChange(event) {
|
||||
if (event.added)
|
||||
this.addNewMetadataSection(event.added.newIndex);
|
||||
else if (event.removed)
|
||||
this.removeMetadataSection(event.removed.element);
|
||||
else if (event.moved)
|
||||
handleSectionChange($event) {
|
||||
switch ( $event.type ) {
|
||||
case 'add':
|
||||
this.addNewMetadataSection($event.newIndex);
|
||||
break;
|
||||
case 'remove':
|
||||
this.removeMetadataSection(this.activeFiltersList[$event.oldIndex]);
|
||||
break;
|
||||
case 'change':
|
||||
case 'update': {
|
||||
const newMetadataSectionsList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList));
|
||||
const element = newMetadataSectionsList.splice($event.oldIndex, 1)[0];
|
||||
newMetadataSectionsList.splice($event.newIndex, 0, element);
|
||||
|
||||
this.updateMetadataSections(newMetadataSectionsList);
|
||||
|
||||
this.updateMetadataSectionsOrder();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
handleChange(event, sectionIndex) {
|
||||
if (event.added) {
|
||||
if (!event.added.element.id)
|
||||
this.addNewMetadatum(event.added.element, event.added.newIndex, sectionIndex);
|
||||
else {
|
||||
handleChange($event, sectionIndex) {
|
||||
switch ( $event.type ) {
|
||||
case 'add':
|
||||
|
||||
if ( !$event.from.classList.contains('active-metadata-area') ) {
|
||||
this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex, sectionIndex);
|
||||
$event.originalTarget.removeChild($event.item)
|
||||
} else {
|
||||
this.isLoadingMetadataSections = true;
|
||||
|
||||
const previousSectionIndex = $event.item.dataset['originalSectionIndex'];
|
||||
|
||||
const previousSectionMetadataObjectList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList[previousSectionIndex].metadata_object_list));
|
||||
const newSectionMetadataObjectList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList[sectionIndex].metadata_object_list));
|
||||
const element = previousSectionMetadataObjectList.splice($event.oldIndex, 1)[0];
|
||||
newSectionMetadataObjectList.splice($event.newIndex, 0, element);
|
||||
|
||||
const newMetadataSectionsList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList));
|
||||
newMetadataSectionsList[sectionIndex].metadata_object_list = newSectionMetadataObjectList;
|
||||
newMetadataSectionsList[previousSectionIndex].metadata_object_list = previousSectionMetadataObjectList;
|
||||
|
||||
this.updateMetadataSections(newMetadataSectionsList);
|
||||
$event.originalTarget.removeChild($event.item);
|
||||
|
||||
this.updateMetadatum({
|
||||
collectionId: this.collectionId,
|
||||
metadatumId: event.added.element.id,
|
||||
isRepositoryLevel: event.added.element.collection_id === 'default',
|
||||
index: event.added.newIndex,
|
||||
metadatumId: $event.item.dataset['metadatumId'],
|
||||
isRepositoryLevel: $event.item.dataset['collectionId'] === 'default',
|
||||
index: $event.newIndex,
|
||||
options: {},
|
||||
includeOptionsAsHtml: true,
|
||||
sectionId: this.activeMetadataSectionsList[sectionIndex].id
|
||||
}).then(() => {
|
||||
this.updateMetadataSectionsOrder(newMetadataSectionsList)
|
||||
.then( () => this.isLoadingMetadataSections = false )
|
||||
.catch( () => this.isLoadingMetadataSections = false );
|
||||
}).catch(() => {
|
||||
this.isLoadingMetadataSections = false;
|
||||
});
|
||||
this.updateMetadataSectionsOrder(sectionIndex);
|
||||
}
|
||||
}
|
||||
else if (event.moved)
|
||||
|
||||
break;
|
||||
case 'change':
|
||||
case 'update': {
|
||||
this.moveMetadatum({ newIndex: $event.newIndex, oldIndex: $event.oldIndex, sectionIndex: sectionIndex });
|
||||
this.updateMetadataOrder(sectionIndex);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
updateMetadataOrder(sectionIndex) {
|
||||
let metadataOrder = [];
|
||||
|
||||
for (let metadatum of this.activeMetadataSectionsList[sectionIndex].metadata_object_list)
|
||||
if (metadatum != undefined)
|
||||
metadataOrder.push({
|
||||
|
@ -661,10 +741,14 @@ export default {
|
|||
this.updateCollectionMetadataOrder({ collectionId: this.collectionId, metadataOrder: metadataOrder, metadataSectionId: this.activeMetadataSectionsList[sectionIndex].id })
|
||||
.then(() => this.isUpdatingMetadataOrder = false)
|
||||
.catch(() => this.isUpdatingMetadataOrder = false);
|
||||
|
||||
},
|
||||
updateMetadataSectionsOrder() {
|
||||
updateMetadataSectionsOrder(metadataSectionsList) {
|
||||
if (metadataSectionsList == undefined)
|
||||
metadataSectionsList = this.activeMetadataSectionsList;
|
||||
|
||||
let metadataSectionsOrder = [];
|
||||
for (let metadataSection of this.activeMetadataSectionsList)
|
||||
for (let metadataSection of metadataSectionsList)
|
||||
if (metadataSection != undefined) {
|
||||
metadataSectionsOrder.push({
|
||||
'id': metadataSection.id,
|
||||
|
@ -693,12 +777,13 @@ export default {
|
|||
onChangeEnableSection($event, index) {
|
||||
let metadataSectionsOrder = [];
|
||||
for (let metadataSection of this.activeMetadataSectionsList)
|
||||
if (metadataSection != undefined)
|
||||
if (metadataSection != undefined) {
|
||||
metadataSectionsOrder.push({
|
||||
'id': metadataSection.id,
|
||||
'enabled': metadataSection.enabled,
|
||||
'metadata_order': metadataSection.metadata_object_list.map((aMetadatum) => { return { 'id': aMetadatum.id, 'enabled': aMetadatum.enabled } })
|
||||
});
|
||||
}
|
||||
|
||||
metadataSectionsOrder[index].enabled = $event;
|
||||
this.isUpdatingMetadataSectionsOrder = true;
|
||||
|
@ -708,10 +793,9 @@ export default {
|
|||
},
|
||||
addMetadatumViaButton(metadatumType) {
|
||||
this.addNewMetadatum(metadatumType, this.activeMetadataSectionsList[0].metadata_object_list.length, 0);
|
||||
|
||||
// Higlights the clicked metadatum
|
||||
this.hightlightedMetadatum = metadatumType.name;
|
||||
this.$emit('onUpdatehightlightedMetadatum', this.hightlightedMetadatum);
|
||||
this.highlightedMetadatum = metadatumType.name;
|
||||
this.$emit('on-update-highlighted-metadatum', this.highlightedMetadatum);
|
||||
},
|
||||
addMetadataSectionViaButton() {
|
||||
let lastIndex = this.activeMetadataSectionsList.length;
|
||||
|
@ -730,13 +814,11 @@ export default {
|
|||
sectionId: this.activeMetadataSectionsList[sectionIndex].id
|
||||
})
|
||||
.then((metadatum) => {
|
||||
|
||||
this.updateMetadataOrder(sectionIndex);
|
||||
|
||||
this.toggleMetadatumEdition(metadatum)
|
||||
this.hightlightedMetadatum = '';
|
||||
this.highlightedMetadatum = '';
|
||||
this.isUpdatingMetadatum = false;
|
||||
this.$emit('onUpdatehightlightedMetadatum', this.hightlightedMetadatum);
|
||||
this.$emit('on-update-highlighted-metadatum', this.highlightedMetadatum);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.isUpdatingMetadatum = false;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
class="new-collection-menu">
|
||||
<li>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getNewCollectionPath()"
|
||||
class="first-card">
|
||||
<div class="list-metadata">
|
||||
|
@ -20,7 +19,6 @@
|
|||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||
:aria-label="$i18n.get('label_collection_items')">
|
||||
<span
|
||||
|
@ -38,7 +36,6 @@
|
|||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||
:aria-label="$i18n.get('label_collection_metadata')">
|
||||
<span
|
||||
|
@ -56,7 +53,6 @@
|
|||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||
:aria-label="$i18n.get('label_collection_filters')">
|
||||
<span
|
||||
|
@ -76,7 +72,6 @@
|
|||
<ul v-if="collections.length > 0 && !isLoading">
|
||||
<li v-if="!$adminOptions.hideHomeCollectionCreateNewButton && $userCaps.hasCapability('tnc_rep_edit_collections')">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getNewCollectionPath()"
|
||||
class="tainacan-card new-card">
|
||||
<div class="list-metadata">
|
||||
|
@ -88,7 +83,6 @@
|
|||
<ul class="menu-list">
|
||||
<li>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||
:aria-label="$i18n.get('label_collection_items')">
|
||||
<span
|
||||
|
@ -105,7 +99,6 @@
|
|||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||
:aria-label="$i18n.get('label_collection_metadata')">
|
||||
<span
|
||||
|
@ -122,7 +115,6 @@
|
|||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||
:aria-label="$i18n.get('label_collection_filters')">
|
||||
<span
|
||||
|
@ -141,14 +133,13 @@
|
|||
</router-link>
|
||||
</li>
|
||||
<li
|
||||
:key="index"
|
||||
v-for="(collection, index) of collections"
|
||||
:key="index"
|
||||
class="tainacan-card"
|
||||
:class="{ 'always-visible-collections': $adminOptions.homeCollectionsPerPage }">
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getCollectionItemsPath(collection.id, '') }"
|
||||
:aria-label="$i18n.get('label_collection_items')">
|
||||
<span
|
||||
|
@ -165,7 +156,6 @@
|
|||
</li>
|
||||
<li v-if="collection.current_user_can_edit_items && $adminOptions.showHomeCollectionCreateItemButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getNewItemPath(collection.id) }"
|
||||
:aria-label="$i18n.get('add_one_item')">
|
||||
<span
|
||||
|
@ -182,7 +172,6 @@
|
|||
</li>
|
||||
<li v-if="collection.current_user_can_edit && !$adminOptions.hideHomeCollectionSettingsButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getCollectionEditPath(collection.id) }"
|
||||
:aria-label="$i18n.get('label_settings')">
|
||||
<span
|
||||
|
@ -199,7 +188,6 @@
|
|||
</li>
|
||||
<li v-if="collection.current_user_can_edit_metadata && !$adminOptions.hideHomeCollectionMetadataButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getCollectionMetadataPath(collection.id) }"
|
||||
:aria-label="$i18n.get('label_collection_metadata')">
|
||||
<span
|
||||
|
@ -216,7 +204,6 @@
|
|||
</li>
|
||||
<li v-if="collection.current_user_can_edit_filters && !$adminOptions.hideHomeCollectionFiltersButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getCollectionFiltersPath(collection.id) }"
|
||||
:aria-label="$i18n.get('label_collection_filters')">
|
||||
<span
|
||||
|
@ -233,7 +220,6 @@
|
|||
</li>
|
||||
<li v-if="$userCaps.hasCapability('tnc_rep_read_logs') && !$adminOptions.hideHomeCollectionActivitiesButton">
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="{ path: $routerHelper.getCollectionActivitiesPath(collection.id) }"
|
||||
:aria-label="$i18n.get('label_collection_activities')">
|
||||
<span
|
||||
|
@ -266,12 +252,11 @@
|
|||
</li>
|
||||
</ul>
|
||||
<router-link
|
||||
tag="a"
|
||||
:to="$routerHelper.getCollectionPath(collection.id)"
|
||||
class="card-body">
|
||||
<img
|
||||
:alt="$i18n.get('label_thumbnail')"
|
||||
v-if="collection.thumbnail != undefined"
|
||||
:alt="$i18n.get('label_thumbnail')"
|
||||
:src="$thumbHelper.getSrc(collection['thumbnail'], 'tainacan-medium')">
|
||||
|
||||
<!-- Name -->
|
||||
|
|
|
@ -8,32 +8,31 @@
|
|||
<div class="field select-all is-pulled-left">
|
||||
<span>
|
||||
<b-checkbox
|
||||
@click.native="selectAllCollectionsOnPage()"
|
||||
:native-value="allCollectionsOnPageSelected">
|
||||
:model-value="allCollectionsOnPageSelected"
|
||||
@update:model-value="selectAllCollectionsOnPage()">
|
||||
{{ $i18n.get('label_select_all_collections_page') }}
|
||||
</b-checkbox>
|
||||
</span>
|
||||
</div>
|
||||
<div class="field is-pulled-right">
|
||||
<b-dropdown
|
||||
id="bulk-actions-dropdown"
|
||||
position="is-bottom-left"
|
||||
:disabled="!isSelectingCollections"
|
||||
id="bulk-actions-dropdown"
|
||||
aria-role="list"
|
||||
trap-focus>
|
||||
<button
|
||||
class="button is-white"
|
||||
slot="trigger">
|
||||
<template #trigger>
|
||||
<button class="button is-white">
|
||||
<span>{{ $i18n.get('label_bulk_actions') }}</span>
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||
</span>
|
||||
</button>
|
||||
|
||||
</template>
|
||||
<b-dropdown-item
|
||||
id="item-delete-selected-items"
|
||||
@click="deleteSelectedCollections()"
|
||||
aria-role="listitem">
|
||||
aria-role="listitem"
|
||||
@click="deleteSelectedCollections()">
|
||||
{{ $i18n.get('label_delete_selected_collections') }}
|
||||
</b-dropdown-item>
|
||||
<!-- <b-dropdown-item
|
||||
|
@ -52,37 +51,37 @@
|
|||
|
||||
<!-- Backdrop for escaping context menu -->
|
||||
<div
|
||||
class="context-menu-backdrop"
|
||||
@click.left="clearContextMenu()"
|
||||
@click.right="clearContextMenu()"
|
||||
class="context-menu-backdrop" />
|
||||
@click.right="clearContextMenu()" />
|
||||
|
||||
<b-dropdown
|
||||
inline
|
||||
:style="{ top: cursorPosY + 'px', left: cursorPosX + 'px' }"
|
||||
trap-focus>
|
||||
<b-dropdown-item
|
||||
@click="openCollection()"
|
||||
v-if="!isOnTrash">
|
||||
v-if="!isOnTrash"
|
||||
@click="openCollection()">
|
||||
{{ $i18n.getFrom('collections', 'view_item') }}
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item
|
||||
@click="openCollectionOnNewTab()"
|
||||
v-if="!isOnTrash">
|
||||
v-if="!isOnTrash"
|
||||
@click="openCollectionOnNewTab()">
|
||||
{{ $i18n.get('label_open_collection_new_tab') }}
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item
|
||||
@click="selectCollection()"
|
||||
v-if="contextMenuIndex != null">
|
||||
v-if="contextMenuIndex != null"
|
||||
@click="selectCollection()">
|
||||
{{ !selectedCollections[contextMenuIndex] ? $i18n.get('label_select_collection') : $i18n.get('label_unselect_collection') }}
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item
|
||||
@click="goToCollectionEditPage(contextMenuCollection)"
|
||||
v-if="contextMenuCollection != null && (collections[contextMenuIndex] && collections[contextMenuIndex].current_user_can_edit)">
|
||||
v-if="contextMenuCollection != null && (collections[contextMenuIndex] && collections[contextMenuIndex].current_user_can_edit)"
|
||||
@click="goToCollectionEditPage(contextMenuCollection)">
|
||||
{{ $i18n.getFrom('collections', 'edit_item') }}
|
||||
</b-dropdown-item>
|
||||
<b-dropdown-item
|
||||
@click="deleteOneCollection(contextMenuCollection)"
|
||||
v-if="contextMenuCollection != null && (collections[contextMenuIndex] && collections[contextMenuIndex].current_user_can_delete)">
|
||||
v-if="contextMenuCollection != null && (collections[contextMenuIndex] && collections[contextMenuIndex].current_user_can_delete)"
|
||||
@click="deleteOneCollection(contextMenuCollection)">
|
||||
{{ $i18n.get('label_delete_collection') }}
|
||||
</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
|
@ -101,31 +100,45 @@
|
|||
</th>
|
||||
<!-- Thumbnail -->
|
||||
<th class="thumbnail-cell">
|
||||
<div class="th-wrap">{{ $i18n.get('label_thumbnail') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_thumbnail') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Name -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_name') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_name') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Description -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_description') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_description') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Modification Date -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_modification_date') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_modification_date') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Creation Date -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_creation_date') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_creation_date') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Created By -->
|
||||
<th>
|
||||
<div class="th-wrap">{{ $i18n.get('label_created_by') }}</div>
|
||||
<div class="th-wrap">
|
||||
{{ $i18n.get('label_created_by') }}
|
||||
</div>
|
||||
</th>
|
||||
<!-- Total Items -->
|
||||
<th v-if="!isOnTrash">
|
||||
<div class="th-wrap total-items-header">{{ $i18n.get('label_total_items') }}</div>
|
||||
<div class="th-wrap total-items-header">
|
||||
{{ $i18n.get('label_total_items') }}
|
||||
</div>
|
||||
</th>
|
||||
<th
|
||||
v-if="collections.findIndex((collection) => collection.current_user_can_edit || collection.current_user_can_delete) >= 0"
|
||||
|
@ -137,9 +150,9 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
:class="{ 'selected-row': selectedCollections[index] }"
|
||||
v-for="(collection, index) of collections"
|
||||
:key="index"
|
||||
v-for="(collection, index) of collections">
|
||||
:class="{ 'selected-row': selectedCollections[index] }">
|
||||
<!-- Checking list -->
|
||||
<td
|
||||
v-if="$userCaps.hasCapability('tnc_rep_delete_collections')"
|
||||
|
@ -153,14 +166,14 @@
|
|||
class="status-cell">
|
||||
<span
|
||||
v-if="$statusHelper.hasIcon(collection.status)"
|
||||
class="icon has-text-gray"
|
||||
v-tooltip="{
|
||||
content: $i18n.get('status_' + collection.status),
|
||||
autoHide: true,
|
||||
html: true,
|
||||
popperClass: ['tainacan-tooltip', 'tooltip', 'tainacan-repository-tooltip'],
|
||||
placement: 'auto-start'
|
||||
}">
|
||||
}"
|
||||
class="icon has-text-gray">
|
||||
<i
|
||||
class="tainacan-icon tainacan-icon-1em"
|
||||
:class="$statusHelper.getIcon(collection.status)"
|
||||
|
@ -170,10 +183,10 @@
|
|||
<!-- Thumbnail -->
|
||||
<td
|
||||
class="thumbnail-cell column-default-width"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
||||
:label="$i18n.get('label_thumbnail')"
|
||||
:aria-label="$i18n.get('label_thumbnail')">
|
||||
:aria-label="$i18n.get('label_thumbnail')"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)">
|
||||
<span>
|
||||
<img
|
||||
:alt="$i18n.get('label_thumbnail')"
|
||||
|
@ -184,10 +197,10 @@
|
|||
<!-- Name -->
|
||||
<td
|
||||
class="column-default-width column-main-content"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
||||
:label="$i18n.get('label_name')"
|
||||
:aria-label="$i18n.get('label_name') + ': ' + collection.name">
|
||||
:aria-label="$i18n.get('label_name') + ': ' + collection.name"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
@ -205,10 +218,10 @@
|
|||
<!-- Description -->
|
||||
<td
|
||||
class="column-large-width"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
||||
:label="$i18n.get('label_description')"
|
||||
:aria-label="$i18n.get('label_description') + ': ' + (collection.description != undefined && collection.description != '') ? collection.description : `<span class='has-text-gray is-italic'>` + $i18n.get('label_description_not_provided') + `</span>`">
|
||||
:aria-label="$i18n.get('label_description') + ': ' + (collection.description != undefined && collection.description != '') ? collection.description : `<span class='has-text-gray is-italic'>` + $i18n.get('label_description_not_provided') + `</span>`"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
@ -225,11 +238,11 @@
|
|||
</td>
|
||||
<!-- Modification Date -->
|
||||
<td
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
||||
class="table-modification column-default-width"
|
||||
:label="$i18n.get('label_modification_date')"
|
||||
:aria-label="$i18n.get('label_modification_date') + ': ' + collection.modification_date">
|
||||
:aria-label="$i18n.get('label_modification_date') + ': ' + collection.modification_date"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
@ -246,11 +259,11 @@
|
|||
</td>
|
||||
<!-- Creation Date -->
|
||||
<td
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
||||
class="table-creation column-default-width"
|
||||
:label="$i18n.get('label_creation_date')"
|
||||
:aria-label="$i18n.get('label_creation_date') + ': ' + collection.creation_date">
|
||||
:aria-label="$i18n.get('label_creation_date') + ': ' + collection.creation_date"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
@ -267,11 +280,11 @@
|
|||
</td>
|
||||
<!-- Created by -->
|
||||
<td
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
||||
class="table-creation column-default-width"
|
||||
:label="$i18n.get('label_created_by')"
|
||||
:aria-label="$i18n.get('label_created_by') + ': ' + collection.author_name">
|
||||
:aria-label="$i18n.get('label_created_by') + ': ' + collection.author_name"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
@ -288,12 +301,12 @@
|
|||
</td>
|
||||
<!-- Total items -->
|
||||
<td
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
||||
v-if="collection.total_items != undefined"
|
||||
class="column-small-width column-align-right"
|
||||
:label="$i18n.get('label_total_items')"
|
||||
v-if="collection.total_items != undefined"
|
||||
:aria-label="$i18n.get('label_total_items') + ': ' + getTotalItems(collection.total_items)">
|
||||
:aria-label="$i18n.get('label_total_items') + ': ' + getTotalItems(collection.total_items)"
|
||||
@click.left="onClickCollection($event, collection.id, index)"
|
||||
@click.right="onRightClickCollection($event, collection.id, index)">
|
||||
<p
|
||||
v-tooltip="{
|
||||
delay: {
|
||||
|
@ -311,14 +324,14 @@
|
|||
<!-- Actions -->
|
||||
<td
|
||||
v-if="collection.current_user_can_edit || collection.current_user_can_delete"
|
||||
@click="onClickCollection($event, collection.id, index)"
|
||||
class="column-default-width"
|
||||
:class="{ 'actions-cell': collection.current_user_can_edit || collection.current_user_can_delete }"
|
||||
:label="$i18n.get('label_actions')">
|
||||
:label="$i18n.get('label_actions')"
|
||||
@click="onClickCollection($event, collection.id, index)">
|
||||
<div class="actions-container">
|
||||
<a
|
||||
id="button-edit"
|
||||
v-if="collection.current_user_can_edit"
|
||||
id="button-edit"
|
||||
:aria-label="$i18n.getFrom('collections','edit_item')"
|
||||
@click.prevent.stop="goToCollectionEditPage(collection.id)">
|
||||
<span
|
||||
|
@ -334,8 +347,8 @@
|
|||
</span>
|
||||
</a>
|
||||
<a
|
||||
id="button-delete"
|
||||
v-if="collection.current_user_can_delete"
|
||||
id="button-delete"
|
||||
:aria-label="$i18n.get('label_button_delete')"
|
||||
@click.prevent.stop="deleteOneCollection(collection.id)">
|
||||
<span
|
||||
|
@ -354,9 +367,9 @@
|
|||
<a
|
||||
id="button-open-external"
|
||||
:aria-label="$i18n.getFrom('collections','view_item')"
|
||||
@click.stop=""
|
||||
target="_blank"
|
||||
:href="collection.url">
|
||||
:href="collection.url"
|
||||
@click.stop="">
|
||||
<span
|
||||
v-tooltip="{
|
||||
content: $i18n.get('label_view_collection_on_website'),
|
||||
|
@ -412,12 +425,16 @@ export default {
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
collections() {
|
||||
collections: {
|
||||
handler() {
|
||||
this.selectedCollections = [];
|
||||
for (let i = 0; i < this.collections.length; i++)
|
||||
this.selectedCollections.push(false);
|
||||
},
|
||||
selectedCollections() {
|
||||
deep: true
|
||||
},
|
||||
selectedCollections: {
|
||||
handler() {
|
||||
let allSelected = true;
|
||||
let isSelecting = false;
|
||||
for (let i = 0; i < this.selectedCollections.length; i++) {
|
||||
|
@ -429,6 +446,8 @@ export default {
|
|||
}
|
||||
this.allCollectionsOnPageSelected = allSelected;
|
||||
this.isSelectingCollections = isSelecting;
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -539,17 +558,16 @@ export default {
|
|||
this.clearContextMenu();
|
||||
},
|
||||
selectCollection() {
|
||||
if (this.contextMenuIndex != null) {
|
||||
this.$set(this.selectedCollections, this.contextMenuIndex, !this.selectedCollections[this.contextMenuIndex]);
|
||||
}
|
||||
if (this.contextMenuIndex != null)
|
||||
Object.assign( this.selectedCollections, { [this.contextMenuIndex]: !this.selectedCollections[this.contextMenuIndex] });
|
||||
|
||||
this.clearContextMenu();
|
||||
},
|
||||
onClickCollection($event, collectionId, index) {
|
||||
if ($event.ctrlKey) {
|
||||
this.$set(this.selectedCollections, index, !this.selectedCollections[index]);
|
||||
} else {
|
||||
if ($event.ctrlKey)
|
||||
Object.assign( this.selectedCollections, { [index]: !this.selectedCollections[index] });
|
||||
else
|
||||
this.$router.push(this.$routerHelper.getCollectionPath(collectionId));
|
||||
}
|
||||
},
|
||||
goToCollectionEditPage(collectionId) {
|
||||
this.$router.push(this.$routerHelper.getCollectionEditPath(collectionId));
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,22 +1,24 @@
|
|||
<template>
|
||||
<div class="metadata-mappers-area">
|
||||
<b-loading
|
||||
v-model="isLoadingMetadatumMappers"
|
||||
:can-cancel="false"
|
||||
:is-full-page="false"
|
||||
:active.sync="isLoadingMetadatumMappers"/>
|
||||
:is-full-page="false" />
|
||||
<b-loading
|
||||
v-model="isLoadingMetadata"
|
||||
:can-cancel="false"
|
||||
:is-full-page="false"
|
||||
:active.sync="isLoadingMetadata"/>
|
||||
:is-full-page="false" />
|
||||
|
||||
<b-field>
|
||||
<p style="line-height: 2em;">{{ $i18n.get('info_metadata_mapper_helper') }}</p>
|
||||
<p style="line-height: 2em;">
|
||||
{{ $i18n.get('info_metadata_mapper_helper') }}
|
||||
</p>
|
||||
<b-select
|
||||
id="mappers-options-dropdown"
|
||||
size="is-small"
|
||||
:placeholder="$i18n.get('instruction_select_a_mapper')"
|
||||
:value="mapper"
|
||||
@input="onSelectMetadataMapper($event)">
|
||||
:model-value="mapper"
|
||||
@update:model-value="onSelectMetadataMapper($event)">
|
||||
<option
|
||||
v-for="metadatumMapper in metadatumMappers"
|
||||
:key="metadatumMapper.slug"
|
||||
|
@ -42,8 +44,8 @@
|
|||
|
||||
<!-- Mapping list -->
|
||||
<form
|
||||
class="tainacan-form"
|
||||
v-else>
|
||||
v-else
|
||||
class="tainacan-form">
|
||||
|
||||
<div class="mapping-control">
|
||||
<div
|
||||
|
@ -61,8 +63,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="mapping-header"
|
||||
v-if="mapperMetadata.length > 0">
|
||||
v-if="mapperMetadata.length > 0"
|
||||
class="mapping-header">
|
||||
<p>{{ $i18n.get('label_from_source_mapper') }}</p>
|
||||
<hr>
|
||||
<span class="icon">
|
||||
|
@ -78,9 +80,9 @@
|
|||
class="source-metadatum">
|
||||
|
||||
<b-select
|
||||
:name="'mappers-metadatum-select-' + mapperMetadatum.slug"
|
||||
v-model="mapperMetadatum.selected"
|
||||
@input="onSelectMetadatumForMapperMetadata">
|
||||
:name="'mappers-metadatum-select-' + mapperMetadatum.slug"
|
||||
@update:model-value="onSelectMetadatumForMapperMetadata">
|
||||
<option
|
||||
value="">
|
||||
{{ $i18n.get('instruction_select_a_metadatum') }}
|
||||
|
@ -144,22 +146,22 @@
|
|||
</div>
|
||||
<div class="control">
|
||||
<button
|
||||
@click.prevent="onUpdateMetadataMapperMetadataClick"
|
||||
:class="{ 'is-loading': isMapperMetadataLoading }"
|
||||
class="button is-success">{{ $i18n.get('save') }}</button>
|
||||
class="button is-success"
|
||||
@click.prevent="onUpdateMetadataMapperMetadataClick">{{ $i18n.get('save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<b-modal
|
||||
@close="onCancelNewMetadataMapperMetadata"
|
||||
:active.sync="isMapperMetadataCreating"
|
||||
v-model="isMapperMetadataCreating"
|
||||
trap-focus
|
||||
aria-modal
|
||||
aria-role="dialog"
|
||||
custom-class="tainacan-modal"
|
||||
:close-button-aria-label="$i18n.get('close')">
|
||||
:close-button-aria-label="$i18n.get('close')"
|
||||
@close="onCancelNewMetadataMapperMetadata">
|
||||
<div
|
||||
autofocus
|
||||
role="dialog"
|
||||
|
@ -178,10 +180,10 @@
|
|||
</b-field>
|
||||
<b-field>
|
||||
<b-input
|
||||
v-model="newMetadataUri"
|
||||
placeholder="URI"
|
||||
type="url"
|
||||
required
|
||||
v-model="newMetadataUri"/>
|
||||
required />
|
||||
</b-field>
|
||||
<div class="field is-grouped form-submit">
|
||||
<div class="control">
|
||||
|
@ -193,9 +195,9 @@
|
|||
<div class="control">
|
||||
<button
|
||||
:class="{ 'is-loading': isMapperMetadataLoading, 'is-success': !isMapperMetadataLoading }"
|
||||
@click.prevent="onSaveNewMetadataMapperMetadata"
|
||||
:disabled="isNewMetadataMapperMetadataDisabled || isMapperMetadataLoading"
|
||||
class="button">{{ $i18n.get('save') }}
|
||||
class="button"
|
||||
@click.prevent="onSaveNewMetadataMapperMetadata">{{ $i18n.get('save') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -228,14 +230,12 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
metadatumMappers() {
|
||||
return this.getMetadatumMappers();
|
||||
},
|
||||
...mapGetters('metadata', {
|
||||
'metadatumMappers': 'getMetadatumMappers',
|
||||
'activeMetadatumList': 'getMetadata'
|
||||
}),
|
||||
isNewMetadataMapperMetadataDisabled() {
|
||||
return !this.newMetadataLabel || !this.newMetadataUri;
|
||||
},
|
||||
activeMetadatumList() {
|
||||
return this.getMetadata();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -275,10 +275,6 @@ export default {
|
|||
'fetchMetadatumMappers',
|
||||
'updateMetadataMapperMetadata',
|
||||
]),
|
||||
...mapGetters('metadata',[
|
||||
'getMetadatumMappers',
|
||||
'getMetadata'
|
||||
]),
|
||||
loadMetadataMappers() {
|
||||
this.isLoadingMetadatumMappers = true;
|
||||
this.fetchMetadatumMappers()
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue