Merge branch 'release/0.21.0'
This commit is contained in:
commit
c991d648c6
3
.babelrc
3
.babelrc
|
@ -6,5 +6,6 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"@babel/react"
|
"@babel/react"
|
||||||
]
|
],
|
||||||
|
"plugins": ["@babel/plugin-syntax-dynamic-import"]
|
||||||
}
|
}
|
29
.eslintrc.js
29
.eslintrc.js
|
@ -2,29 +2,32 @@ module.exports = {
|
||||||
extends: [
|
extends: [
|
||||||
// add more generic rulesets here, such as:
|
// add more generic rulesets here, such as:
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:vue/recommended'
|
'plugin:vue/vue3-recommended'
|
||||||
],
|
],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
'ecmaVersion': 2018
|
'ecmaVersion': 2020
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
// override/add rules settings here, such as:
|
/* Override/add rules settings here, such as: */
|
||||||
'vue/no-unused-vars': 'error',
|
// Basic rules that we want to receive a warning instead of error
|
||||||
'no-console': 'warn',
|
'no-console': 'warn',
|
||||||
'no-unused-vars': 'warn',
|
'no-unused-vars': 'warn',
|
||||||
'no-undef': '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/no-v-html': 'off',
|
||||||
'vue/html-indent': 'off',
|
'vue/no-v-text-v-html-on-component': 'off',
|
||||||
'vue/attributes-order': '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-closing-bracket-spacing': 'off',
|
'vue/html-indent': [
|
||||||
|
'warn', 4, {
|
||||||
|
'attribute': 2,
|
||||||
|
'closeBracket': 1
|
||||||
|
}
|
||||||
|
],
|
||||||
'vue/html-closing-bracket-newline': 'off',
|
'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/require-prop-type-constructor': 'off',
|
||||||
'vue/singleline-html-element-content-newline': 'off',
|
'vue/require-default-prop': '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'
|
|
||||||
},
|
},
|
||||||
globals: {
|
globals: {
|
||||||
'wp': true,
|
'wp': true,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# to run localy ./bin/act -j test
|
||||||
name: Tainacan tests
|
name: Tainacan tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
@ -23,7 +24,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
# Notes regarding supported versions in WP:
|
# Notes regarding supported versions in WP:
|
||||||
# The base matrix only contains the PHP versions which are supported on all supported WP versions.
|
# 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']
|
wp: ['latest', '5.9']
|
||||||
experimental: [false]
|
experimental: [false]
|
||||||
|
|
||||||
|
@ -50,7 +51,7 @@ jobs:
|
||||||
# in combination with PHP < 7.4 is not properly/sufficiently supported
|
# in combination with PHP < 7.4 is not properly/sufficiently supported
|
||||||
# within WP Core.
|
# within WP Core.
|
||||||
# See: https://core.trac.wordpress.org/ticket/52496
|
# 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:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
ports:
|
ports:
|
||||||
|
@ -72,6 +73,9 @@ jobs:
|
||||||
- name: Check PHP Version
|
- name: Check PHP Version
|
||||||
run: php -v
|
run: php -v
|
||||||
|
|
||||||
|
- name: install tools deps
|
||||||
|
run: sudo apt install mariadb-client -y
|
||||||
|
|
||||||
- name: Add bootstrap-config
|
- name: Add bootstrap-config
|
||||||
run: |
|
run: |
|
||||||
mv ./tests/bootstrap-config-sample.php ./tests/bootstrap-config.php
|
mv ./tests/bootstrap-config-sample.php ./tests/bootstrap-config.php
|
||||||
|
@ -90,29 +94,18 @@ jobs:
|
||||||
- name: Determine supported PHPUnit version
|
- name: Determine supported PHPUnit version
|
||||||
id: set_phpunit
|
id: set_phpunit
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.php }}" = "8.0" ]]; then
|
if [[ "${{ matrix.php }}" > "8.0" ]]; then
|
||||||
wget https://phar.phpunit.de/phpunit-9.3.0.phar -P /tmp
|
wget https://phar.phpunit.de/phpunit-9.6.16.phar -P /tmp
|
||||||
chmod +x /tmp/phpunit-9.3.0.phar
|
chmod +x /tmp/phpunit-9.6.16.phar
|
||||||
mv /tmp/phpunit-9.3.0.phar /usr/local/bin/phpunit
|
mv /tmp/phpunit-9.6.16.phar /usr/local/bin/phpunit
|
||||||
elif [[ "${{ matrix.php }}" > "6.0" ]]; then
|
else
|
||||||
wget https://phar.phpunit.de/phpunit-6.5.7.phar -P /tmp
|
wget https://phar.phpunit.de/phpunit-6.5.7.phar -P /tmp
|
||||||
chmod +x /tmp/phpunit-6.5.7.phar
|
chmod +x /tmp/phpunit-6.5.7.phar
|
||||||
mv /tmp/phpunit-6.5.7.phar /usr/local/bin/phpunit
|
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
|
fi
|
||||||
|
|
||||||
# Install dependencies and handle caching in one go.
|
# Install dependencies and handle caching in one go.
|
||||||
# @link https://github.com/marketplace/actions/install-composer-dependencies
|
# @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
|
- name: Install Composer dependencies for PHP < 8.0
|
||||||
if: ${{ matrix.php >= 7.3 && matrix.php < 8.0 }}
|
if: ${{ matrix.php >= 7.3 && matrix.php < 8.0 }}
|
||||||
uses: "ramsey/composer-install@v1"
|
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.
|
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
|
### 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"
|
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"apexcharts": "^3.40.0",
|
"@ntohq/buefy-next": "^0.1.3",
|
||||||
"axios": "^1.4.0",
|
"@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",
|
"blurhash": "^2.0.5",
|
||||||
"buefy": "^0.9.23",
|
|
||||||
"bulma": "^0.9.4",
|
"bulma": "^0.9.4",
|
||||||
"conditioner-core": "^2.3.3",
|
"conditioner-core": "^2.3.3",
|
||||||
"countup.js": "^2.6.2",
|
"countup.js": "^2.8.0",
|
||||||
"css-vars-ponyfill": "^2.4.8",
|
"css-vars-ponyfill": "^2.4.9",
|
||||||
"floating-vue": "^1.0.0-beta.19",
|
"floating-vue": "5.2.2",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"leaflet-active-area": "^1.2.1",
|
"leaflet-active-area": "^1.2.1",
|
||||||
"masonry-layout": "^4.2.2",
|
"masonry-layout": "^4.2.2",
|
||||||
"moment": "^2.29.4",
|
"mitt": "^3.0.1",
|
||||||
"node-sass": "^7.0.3",
|
"moment": "^2.30.1",
|
||||||
"photoswipe": "^5.3.7",
|
"node-sass": "^8.0.0",
|
||||||
"qs": "^6.11.2",
|
"photoswipe": "^5.4.3",
|
||||||
"react": "^17.0.2",
|
"qs": "^6.12.0",
|
||||||
"react-dom": "^17.0.2",
|
"react": "^18.2.0",
|
||||||
"swiper": "^8.4.7",
|
"react-dom": "^18.2.0",
|
||||||
"vue": "^2.6.14",
|
"sortablejs": "^1.15.2",
|
||||||
"vue-apexcharts": "^1.6.2",
|
"sortablejs-vue3": "^1.2.11",
|
||||||
"vue-blurhash": "^0.1.4",
|
"swiper": "^11.1.0",
|
||||||
"vue-countup-v2": "^4.0.0",
|
"vue": "^3.4.21",
|
||||||
"vue-imask": "^7.1.3",
|
"vue-countup-v3": "^1.4.1",
|
||||||
"vue-router": "^3.6.5",
|
"vue-imask": "^7.5.0",
|
||||||
"vue-the-mask": "^0.11.1",
|
"vue-router": "^4.3.0",
|
||||||
"vue2-leaflet": "^2.7.1",
|
"vue3-apexcharts": "^1.5.2",
|
||||||
"vuedraggable": "^2.24.3",
|
"vuex": "^4.1.0"
|
||||||
"vuex": "^3.6.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.21.0",
|
"@babel/core": "^7.24.3",
|
||||||
"@babel/preset-env": "^7.20.2",
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||||
"@babel/preset-react": "^7.18.6",
|
"@babel/preset-env": "^7.24.3",
|
||||||
"@types/leaflet": "^1.9.1",
|
"@babel/preset-react": "^7.24.1",
|
||||||
"@types/masonry-layout": "^4.2.5",
|
"@types/leaflet": "^1.9.8",
|
||||||
"acorn": "^8.8.2",
|
"@types/masonry-layout": "^4.2.7",
|
||||||
"ajv": "^7.2.4",
|
"@vue/compiler-sfc": "3.4.21",
|
||||||
"autoprefixer": "^10.4.14",
|
"acorn": "^8.11.3",
|
||||||
|
"ajv": "^8.12.0",
|
||||||
|
"autoprefixer": "^10.4.19",
|
||||||
"babel-loader": "^9.1.3",
|
"babel-loader": "^9.1.3",
|
||||||
"circular-dependency-plugin": "5.2.2",
|
"circular-dependency-plugin": "5.2.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"css-loader": "^6.7.3",
|
"css-loader": "^6.10.0",
|
||||||
"eslint": "^8.35.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-plugin-vue": "^9.9.0",
|
"eslint-plugin-vue": "^9.24.0",
|
||||||
"eslint-webpack-plugin": "^4.0.0",
|
"eslint-webpack-plugin": "^4.1.0",
|
||||||
"file-loader": "^6.2.0",
|
"file-loader": "^6.2.0",
|
||||||
"moment-locales-webpack-plugin": "^1.2.0",
|
"moment-locales-webpack-plugin": "^1.2.0",
|
||||||
"postcss-loader": "7.0.2",
|
"postcss-loader": "8.1.1",
|
||||||
"sass-loader": "^13.2.0",
|
"sass-loader": "^13.3.2",
|
||||||
"style-loader": "^3.3.1",
|
"style-loader": "^3.3.4",
|
||||||
"terser-webpack-plugin": "5.3.7",
|
"terser-webpack-plugin": "5.3.10",
|
||||||
"vue-loader": "^15.10.1",
|
"vue-loader": "^17.4.2",
|
||||||
"vue-template-compiler": "^2.6.14",
|
"webpack": "^5.91.0",
|
||||||
"webpack": "^5.76.0",
|
"webpack-bundle-analyzer": "^4.10.1",
|
||||||
"webpack-bundle-analyzer": "^4.8.0",
|
"webpack-cli": "^5.1.4",
|
||||||
"webpack-cli": "^5.0.1",
|
"webpack-dev-server": "^4.15.1",
|
||||||
"webpack-dev-server": "^4.11.1",
|
"webpack-merge": "^5.10.0"
|
||||||
"webpack-merge": "^5.8.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/**
|
/**
|
||||||
* Swiper 8.4.7
|
* Swiper 11.1.1
|
||||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||||
* https://swiperjs.com
|
* https://swiperjs.com
|
||||||
*
|
*
|
||||||
* Copyright 2014-2023 Vladimir Kharlampidi
|
* Copyright 2014-2024 Vladimir Kharlampidi
|
||||||
*
|
*
|
||||||
* Released under the MIT License
|
* Released under the MIT License
|
||||||
*
|
*
|
||||||
* Released on: January 30, 2023
|
* Released on: April 9, 2024
|
||||||
*/
|
*/
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'swiper-icons';
|
font-family: 'swiper-icons';
|
||||||
|
@ -15,7 +15,18 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal; }
|
font-style: normal; }
|
||||||
:root {
|
: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 {
|
.swiper {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
@ -24,7 +35,8 @@
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
/* Fix of Webkit flickering */
|
/* Fix of Webkit flickering */
|
||||||
z-index: 1; }
|
z-index: 1;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
.swiper-vertical > .swiper-wrapper {
|
.swiper-vertical > .swiper-wrapper {
|
||||||
flex-direction: column; }
|
flex-direction: column; }
|
||||||
|
@ -36,15 +48,18 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
transition-property: transform;
|
transition-property: transform;
|
||||||
|
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
||||||
box-sizing: content-box; }
|
box-sizing: content-box; }
|
||||||
|
|
||||||
.swiper-android .swiper-slide,
|
.swiper-android .swiper-slide,
|
||||||
|
.swiper-ios .swiper-slide,
|
||||||
.swiper-wrapper {
|
.swiper-wrapper {
|
||||||
transform: translate3d(0px, 0, 0); }
|
transform: translate3d(0px, 0, 0); }
|
||||||
|
|
||||||
.swiper-pointer-events {
|
.swiper-horizontal {
|
||||||
touch-action: pan-y; }
|
touch-action: pan-y; }
|
||||||
.swiper-pointer-events.swiper-vertical {
|
|
||||||
|
.swiper-vertical {
|
||||||
touch-action: pan-x; }
|
touch-action: pan-x; }
|
||||||
|
|
||||||
.swiper-slide {
|
.swiper-slide {
|
||||||
|
@ -52,7 +67,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition-property: transform; }
|
transition-property: transform;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
.swiper-slide-invisible-blank {
|
.swiper-slide-invisible-blank {
|
||||||
visibility: hidden; }
|
visibility: hidden; }
|
||||||
|
@ -61,6 +77,7 @@
|
||||||
.swiper-autoheight,
|
.swiper-autoheight,
|
||||||
.swiper-autoheight .swiper-slide {
|
.swiper-autoheight .swiper-slide {
|
||||||
height: auto; }
|
height: auto; }
|
||||||
|
|
||||||
.swiper-autoheight .swiper-wrapper {
|
.swiper-autoheight .swiper-wrapper {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
transition-property: transform, height; }
|
transition-property: transform, height; }
|
||||||
|
@ -70,17 +87,64 @@
|
||||||
backface-visibility: hidden; }
|
backface-visibility: hidden; }
|
||||||
|
|
||||||
/* 3D Effects */
|
/* 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; }
|
perspective: 1200px; }
|
||||||
.swiper-3d .swiper-wrapper,
|
|
||||||
.swiper-3d .swiper-slide,
|
.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,
|
||||||
.swiper-3d .swiper-slide-shadow-left,
|
.swiper-3d .swiper-slide-shadow-left,
|
||||||
.swiper-3d .swiper-slide-shadow-right,
|
.swiper-3d .swiper-slide-shadow-right,
|
||||||
.swiper-3d .swiper-slide-shadow-top,
|
.swiper-3d .swiper-slide-shadow-top,
|
||||||
.swiper-3d .swiper-slide-shadow-bottom,
|
.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,
|
||||||
.swiper-3d .swiper-slide-shadow-left,
|
.swiper-3d .swiper-slide-shadow-left,
|
||||||
.swiper-3d .swiper-slide-shadow-right,
|
.swiper-3d .swiper-slide-shadow-right,
|
||||||
|
@ -104,50 +168,47 @@
|
||||||
.swiper-3d .swiper-slide-shadow-bottom {
|
.swiper-3d .swiper-slide-shadow-bottom {
|
||||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
||||||
|
|
||||||
/* CSS Mode */
|
.swiper-lazy-preloader {
|
||||||
.swiper-css-mode > .swiper-wrapper {
|
width: 42px;
|
||||||
overflow: auto;
|
height: 42px;
|
||||||
scrollbar-width: none;
|
position: absolute;
|
||||||
/* For Firefox */
|
left: 50%;
|
||||||
-ms-overflow-style: none;
|
top: 50%;
|
||||||
/* For Internet Explorer and Edge */ }
|
margin-left: -21px;
|
||||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
margin-top: -21px;
|
||||||
display: none; }
|
z-index: 10;
|
||||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
transform-origin: 50%;
|
||||||
scroll-snap-align: start start; }
|
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 {
|
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
|
||||||
scroll-snap-type: x mandatory; }
|
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
|
||||||
|
animation: swiper-preloader-spin 1s infinite linear; }
|
||||||
|
|
||||||
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
.swiper-lazy-preloader-white {
|
||||||
scroll-snap-type: y mandatory; }
|
--swiper-preloader-color: #fff; }
|
||||||
|
|
||||||
.swiper-centered > .swiper-wrapper::before {
|
.swiper-lazy-preloader-black {
|
||||||
content: '';
|
--swiper-preloader-color: #000; }
|
||||||
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; }
|
|
||||||
|
|
||||||
|
@keyframes swiper-preloader-spin {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg); } }
|
||||||
|
/* Slide styles end */
|
||||||
:root {
|
:root {
|
||||||
--swiper-navigation-size: 44px;
|
--swiper-navigation-size: 44px;
|
||||||
/*
|
/*
|
||||||
|
--swiper-navigation-top-offset: 50%;
|
||||||
|
--swiper-navigation-sides-offset: 10px;
|
||||||
--swiper-navigation-color: var(--swiper-theme-color);
|
--swiper-navigation-color: var(--swiper-theme-color);
|
||||||
*/ }
|
*/ }
|
||||||
.swiper-button-prev, .swiper-button-next {
|
.swiper-button-prev, .swiper-button-next {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: var(--swiper-navigation-top-offset, 50%);
|
||||||
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
||||||
height: var(--swiper-navigation-size);
|
height: var(--swiper-navigation-size);
|
||||||
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
||||||
|
@ -170,7 +231,30 @@
|
||||||
.swiper-navigation-disabled .swiper-button-prev,
|
.swiper-navigation-disabled .swiper-button-prev,
|
||||||
.swiper-navigation-disabled .swiper-button-next {
|
.swiper-navigation-disabled .swiper-button-next {
|
||||||
display: none !important; }
|
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-family: swiper-icons;
|
||||||
font-size: var(--swiper-navigation-size);
|
font-size: var(--swiper-navigation-size);
|
||||||
text-transform: none !important;
|
text-transform: none !important;
|
||||||
|
@ -178,25 +262,19 @@
|
||||||
font-variant: initial;
|
font-variant: initial;
|
||||||
line-height: 1; }
|
line-height: 1; }
|
||||||
|
|
||||||
.swiper-button-prev,
|
|
||||||
.swiper-rtl .swiper-button-next {
|
|
||||||
left: 10px;
|
|
||||||
right: auto; }
|
|
||||||
.swiper-button-prev:after,
|
.swiper-button-prev:after,
|
||||||
.swiper-rtl .swiper-button-next:after {
|
.swiper-rtl .swiper-button-next:after {
|
||||||
content: 'prev'; }
|
content: 'prev'; }
|
||||||
|
|
||||||
.swiper-button-next,
|
.swiper-button-next,
|
||||||
.swiper-rtl .swiper-button-prev {
|
.swiper-rtl .swiper-button-prev {
|
||||||
right: 10px;
|
right: var(--swiper-navigation-sides-offset, 10px);
|
||||||
left: auto; }
|
left: auto; }
|
||||||
.swiper-button-next:after,
|
.swiper-button-next:after,
|
||||||
.swiper-rtl .swiper-button-prev:after {
|
.swiper-rtl .swiper-button-prev:after {
|
||||||
content: 'next'; }
|
content: 'next'; }
|
||||||
|
|
||||||
.swiper-button-lock {
|
/* Navigation font end */
|
||||||
display: none; }
|
|
||||||
|
|
||||||
/* a11y */
|
/* a11y */
|
||||||
.swiper .swiper-notification {
|
.swiper .swiper-notification {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -339,7 +417,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
word-break: break-word; }
|
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%;
|
width: 100%;
|
||||||
height: auto; }
|
height: auto; }
|
||||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper a,
|
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper a,
|
||||||
|
@ -347,7 +426,8 @@
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block; }
|
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; }
|
display: initial !important; }
|
||||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid a {
|
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -370,17 +450,17 @@
|
||||||
-ms-grid-row: 1;
|
-ms-grid-row: 1;
|
||||||
-ms-grid-row-span: 2;
|
-ms-grid-row-span: 2;
|
||||||
grid-column: 1/3;
|
grid-column: 1/3;
|
||||||
grid-row: 1/3;
|
grid-row: 1/3; }
|
||||||
padding-bottom: 100% !important; }
|
|
||||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid .collection-items-grid > * {
|
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid .collection-items-grid > * {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin-bottom: 0px;
|
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,
|
||||||
.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-fit: cover;
|
||||||
object-position: center; }
|
object-position: center;
|
||||||
|
width: 100%; }
|
||||||
.wp-block-tainacan-carousel-collections-list .preview-warning {
|
.wp-block-tainacan-carousel-collections-list .preview-warning {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
|
@ -488,7 +568,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
word-break: break-word; }
|
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;
|
height: auto;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-bottom: 0.5em;
|
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
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||||
* https://swiperjs.com
|
* https://swiperjs.com
|
||||||
*
|
*
|
||||||
* Copyright 2014-2023 Vladimir Kharlampidi
|
* Copyright 2014-2024 Vladimir Kharlampidi
|
||||||
*
|
*
|
||||||
* Released under the MIT License
|
* Released under the MIT License
|
||||||
*
|
*
|
||||||
* Released on: January 30, 2023
|
* Released on: April 9, 2024
|
||||||
*/
|
*/
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'swiper-icons';
|
font-family: 'swiper-icons';
|
||||||
|
@ -15,7 +15,18 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal; }
|
font-style: normal; }
|
||||||
:root {
|
: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 {
|
.swiper {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
@ -24,7 +35,8 @@
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
/* Fix of Webkit flickering */
|
/* Fix of Webkit flickering */
|
||||||
z-index: 1; }
|
z-index: 1;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
.swiper-vertical > .swiper-wrapper {
|
.swiper-vertical > .swiper-wrapper {
|
||||||
flex-direction: column; }
|
flex-direction: column; }
|
||||||
|
@ -36,15 +48,18 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
transition-property: transform;
|
transition-property: transform;
|
||||||
|
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
||||||
box-sizing: content-box; }
|
box-sizing: content-box; }
|
||||||
|
|
||||||
.swiper-android .swiper-slide,
|
.swiper-android .swiper-slide,
|
||||||
|
.swiper-ios .swiper-slide,
|
||||||
.swiper-wrapper {
|
.swiper-wrapper {
|
||||||
transform: translate3d(0px, 0, 0); }
|
transform: translate3d(0px, 0, 0); }
|
||||||
|
|
||||||
.swiper-pointer-events {
|
.swiper-horizontal {
|
||||||
touch-action: pan-y; }
|
touch-action: pan-y; }
|
||||||
.swiper-pointer-events.swiper-vertical {
|
|
||||||
|
.swiper-vertical {
|
||||||
touch-action: pan-x; }
|
touch-action: pan-x; }
|
||||||
|
|
||||||
.swiper-slide {
|
.swiper-slide {
|
||||||
|
@ -52,7 +67,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition-property: transform; }
|
transition-property: transform;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
.swiper-slide-invisible-blank {
|
.swiper-slide-invisible-blank {
|
||||||
visibility: hidden; }
|
visibility: hidden; }
|
||||||
|
@ -61,6 +77,7 @@
|
||||||
.swiper-autoheight,
|
.swiper-autoheight,
|
||||||
.swiper-autoheight .swiper-slide {
|
.swiper-autoheight .swiper-slide {
|
||||||
height: auto; }
|
height: auto; }
|
||||||
|
|
||||||
.swiper-autoheight .swiper-wrapper {
|
.swiper-autoheight .swiper-wrapper {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
transition-property: transform, height; }
|
transition-property: transform, height; }
|
||||||
|
@ -70,17 +87,64 @@
|
||||||
backface-visibility: hidden; }
|
backface-visibility: hidden; }
|
||||||
|
|
||||||
/* 3D Effects */
|
/* 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; }
|
perspective: 1200px; }
|
||||||
.swiper-3d .swiper-wrapper,
|
|
||||||
.swiper-3d .swiper-slide,
|
.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,
|
||||||
.swiper-3d .swiper-slide-shadow-left,
|
.swiper-3d .swiper-slide-shadow-left,
|
||||||
.swiper-3d .swiper-slide-shadow-right,
|
.swiper-3d .swiper-slide-shadow-right,
|
||||||
.swiper-3d .swiper-slide-shadow-top,
|
.swiper-3d .swiper-slide-shadow-top,
|
||||||
.swiper-3d .swiper-slide-shadow-bottom,
|
.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,
|
||||||
.swiper-3d .swiper-slide-shadow-left,
|
.swiper-3d .swiper-slide-shadow-left,
|
||||||
.swiper-3d .swiper-slide-shadow-right,
|
.swiper-3d .swiper-slide-shadow-right,
|
||||||
|
@ -104,50 +168,47 @@
|
||||||
.swiper-3d .swiper-slide-shadow-bottom {
|
.swiper-3d .swiper-slide-shadow-bottom {
|
||||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
||||||
|
|
||||||
/* CSS Mode */
|
.swiper-lazy-preloader {
|
||||||
.swiper-css-mode > .swiper-wrapper {
|
width: 42px;
|
||||||
overflow: auto;
|
height: 42px;
|
||||||
scrollbar-width: none;
|
position: absolute;
|
||||||
/* For Firefox */
|
left: 50%;
|
||||||
-ms-overflow-style: none;
|
top: 50%;
|
||||||
/* For Internet Explorer and Edge */ }
|
margin-left: -21px;
|
||||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
margin-top: -21px;
|
||||||
display: none; }
|
z-index: 10;
|
||||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
transform-origin: 50%;
|
||||||
scroll-snap-align: start start; }
|
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 {
|
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
|
||||||
scroll-snap-type: x mandatory; }
|
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
|
||||||
|
animation: swiper-preloader-spin 1s infinite linear; }
|
||||||
|
|
||||||
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
.swiper-lazy-preloader-white {
|
||||||
scroll-snap-type: y mandatory; }
|
--swiper-preloader-color: #fff; }
|
||||||
|
|
||||||
.swiper-centered > .swiper-wrapper::before {
|
.swiper-lazy-preloader-black {
|
||||||
content: '';
|
--swiper-preloader-color: #000; }
|
||||||
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; }
|
|
||||||
|
|
||||||
|
@keyframes swiper-preloader-spin {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg); } }
|
||||||
|
/* Slide styles end */
|
||||||
:root {
|
:root {
|
||||||
--swiper-navigation-size: 44px;
|
--swiper-navigation-size: 44px;
|
||||||
/*
|
/*
|
||||||
|
--swiper-navigation-top-offset: 50%;
|
||||||
|
--swiper-navigation-sides-offset: 10px;
|
||||||
--swiper-navigation-color: var(--swiper-theme-color);
|
--swiper-navigation-color: var(--swiper-theme-color);
|
||||||
*/ }
|
*/ }
|
||||||
.swiper-button-prev, .swiper-button-next {
|
.swiper-button-prev, .swiper-button-next {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: var(--swiper-navigation-top-offset, 50%);
|
||||||
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
||||||
height: var(--swiper-navigation-size);
|
height: var(--swiper-navigation-size);
|
||||||
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
||||||
|
@ -170,7 +231,30 @@
|
||||||
.swiper-navigation-disabled .swiper-button-prev,
|
.swiper-navigation-disabled .swiper-button-prev,
|
||||||
.swiper-navigation-disabled .swiper-button-next {
|
.swiper-navigation-disabled .swiper-button-next {
|
||||||
display: none !important; }
|
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-family: swiper-icons;
|
||||||
font-size: var(--swiper-navigation-size);
|
font-size: var(--swiper-navigation-size);
|
||||||
text-transform: none !important;
|
text-transform: none !important;
|
||||||
|
@ -178,25 +262,19 @@
|
||||||
font-variant: initial;
|
font-variant: initial;
|
||||||
line-height: 1; }
|
line-height: 1; }
|
||||||
|
|
||||||
.swiper-button-prev,
|
|
||||||
.swiper-rtl .swiper-button-next {
|
|
||||||
left: 10px;
|
|
||||||
right: auto; }
|
|
||||||
.swiper-button-prev:after,
|
.swiper-button-prev:after,
|
||||||
.swiper-rtl .swiper-button-next:after {
|
.swiper-rtl .swiper-button-next:after {
|
||||||
content: 'prev'; }
|
content: 'prev'; }
|
||||||
|
|
||||||
.swiper-button-next,
|
.swiper-button-next,
|
||||||
.swiper-rtl .swiper-button-prev {
|
.swiper-rtl .swiper-button-prev {
|
||||||
right: 10px;
|
right: var(--swiper-navigation-sides-offset, 10px);
|
||||||
left: auto; }
|
left: auto; }
|
||||||
.swiper-button-next:after,
|
.swiper-button-next:after,
|
||||||
.swiper-rtl .swiper-button-prev:after {
|
.swiper-rtl .swiper-button-prev:after {
|
||||||
content: 'next'; }
|
content: 'next'; }
|
||||||
|
|
||||||
.swiper-button-lock {
|
/* Navigation font end */
|
||||||
display: none; }
|
|
||||||
|
|
||||||
/* a11y */
|
/* a11y */
|
||||||
.swiper .swiper-notification {
|
.swiper .swiper-notification {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -346,7 +424,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
word-break: break-word; }
|
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%;
|
width: 100%;
|
||||||
height: auto; }
|
height: auto; }
|
||||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper a,
|
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper a,
|
||||||
|
@ -354,11 +433,11 @@
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block; }
|
display: block; }
|
||||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper .is-forced-square > a > div {
|
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper .is-forced-square > a > div img,
|
||||||
padding-bottom: 100% !important; }
|
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper .is-forced-square > a > div canvas {
|
||||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel .swiper .is-forced-square > a > div img {
|
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center; }
|
object-position: center;
|
||||||
|
height: auto; }
|
||||||
.wp-block-tainacan-carousel-items-list .preview-warning {
|
.wp-block-tainacan-carousel-items-list .preview-warning {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
|
@ -463,7 +542,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
word-break: break-word; }
|
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;
|
height: auto;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
@ -474,7 +554,8 @@
|
||||||
content: '';
|
content: '';
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative; }
|
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;
|
display: block;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-bottom: 0.5em;
|
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 {
|
.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) );
|
width: calc(100% - var(--spaceBetweenItems, 32px) );
|
||||||
min-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; }
|
display: initial !important; }
|
||||||
|
|
||||||
.block-editor-block-list__block > .wp-block-tainacan-carousel-items-list {
|
.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
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||||
* https://swiperjs.com
|
* https://swiperjs.com
|
||||||
*
|
*
|
||||||
* Copyright 2014-2023 Vladimir Kharlampidi
|
* Copyright 2014-2024 Vladimir Kharlampidi
|
||||||
*
|
*
|
||||||
* Released under the MIT License
|
* Released under the MIT License
|
||||||
*
|
*
|
||||||
* Released on: January 30, 2023
|
* Released on: April 9, 2024
|
||||||
*/
|
*/
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'swiper-icons';
|
font-family: 'swiper-icons';
|
||||||
|
@ -15,7 +15,18 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal; }
|
font-style: normal; }
|
||||||
:root {
|
: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 {
|
.swiper {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
@ -24,7 +35,8 @@
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
/* Fix of Webkit flickering */
|
/* Fix of Webkit flickering */
|
||||||
z-index: 1; }
|
z-index: 1;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
.swiper-vertical > .swiper-wrapper {
|
.swiper-vertical > .swiper-wrapper {
|
||||||
flex-direction: column; }
|
flex-direction: column; }
|
||||||
|
@ -36,15 +48,18 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
transition-property: transform;
|
transition-property: transform;
|
||||||
|
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
||||||
box-sizing: content-box; }
|
box-sizing: content-box; }
|
||||||
|
|
||||||
.swiper-android .swiper-slide,
|
.swiper-android .swiper-slide,
|
||||||
|
.swiper-ios .swiper-slide,
|
||||||
.swiper-wrapper {
|
.swiper-wrapper {
|
||||||
transform: translate3d(0px, 0, 0); }
|
transform: translate3d(0px, 0, 0); }
|
||||||
|
|
||||||
.swiper-pointer-events {
|
.swiper-horizontal {
|
||||||
touch-action: pan-y; }
|
touch-action: pan-y; }
|
||||||
.swiper-pointer-events.swiper-vertical {
|
|
||||||
|
.swiper-vertical {
|
||||||
touch-action: pan-x; }
|
touch-action: pan-x; }
|
||||||
|
|
||||||
.swiper-slide {
|
.swiper-slide {
|
||||||
|
@ -52,7 +67,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition-property: transform; }
|
transition-property: transform;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
.swiper-slide-invisible-blank {
|
.swiper-slide-invisible-blank {
|
||||||
visibility: hidden; }
|
visibility: hidden; }
|
||||||
|
@ -61,6 +77,7 @@
|
||||||
.swiper-autoheight,
|
.swiper-autoheight,
|
||||||
.swiper-autoheight .swiper-slide {
|
.swiper-autoheight .swiper-slide {
|
||||||
height: auto; }
|
height: auto; }
|
||||||
|
|
||||||
.swiper-autoheight .swiper-wrapper {
|
.swiper-autoheight .swiper-wrapper {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
transition-property: transform, height; }
|
transition-property: transform, height; }
|
||||||
|
@ -70,17 +87,64 @@
|
||||||
backface-visibility: hidden; }
|
backface-visibility: hidden; }
|
||||||
|
|
||||||
/* 3D Effects */
|
/* 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; }
|
perspective: 1200px; }
|
||||||
.swiper-3d .swiper-wrapper,
|
|
||||||
.swiper-3d .swiper-slide,
|
.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,
|
||||||
.swiper-3d .swiper-slide-shadow-left,
|
.swiper-3d .swiper-slide-shadow-left,
|
||||||
.swiper-3d .swiper-slide-shadow-right,
|
.swiper-3d .swiper-slide-shadow-right,
|
||||||
.swiper-3d .swiper-slide-shadow-top,
|
.swiper-3d .swiper-slide-shadow-top,
|
||||||
.swiper-3d .swiper-slide-shadow-bottom,
|
.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,
|
||||||
.swiper-3d .swiper-slide-shadow-left,
|
.swiper-3d .swiper-slide-shadow-left,
|
||||||
.swiper-3d .swiper-slide-shadow-right,
|
.swiper-3d .swiper-slide-shadow-right,
|
||||||
|
@ -104,50 +168,47 @@
|
||||||
.swiper-3d .swiper-slide-shadow-bottom {
|
.swiper-3d .swiper-slide-shadow-bottom {
|
||||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
||||||
|
|
||||||
/* CSS Mode */
|
.swiper-lazy-preloader {
|
||||||
.swiper-css-mode > .swiper-wrapper {
|
width: 42px;
|
||||||
overflow: auto;
|
height: 42px;
|
||||||
scrollbar-width: none;
|
position: absolute;
|
||||||
/* For Firefox */
|
left: 50%;
|
||||||
-ms-overflow-style: none;
|
top: 50%;
|
||||||
/* For Internet Explorer and Edge */ }
|
margin-left: -21px;
|
||||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
margin-top: -21px;
|
||||||
display: none; }
|
z-index: 10;
|
||||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
transform-origin: 50%;
|
||||||
scroll-snap-align: start start; }
|
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 {
|
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
|
||||||
scroll-snap-type: x mandatory; }
|
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
|
||||||
|
animation: swiper-preloader-spin 1s infinite linear; }
|
||||||
|
|
||||||
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
.swiper-lazy-preloader-white {
|
||||||
scroll-snap-type: y mandatory; }
|
--swiper-preloader-color: #fff; }
|
||||||
|
|
||||||
.swiper-centered > .swiper-wrapper::before {
|
.swiper-lazy-preloader-black {
|
||||||
content: '';
|
--swiper-preloader-color: #000; }
|
||||||
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; }
|
|
||||||
|
|
||||||
|
@keyframes swiper-preloader-spin {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg); } }
|
||||||
|
/* Slide styles end */
|
||||||
:root {
|
:root {
|
||||||
--swiper-navigation-size: 44px;
|
--swiper-navigation-size: 44px;
|
||||||
/*
|
/*
|
||||||
|
--swiper-navigation-top-offset: 50%;
|
||||||
|
--swiper-navigation-sides-offset: 10px;
|
||||||
--swiper-navigation-color: var(--swiper-theme-color);
|
--swiper-navigation-color: var(--swiper-theme-color);
|
||||||
*/ }
|
*/ }
|
||||||
.swiper-button-prev, .swiper-button-next {
|
.swiper-button-prev, .swiper-button-next {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: var(--swiper-navigation-top-offset, 50%);
|
||||||
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
||||||
height: var(--swiper-navigation-size);
|
height: var(--swiper-navigation-size);
|
||||||
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
||||||
|
@ -170,7 +231,30 @@
|
||||||
.swiper-navigation-disabled .swiper-button-prev,
|
.swiper-navigation-disabled .swiper-button-prev,
|
||||||
.swiper-navigation-disabled .swiper-button-next {
|
.swiper-navigation-disabled .swiper-button-next {
|
||||||
display: none !important; }
|
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-family: swiper-icons;
|
||||||
font-size: var(--swiper-navigation-size);
|
font-size: var(--swiper-navigation-size);
|
||||||
text-transform: none !important;
|
text-transform: none !important;
|
||||||
|
@ -178,25 +262,19 @@
|
||||||
font-variant: initial;
|
font-variant: initial;
|
||||||
line-height: 1; }
|
line-height: 1; }
|
||||||
|
|
||||||
.swiper-button-prev,
|
|
||||||
.swiper-rtl .swiper-button-next {
|
|
||||||
left: 10px;
|
|
||||||
right: auto; }
|
|
||||||
.swiper-button-prev:after,
|
.swiper-button-prev:after,
|
||||||
.swiper-rtl .swiper-button-next:after {
|
.swiper-rtl .swiper-button-next:after {
|
||||||
content: 'prev'; }
|
content: 'prev'; }
|
||||||
|
|
||||||
.swiper-button-next,
|
.swiper-button-next,
|
||||||
.swiper-rtl .swiper-button-prev {
|
.swiper-rtl .swiper-button-prev {
|
||||||
right: 10px;
|
right: var(--swiper-navigation-sides-offset, 10px);
|
||||||
left: auto; }
|
left: auto; }
|
||||||
.swiper-button-next:after,
|
.swiper-button-next:after,
|
||||||
.swiper-rtl .swiper-button-prev:after {
|
.swiper-rtl .swiper-button-prev:after {
|
||||||
content: 'next'; }
|
content: 'next'; }
|
||||||
|
|
||||||
.swiper-button-lock {
|
/* Navigation font end */
|
||||||
display: none; }
|
|
||||||
|
|
||||||
/* a11y */
|
/* a11y */
|
||||||
.swiper .swiper-notification {
|
.swiper .swiper-notification {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -339,7 +417,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
word-break: break-word; }
|
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%;
|
width: 100%;
|
||||||
height: auto; }
|
height: auto; }
|
||||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper a,
|
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper a,
|
||||||
|
@ -347,7 +426,8 @@
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block; }
|
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; }
|
display: initial !important; }
|
||||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid a {
|
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -370,17 +450,17 @@
|
||||||
-ms-grid-row: 1;
|
-ms-grid-row: 1;
|
||||||
-ms-grid-row-span: 2;
|
-ms-grid-row-span: 2;
|
||||||
grid-column: 1/3;
|
grid-column: 1/3;
|
||||||
grid-row: 1/3;
|
grid-row: 1/3; }
|
||||||
padding-bottom: 100% !important; }
|
|
||||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid .term-items-grid > * {
|
.wp-block-tainacan-carousel-terms-list .tainacan-carousel .swiper .swiper-slide.term-list-item-grid .term-items-grid > * {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin-bottom: 0px;
|
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,
|
||||||
.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-fit: cover;
|
||||||
object-position: center; }
|
object-position: center;
|
||||||
|
width: 100%; }
|
||||||
.wp-block-tainacan-carousel-terms-list .preview-warning {
|
.wp-block-tainacan-carousel-terms-list .preview-warning {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
|
@ -488,7 +568,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
word-break: break-word; }
|
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;
|
height: auto;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,7 +20,9 @@
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
height: 185px !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.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;
|
height: 185px !important;
|
||||||
margin-bottom: 0px !important; }
|
margin-bottom: 0px !important; }
|
||||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid,
|
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-grid,
|
||||||
|
@ -50,7 +52,9 @@
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
display: block; }
|
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.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;
|
height: auto;
|
||||||
width: 185px;
|
width: 185px;
|
||||||
min-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.collections-layout-grid li.collection-list-item,
|
||||||
.wp-block-tainacan-collections-list ul.collections-list-edit.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%; }
|
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.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 img,
|
||||||
|
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-grid li.collection-list-item canvas {
|
||||||
width: 100%; } }
|
width: 100%; } }
|
||||||
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list,
|
.wp-block-tainacan-collections-list ul.collections-list.collections-layout-list,
|
||||||
.wp-block-tainacan-collections-list ul.collections-list-edit.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-all;
|
||||||
word-break: break-word; }
|
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.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;
|
height: auto;
|
||||||
width: 54px;
|
width: 54px;
|
||||||
min-width: 54px;
|
min-width: 54px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-right: 20px; }
|
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.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; }
|
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.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,
|
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-layout-list li.collection-list-item a,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AAEA,mCAAoC;EAChC,MAAM,EAAE,QAAQ;EAGhB,uDAAoB;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;EAIZ;gGAC2D;IACvD,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,CAAC;EAId;8FACyD;IACrD,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,eAAe;IAEnC;mGAAG;MACC,UAAU,EAAE,YAAY;MACxB,YAAY,EAAE,YAAY;MAC1B,WAAW,EAAE,YAAY;MACzB,MAAM,EAAE,gBAAgB;MAExB;yGAAI;QACA,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,cAAc;EAIzC;sFACiD;IAC7C,OAAO,EAAE,CAAC;ICtCd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,IAAI;IDqCT,gBAAgB,EAAE,6BAA6B;IAC/C,qBAAqB,EAAE,wBAAwB;IAC/C,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,YAAY;IAC7B,eAAe,EAAE,IAAI;IAErB;gHAAwB;MACpB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,KAAK;MAEZ;oHAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,KAAK;MAGlB;sHAAI;QACA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,GAAG;QACZ,aAAa,EAAE,KAAK;MAGxB;iJAA+B;QAC3B,OAAO,EAAE,IAAI;MAGjB;;0HACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;EAIjC,oFAAiD;IAC7C,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,UAAU;IAEvB,2FAAO;MACH,QAAQ,EAAE,mBAAmB;MAC7B,gBAAgB,EAAE,yBAAyB;MAC3C,KAAK,EAAE,oCAAmC;MAC1C,OAAO,EAAE,GAAG;MACZ,WAAW,EAAE,GAAG;MAChB,SAAS,EAAE,IAAI;MACf,UAAU,EAAE,MAAM;MAClB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,KAAK;MACZ,GAAG,EAAE,GAAG;MACR,eAAe,EAAE,MAAM;MACvB,OAAO,EAAE,GAAG;MAEZ,qGAAU;QAAE,MAAM,EAAE,GAAG;IAG3B,iGAAe;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,OAAO;MACnB,gBAAgB,EAAE,gBAAiC;MACnD,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;MACT,MAAM,EAAE,8CAA6C;MACrD,aAAa,EAAE,KAAK;MACpB,UAAU,EAAE,wCAAwC;IAExD,uGAAqB;MACjB,gBAAgB,EAAE,gBAAiC;MACnD,MAAM,EAAE,yDAAwD;EAGxE,yCAA0C;IAEtC;wFACiD;MAC7C,qBAAqB,EAAE,uBAAuB;MAE9C;kHAAwB;QACpB,KAAK,EAAE,IAAI;QACX;wHAAI;UAAE,KAAK,EAAE,IAAI;EAM7B;sFACiD;IAC7C,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,IAAI;IAErB;gHAAwB;MACpB,QAAQ,EAAE,QAAQ;MAClB,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,gBAAgB;MAC3B,KAAK,EAAE,gBAAgB;MAEvB;oHAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;MAG1B;sHAAI;QACA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,GAAG;QACZ,YAAY,EAAE,IAAI;MAItB;iJAA+B;QAC3B,OAAO,EAAE,IAAI;MAGjB;;0HACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QApC/C;oHAAwB;UAqChB,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QAzC/C;oHAAwB;UA0ChB,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA9C9C;oHAAwB;UA+ChB,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QAnD9C;oHAAwB;UAoDhB,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;iIACa;EACT,KAAK,EAAE,OAAO",
|
"mappings": "AAEA,mCAAoC;EAChC,MAAM,EAAE,QAAQ;EAGhB,uDAAoB;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;EAIZ;gGAC2D;IACvD,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,CAAC;EAId;8FACyD;IACrD,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,eAAe;IAEnC;mGAAG;MACC,UAAU,EAAE,YAAY;MACxB,YAAY,EAAE,YAAY;MAC1B,WAAW,EAAE,YAAY;MACzB,MAAM,EAAE,gBAAgB;MAExB;;;4GACO;QACH,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,cAAc;EAIzC;sFACiD;IAC7C,OAAO,EAAE,CAAC;ICvCd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,IAAI;IDsCT,gBAAgB,EAAE,6BAA6B;IAC/C,qBAAqB,EAAE,wBAAwB;IAC/C,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,YAAY;IAC7B,eAAe,EAAE,IAAI;IAErB;gHAAwB;MACpB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,KAAK;MAEZ;oHAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,KAAK;MAGlB;;;yHACO;QACH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,GAAG;QACZ,aAAa,EAAE,KAAK;MAGxB;iJAA+B;QAC3B,OAAO,EAAE,IAAI;MAGjB;;0HACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;EAIjC,oFAAiD;IAC7C,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,UAAU;IAEvB,2FAAO;MACH,QAAQ,EAAE,mBAAmB;MAC7B,gBAAgB,EAAE,yBAAyB;MAC3C,KAAK,EAAE,oCAAmC;MAC1C,OAAO,EAAE,GAAG;MACZ,WAAW,EAAE,GAAG;MAChB,SAAS,EAAE,IAAI;MACf,UAAU,EAAE,MAAM;MAClB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,KAAK;MACZ,GAAG,EAAE,GAAG;MACR,eAAe,EAAE,MAAM;MACvB,OAAO,EAAE,GAAG;MAEZ,qGAAU;QAAE,MAAM,EAAE,GAAG;IAG3B,iGAAe;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,OAAO;MACnB,gBAAgB,EAAE,gBAAiC;MACnD,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;MACT,MAAM,EAAE,8CAA6C;MACrD,aAAa,EAAE,KAAK;MACpB,UAAU,EAAE,wCAAwC;IAExD,uGAAqB;MACjB,gBAAgB,EAAE,gBAAiC;MACnD,MAAM,EAAE,yDAAwD;EAGxE,yCAA0C;IAEtC;wFACiD;MAC7C,qBAAqB,EAAE,uBAAuB;MAE9C;kHAAwB;QACpB,KAAK,EAAE,IAAI;QACX;;2HAAW;UAAE,KAAK,EAAE,IAAI;EAMpC;sFACiD;IAC7C,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,IAAI;IAErB;gHAAwB;MACpB,QAAQ,EAAE,QAAQ;MAClB,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,gBAAgB;MAC3B,KAAK,EAAE,gBAAgB;MAEvB;oHAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;MAG1B;;;yHACO;QACH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,GAAG;QACZ,YAAY,EAAE,IAAI;MAItB;;;oJACkC;QAC9B,OAAO,EAAE,IAAI;MAGjB;;0HACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QAtC/C;oHAAwB;UAuChB,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QA3C/C;oHAAwB;UA4ChB,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QAhD9C;oHAAwB;UAiDhB,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QArD9C;oHAAwB;UAsDhB,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;iIACa;EACT,KAAK,EAAE,OAAO",
|
||||||
"sources": ["../../views/gutenberg-blocks/blocks/collections-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
"sources": ["../../views/gutenberg-blocks/blocks/collections-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
||||||
"names": [],
|
"names": [],
|
||||||
"file": "tainacan-gutenberg-block-collections-list.css"
|
"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 {
|
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item a > div {
|
||||||
width: 100%; }
|
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.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%;
|
flex-basis: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
width: 100%;
|
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.items-layout-grid li.item-list-item,
|
||||||
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.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%; }
|
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.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 img,
|
||||||
|
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-grid li.item-list-item canvas {
|
||||||
width: 100%; } }
|
width: 100%; } }
|
||||||
.wp-block-tainacan-dynamic-items-list ul.items-list.items-layout-list,
|
.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 {
|
.wp-block-tainacan-dynamic-items-list ul.items-list-edit.items-layout-list {
|
||||||
|
@ -518,14 +521,18 @@
|
||||||
width: 54px;
|
width: 54px;
|
||||||
min-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.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;
|
height: auto;
|
||||||
width: 54px;
|
width: 54px;
|
||||||
min-width: 54px;
|
min-width: 54px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-right: 20px; }
|
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.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; }
|
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.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,
|
.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;
|
font-weight: bold;
|
||||||
line-height: normal; }
|
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.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; }
|
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.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 {
|
.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
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||||
* https://swiperjs.com
|
* https://swiperjs.com
|
||||||
*
|
*
|
||||||
* Copyright 2014-2023 Vladimir Kharlampidi
|
* Copyright 2014-2024 Vladimir Kharlampidi
|
||||||
*
|
*
|
||||||
* Released under the MIT License
|
* Released under the MIT License
|
||||||
*
|
*
|
||||||
* Released on: January 30, 2023
|
* Released on: April 9, 2024
|
||||||
*/
|
*/
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'swiper-icons';
|
font-family: 'swiper-icons';
|
||||||
|
@ -15,7 +15,18 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal; }
|
font-style: normal; }
|
||||||
:root {
|
: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 {
|
.swiper {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
@ -24,7 +35,8 @@
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
/* Fix of Webkit flickering */
|
/* Fix of Webkit flickering */
|
||||||
z-index: 1; }
|
z-index: 1;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
.swiper-vertical > .swiper-wrapper {
|
.swiper-vertical > .swiper-wrapper {
|
||||||
flex-direction: column; }
|
flex-direction: column; }
|
||||||
|
@ -36,15 +48,18 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
transition-property: transform;
|
transition-property: transform;
|
||||||
|
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
|
||||||
box-sizing: content-box; }
|
box-sizing: content-box; }
|
||||||
|
|
||||||
.swiper-android .swiper-slide,
|
.swiper-android .swiper-slide,
|
||||||
|
.swiper-ios .swiper-slide,
|
||||||
.swiper-wrapper {
|
.swiper-wrapper {
|
||||||
transform: translate3d(0px, 0, 0); }
|
transform: translate3d(0px, 0, 0); }
|
||||||
|
|
||||||
.swiper-pointer-events {
|
.swiper-horizontal {
|
||||||
touch-action: pan-y; }
|
touch-action: pan-y; }
|
||||||
.swiper-pointer-events.swiper-vertical {
|
|
||||||
|
.swiper-vertical {
|
||||||
touch-action: pan-x; }
|
touch-action: pan-x; }
|
||||||
|
|
||||||
.swiper-slide {
|
.swiper-slide {
|
||||||
|
@ -52,7 +67,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition-property: transform; }
|
transition-property: transform;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
.swiper-slide-invisible-blank {
|
.swiper-slide-invisible-blank {
|
||||||
visibility: hidden; }
|
visibility: hidden; }
|
||||||
|
@ -61,6 +77,7 @@
|
||||||
.swiper-autoheight,
|
.swiper-autoheight,
|
||||||
.swiper-autoheight .swiper-slide {
|
.swiper-autoheight .swiper-slide {
|
||||||
height: auto; }
|
height: auto; }
|
||||||
|
|
||||||
.swiper-autoheight .swiper-wrapper {
|
.swiper-autoheight .swiper-wrapper {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
transition-property: transform, height; }
|
transition-property: transform, height; }
|
||||||
|
@ -70,17 +87,64 @@
|
||||||
backface-visibility: hidden; }
|
backface-visibility: hidden; }
|
||||||
|
|
||||||
/* 3D Effects */
|
/* 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; }
|
perspective: 1200px; }
|
||||||
.swiper-3d .swiper-wrapper,
|
|
||||||
.swiper-3d .swiper-slide,
|
.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,
|
||||||
.swiper-3d .swiper-slide-shadow-left,
|
.swiper-3d .swiper-slide-shadow-left,
|
||||||
.swiper-3d .swiper-slide-shadow-right,
|
.swiper-3d .swiper-slide-shadow-right,
|
||||||
.swiper-3d .swiper-slide-shadow-top,
|
.swiper-3d .swiper-slide-shadow-top,
|
||||||
.swiper-3d .swiper-slide-shadow-bottom,
|
.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,
|
||||||
.swiper-3d .swiper-slide-shadow-left,
|
.swiper-3d .swiper-slide-shadow-left,
|
||||||
.swiper-3d .swiper-slide-shadow-right,
|
.swiper-3d .swiper-slide-shadow-right,
|
||||||
|
@ -104,50 +168,47 @@
|
||||||
.swiper-3d .swiper-slide-shadow-bottom {
|
.swiper-3d .swiper-slide-shadow-bottom {
|
||||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }
|
||||||
|
|
||||||
/* CSS Mode */
|
.swiper-lazy-preloader {
|
||||||
.swiper-css-mode > .swiper-wrapper {
|
width: 42px;
|
||||||
overflow: auto;
|
height: 42px;
|
||||||
scrollbar-width: none;
|
position: absolute;
|
||||||
/* For Firefox */
|
left: 50%;
|
||||||
-ms-overflow-style: none;
|
top: 50%;
|
||||||
/* For Internet Explorer and Edge */ }
|
margin-left: -21px;
|
||||||
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
|
margin-top: -21px;
|
||||||
display: none; }
|
z-index: 10;
|
||||||
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
|
transform-origin: 50%;
|
||||||
scroll-snap-align: start start; }
|
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 {
|
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
|
||||||
scroll-snap-type: x mandatory; }
|
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
|
||||||
|
animation: swiper-preloader-spin 1s infinite linear; }
|
||||||
|
|
||||||
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
|
.swiper-lazy-preloader-white {
|
||||||
scroll-snap-type: y mandatory; }
|
--swiper-preloader-color: #fff; }
|
||||||
|
|
||||||
.swiper-centered > .swiper-wrapper::before {
|
.swiper-lazy-preloader-black {
|
||||||
content: '';
|
--swiper-preloader-color: #000; }
|
||||||
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; }
|
|
||||||
|
|
||||||
|
@keyframes swiper-preloader-spin {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg); } }
|
||||||
|
/* Slide styles end */
|
||||||
:root {
|
:root {
|
||||||
--swiper-navigation-size: 44px;
|
--swiper-navigation-size: 44px;
|
||||||
/*
|
/*
|
||||||
|
--swiper-navigation-top-offset: 50%;
|
||||||
|
--swiper-navigation-sides-offset: 10px;
|
||||||
--swiper-navigation-color: var(--swiper-theme-color);
|
--swiper-navigation-color: var(--swiper-theme-color);
|
||||||
*/ }
|
*/ }
|
||||||
.swiper-button-prev, .swiper-button-next {
|
.swiper-button-prev, .swiper-button-next {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: var(--swiper-navigation-top-offset, 50%);
|
||||||
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
width: calc(var(--swiper-navigation-size) / 44 * 27);
|
||||||
height: var(--swiper-navigation-size);
|
height: var(--swiper-navigation-size);
|
||||||
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
|
||||||
|
@ -170,7 +231,30 @@
|
||||||
.swiper-navigation-disabled .swiper-button-prev,
|
.swiper-navigation-disabled .swiper-button-prev,
|
||||||
.swiper-navigation-disabled .swiper-button-next {
|
.swiper-navigation-disabled .swiper-button-next {
|
||||||
display: none !important; }
|
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-family: swiper-icons;
|
||||||
font-size: var(--swiper-navigation-size);
|
font-size: var(--swiper-navigation-size);
|
||||||
text-transform: none !important;
|
text-transform: none !important;
|
||||||
|
@ -178,25 +262,19 @@
|
||||||
font-variant: initial;
|
font-variant: initial;
|
||||||
line-height: 1; }
|
line-height: 1; }
|
||||||
|
|
||||||
.swiper-button-prev,
|
|
||||||
.swiper-rtl .swiper-button-next {
|
|
||||||
left: 10px;
|
|
||||||
right: auto; }
|
|
||||||
.swiper-button-prev:after,
|
.swiper-button-prev:after,
|
||||||
.swiper-rtl .swiper-button-next:after {
|
.swiper-rtl .swiper-button-next:after {
|
||||||
content: 'prev'; }
|
content: 'prev'; }
|
||||||
|
|
||||||
.swiper-button-next,
|
.swiper-button-next,
|
||||||
.swiper-rtl .swiper-button-prev {
|
.swiper-rtl .swiper-button-prev {
|
||||||
right: 10px;
|
right: var(--swiper-navigation-sides-offset, 10px);
|
||||||
left: auto; }
|
left: auto; }
|
||||||
.swiper-button-next:after,
|
.swiper-button-next:after,
|
||||||
.swiper-rtl .swiper-button-prev:after {
|
.swiper-rtl .swiper-button-prev:after {
|
||||||
content: 'next'; }
|
content: 'next'; }
|
||||||
|
|
||||||
.swiper-button-lock {
|
/* Navigation font end */
|
||||||
display: none; }
|
|
||||||
|
|
||||||
/* a11y */
|
/* a11y */
|
||||||
.swiper .swiper-notification {
|
.swiper .swiper-notification {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -209,9 +287,17 @@
|
||||||
:root {
|
:root {
|
||||||
/*
|
/*
|
||||||
--swiper-pagination-color: var(--swiper-theme-color);
|
--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-size: 8px;
|
||||||
--swiper-pagination-bullet-width: 8px;
|
--swiper-pagination-bullet-width: 8px;
|
||||||
--swiper-pagination-bullet-height: 8px;
|
--swiper-pagination-bullet-height: 8px;
|
||||||
|
--swiper-pagination-bullet-border-radius: 50%;
|
||||||
--swiper-pagination-bullet-inactive-color: #000;
|
--swiper-pagination-bullet-inactive-color: #000;
|
||||||
--swiper-pagination-bullet-inactive-opacity: 0.2;
|
--swiper-pagination-bullet-inactive-opacity: 0.2;
|
||||||
--swiper-pagination-bullet-opacity: 1;
|
--swiper-pagination-bullet-opacity: 1;
|
||||||
|
@ -234,7 +320,8 @@
|
||||||
.swiper-pagination-custom,
|
.swiper-pagination-custom,
|
||||||
.swiper-horizontal > .swiper-pagination-bullets,
|
.swiper-horizontal > .swiper-pagination-bullets,
|
||||||
.swiper-pagination-bullets.swiper-pagination-horizontal {
|
.swiper-pagination-bullets.swiper-pagination-horizontal {
|
||||||
bottom: 10px;
|
bottom: var(--swiper-pagination-bottom, 8px);
|
||||||
|
top: var(--swiper-pagination-top, auto);
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
|
||||||
|
@ -262,7 +349,7 @@
|
||||||
width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
|
width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
|
||||||
height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
|
height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border-radius: 50%;
|
border-radius: var(--swiper-pagination-bullet-border-radius, 50%);
|
||||||
background: var(--swiper-pagination-bullet-inactive-color, #000);
|
background: var(--swiper-pagination-bullet-inactive-color, #000);
|
||||||
opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); }
|
opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); }
|
||||||
button.swiper-pagination-bullet {
|
button.swiper-pagination-bullet {
|
||||||
|
@ -282,7 +369,8 @@
|
||||||
|
|
||||||
.swiper-vertical > .swiper-pagination-bullets,
|
.swiper-vertical > .swiper-pagination-bullets,
|
||||||
.swiper-pagination-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%;
|
top: 50%;
|
||||||
transform: translate3d(0px, -50%, 0); }
|
transform: translate3d(0px, -50%, 0); }
|
||||||
.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,
|
.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,
|
||||||
|
@ -314,9 +402,13 @@
|
||||||
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
||||||
transition: 200ms transform, 200ms right; }
|
transition: 200ms transform, 200ms right; }
|
||||||
|
|
||||||
|
/* Fraction */
|
||||||
|
.swiper-pagination-fraction {
|
||||||
|
color: var(--swiper-pagination-fraction-color, inherit); }
|
||||||
|
|
||||||
/* Progress */
|
/* Progress */
|
||||||
.swiper-pagination-progressbar {
|
.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; }
|
position: absolute; }
|
||||||
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
||||||
background: var(--swiper-pagination-color, var(--swiper-theme-color));
|
background: var(--swiper-pagination-color, var(--swiper-theme-color));
|
||||||
|
@ -331,11 +423,11 @@
|
||||||
transform-origin: right top; }
|
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 {
|
.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%;
|
width: 100%;
|
||||||
height: 4px;
|
height: var(--swiper-pagination-progressbar-size, 4px);
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 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 {
|
.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%;
|
height: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0; }
|
top: 0; }
|
||||||
|
@ -670,19 +762,19 @@
|
||||||
.tainacan-media-component__swiper-main + .tainacan-media-component__swiper-thumbs li.swiper-slide {
|
.tainacan-media-component__swiper-main + .tainacan-media-component__swiper-thumbs li.swiper-slide {
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
.tainacan-photoswipe-layer {
|
.pswp.tainacan-photoswipe-layer {
|
||||||
--pswp-bg: var(--tainacan-lightbox-background, #1d1d1d);
|
--pswp-bg: var(--tainacan-lightbox-background, #1d1d1d);
|
||||||
--pswp-error-text-color: var(--tainacan-lightbox-text-color, #fafafa);
|
--pswp-error-text-color: var(--tainacan-lightbox-text-color, #fafafa);
|
||||||
--pswp-icon-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-color-secondary: var(--tainacan-lightbox-background-contrast, #4f4f4f);
|
||||||
--pswp-icon-stroke-color: 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-background: #fafafa;
|
||||||
--tainacan-lightbox-text-color: #202020;
|
--tainacan-lightbox-text-color: #202020;
|
||||||
--tainacan-lightbox-background-contrast: #dbdbdb; }
|
--tainacan-lightbox-background-contrast: #dbdbdb; }
|
||||||
.tainacan-photoswipe-layer .pswp__counter {
|
.pswp.tainacan-photoswipe-layer .pswp__counter {
|
||||||
min-width: 50px; }
|
min-width: 50px; }
|
||||||
.tainacan-photoswipe-layer .pswp__name {
|
.pswp.tainacan-photoswipe-layer .pswp__name {
|
||||||
display: block;
|
display: block;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
@ -698,9 +790,9 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition: opacity 0.1s ease; }
|
transition: opacity 0.1s ease; }
|
||||||
.tainacan-photoswipe-layer .pswp__name:hover {
|
.pswp.tainacan-photoswipe-layer .pswp__name:hover {
|
||||||
opacity: 1.0; }
|
opacity: 1.0; }
|
||||||
.tainacan-photoswipe-layer .pswp__caption {
|
.pswp.tainacan-photoswipe-layer .pswp__caption {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -709,9 +801,9 @@
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
transition: opacity 0.4s ease, bottom 0.2s ease; }
|
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; }
|
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);
|
background-color: var(--pswp-bg);
|
||||||
color: var(--pswp-icon-color);
|
color: var(--pswp-icon-color);
|
||||||
text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
|
text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
|
||||||
|
@ -721,30 +813,30 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
border-radius: 4px; }
|
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-size: 0.875em;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
display: block; }
|
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; }
|
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;
|
font-size: 0.9375em;
|
||||||
display: block; }
|
display: block; }
|
||||||
.tainacan-photoswipe-layer.pswp--zoomed-in .pswp__name {
|
.pswp.tainacan-photoswipe-layer.pswp--zoomed-in .pswp__name {
|
||||||
opacity: 0.0; }
|
opacity: 0.0; }
|
||||||
.tainacan-photoswipe-layer.pswp--zoomed-in .pswp__caption {
|
.pswp.tainacan-photoswipe-layer.pswp--zoomed-in .pswp__caption {
|
||||||
bottom: -40px;
|
bottom: -40px;
|
||||||
opacity: 0.0; }
|
opacity: 0.0; }
|
||||||
.tainacan-photoswipe-layer .pswp__button--arrow--left::before,
|
.pswp.tainacan-photoswipe-layer .pswp__button--arrow--left::before,
|
||||||
.tainacan-photoswipe-layer .pswp__button--arrow--right::before {
|
.pswp.tainacan-photoswipe-layer .pswp__button--arrow--right::before {
|
||||||
background-color: transparent; }
|
background-color: transparent; }
|
||||||
.tainacan-photoswipe-layer .pswp__container {
|
.pswp.tainacan-photoswipe-layer .pswp__container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center; }
|
justify-content: center; }
|
||||||
.tainacan-photoswipe-layer .pswp__container .attachment-without-image {
|
.pswp.tainacan-photoswipe-layer .pswp__container .attachment-without-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 60px);
|
height: calc(100% - 60px);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -754,7 +846,7 @@
|
||||||
padding: 60px;
|
padding: 60px;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
margin-bottom: 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;
|
width: 90vw;
|
||||||
height: calc(100vh - 120px);
|
height: calc(100vh - 120px);
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -763,7 +855,7 @@
|
||||||
background-image: url("../images/preloader.gif");
|
background-image: url("../images/preloader.gif");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center; }
|
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;
|
width: 90vw;
|
||||||
height: calc(100vh - 120px);
|
height: calc(100vh - 120px);
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -772,56 +864,56 @@
|
||||||
background-image: url("../images/preloader.gif");
|
background-image: url("../images/preloader.gif");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center; }
|
background-position: center; }
|
||||||
.tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap {
|
.pswp.tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center; }
|
align-items: center; }
|
||||||
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed {
|
.pswp.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto; }
|
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);
|
max-width: calc((90vh * 2) / 1);
|
||||||
/* Default to 2:1 aspect ratio. */
|
/* Default to 2:1 aspect ratio. */
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: 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); }
|
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); }
|
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); }
|
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); }
|
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; }
|
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); }
|
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); }
|
max-width: calc((90vh * 1) / 2); }
|
||||||
.tainacan-photoswipe-layer .pswp__container .pswp__content {
|
.pswp.tainacan-photoswipe-layer .pswp__container .pswp__content {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-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; }
|
margin-top: 60px; }
|
||||||
.tainacan-photoswipe-layer .pswp__container a:first-of-type,
|
.pswp.tainacan-photoswipe-layer .pswp__container a:first-of-type,
|
||||||
.tainacan-photoswipe-layer .pswp__container p:first-of-type,
|
.pswp.tainacan-photoswipe-layer .pswp__container p:first-of-type,
|
||||||
.tainacan-photoswipe-layer .pswp__container article:first-of-type {
|
.pswp.tainacan-photoswipe-layer .pswp__container article:first-of-type {
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
padding: 1rem 4.33337vw;
|
padding: 1rem 4.33337vw;
|
||||||
background: var(--tainacan-media-background, #ffffff);
|
background: var(--tainacan-media-background, #ffffff);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
word-wrap: break-word; }
|
word-wrap: break-word; }
|
||||||
.tainacan-photoswipe-layer .pswp__container audio {
|
.pswp.tainacan-photoswipe-layer .pswp__container audio {
|
||||||
background: black;
|
background: black;
|
||||||
min-height: 38px;
|
min-height: 38px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
min-width: 80%;
|
min-width: 80%;
|
||||||
max-width: 80%; }
|
max-width: 80%; }
|
||||||
.tainacan-photoswipe-layer .pswp__container video {
|
.pswp.tainacan-photoswipe-layer .pswp__container video {
|
||||||
min-height: 56px;
|
min-height: 56px;
|
||||||
max-width: 80%; }
|
max-width: 80%; }
|
||||||
.tainacan-photoswipe-layer .pswp__container iframe {
|
.pswp.tainacan-photoswipe-layer .pswp__container iframe {
|
||||||
border: none; }
|
border: none; }
|
||||||
|
|
||||||
/*# sourceMappingURL=tainacan-gutenberg-block-item-gallery.css.map */
|
/*# 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;
|
margin-left: 0 !important;
|
||||||
height: 185px !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.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;
|
height: 185px !important;
|
||||||
margin-bottom: 0px !important; }
|
margin-bottom: 0px !important; }
|
||||||
.wp-block-tainacan-items-list ul.items-list.items-layout-grid,
|
.wp-block-tainacan-items-list ul.items-list.items-layout-grid,
|
||||||
|
@ -54,7 +56,9 @@
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
display: block; }
|
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.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;
|
height: auto;
|
||||||
width: 185px;
|
width: 185px;
|
||||||
min-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.items-layout-grid li.item-list-item,
|
||||||
.wp-block-tainacan-items-list ul.items-list-edit.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%; }
|
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.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 img,
|
||||||
|
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-grid li.item-list-item canvas {
|
||||||
width: 100%; } }
|
width: 100%; } }
|
||||||
.wp-block-tainacan-items-list ul.items-list.items-layout-list,
|
.wp-block-tainacan-items-list ul.items-list.items-layout-list,
|
||||||
.wp-block-tainacan-items-list ul.items-list-edit.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-all;
|
||||||
word-break: break-word; }
|
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.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;
|
height: auto;
|
||||||
width: 54px;
|
width: 54px;
|
||||||
min-width: 54px;
|
min-width: 54px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-right: 20px; }
|
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.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; }
|
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.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,
|
.wp-block-tainacan-items-list ul.items-list-edit.items-layout-list li.item-list-item a,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AAEA,6BAA8B;EAC1B,MAAM,EAAE,QAAQ;EAGhB,iDAAoB;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;EAIZ;8EAC+C;IAC3C,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,CAAC;EAId;4EAC6C;IACzC,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,eAAe;IAEnC;iFAAG;MACC,UAAU,EAAE,YAAY;MACxB,YAAY,EAAE,YAAY;MAC1B,WAAW,EAAE,YAAY;MACzB,MAAM,EAAE,gBAAgB;MAExB;uFAAI;QACA,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,cAAc;EAIzC;oEACqC;IACjC,OAAO,EAAE,CAAC;ICtCd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,IAAI;IDqCT,gBAAgB,EAAE,6BAA6B;IAC/C,qBAAqB,EAAE,wBAAwB;IAC/C,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,UAAU;IACvB,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,KAAK;MAEZ;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,MAAM;QAEnB;mGAAK;UACD,WAAW,EAAE,MAAM;UACnB,OAAO,EAAE,KAAK;MAItB;8FAAI;QACA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,GAAG;QACZ,aAAa,EAAE,KAAK;MAGxB;oHAA0B;QACtB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;EAIjC,kEAAqC;IACjC,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,UAAU;IAEvB,yEAAO;MACH,QAAQ,EAAE,mBAAmB;MAC7B,gBAAgB,EAAE,yBAAyB;MAC3C,KAAK,EAAE,oCAAmC;MAC1C,OAAO,EAAE,GAAG;MACZ,WAAW,EAAE,GAAG;MAChB,SAAS,EAAE,IAAI;MACf,UAAU,EAAE,MAAM;MAClB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,KAAK;MACZ,GAAG,EAAE,GAAG;MACR,eAAe,EAAE,MAAM;MACvB,OAAO,EAAE,GAAG;MAEZ,mFAAU;QAAE,MAAM,EAAE,GAAG;IAG3B,+EAAe;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,OAAO;MACnB,gBAAgB,EAAE,gBAAiC;MACnD,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;MACT,MAAM,EAAE,8CAA6C;MACrD,aAAa,EAAE,KAAK;MACpB,UAAU,EAAE,wCAAwC;IAExD,qFAAqB;MACjB,gBAAgB,EAAE,gBAAiC;MACnD,MAAM,EAAE,yDAAwD;EAGxE,yCAA0C;IAEtC;sEACqC;MACjC,qBAAqB,EAAE,uBAAuB;MAE9C;0FAAkB;QACd,KAAK,EAAE,IAAI;QACX;gGAAI;UAAE,KAAK,EAAE,IAAI;EAM7B;oEACqC;IACjC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,gBAAgB;MAC3B,KAAK,EAAE,gBAAgB;MAEvB;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;MAG1B;8FAAI;QACA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,GAAG;QACZ,YAAY,EAAE,IAAI;MAGtB;mHAAyB;QACrB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QAnC/C;4FAAkB;UAoCV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QAxC/C;4FAAkB;UAyCV,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA7C9C;4FAAkB;UA8CV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QAlD9C;4FAAkB;UAmDV,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;qHACa;EACT,KAAK,EAAE,OAAO",
|
"mappings": "AAEA,6BAA8B;EAC1B,MAAM,EAAE,QAAQ;EAGhB,iDAAoB;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;EAIZ;8EAC+C;IAC3C,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,CAAC;EAId;4EAC6C;IACzC,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,eAAe;IAEnC;iFAAG;MACC,UAAU,EAAE,YAAY;MACxB,YAAY,EAAE,YAAY;MAC1B,WAAW,EAAE,YAAY;MACzB,MAAM,EAAE,gBAAgB;MAExB;;;0FACO;QACH,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,cAAc;EAIzC;oEACqC;IACjC,OAAO,EAAE,CAAC;ICvCd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,IAAI;IDsCT,gBAAgB,EAAE,6BAA6B;IAC/C,qBAAqB,EAAE,wBAAwB;IAC/C,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,UAAU;IACvB,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,KAAK;MAEZ;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,MAAM;QAEnB;mGAAK;UACD,WAAW,EAAE,MAAM;UACnB,OAAO,EAAE,KAAK;MAItB;;;iGACO;QACH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,GAAG;QACZ,aAAa,EAAE,KAAK;MAGxB;oHAA0B;QACtB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;EAIjC,kEAAqC;IACjC,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,UAAU;IAEvB,yEAAO;MACH,QAAQ,EAAE,mBAAmB;MAC7B,gBAAgB,EAAE,yBAAyB;MAC3C,KAAK,EAAE,oCAAmC;MAC1C,OAAO,EAAE,GAAG;MACZ,WAAW,EAAE,GAAG;MAChB,SAAS,EAAE,IAAI;MACf,UAAU,EAAE,MAAM;MAClB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,KAAK;MACZ,GAAG,EAAE,GAAG;MACR,eAAe,EAAE,MAAM;MACvB,OAAO,EAAE,GAAG;MAEZ,mFAAU;QAAE,MAAM,EAAE,GAAG;IAG3B,+EAAe;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,OAAO;MACnB,gBAAgB,EAAE,gBAAiC;MACnD,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;MACT,MAAM,EAAE,8CAA6C;MACrD,aAAa,EAAE,KAAK;MACpB,UAAU,EAAE,wCAAwC;IAExD,qFAAqB;MACjB,gBAAgB,EAAE,gBAAiC;MACnD,MAAM,EAAE,yDAAwD;EAGxE,yCAA0C;IAEtC;sEACqC;MACjC,qBAAqB,EAAE,uBAAuB;MAE9C;0FAAkB;QACd,KAAK,EAAE,IAAI;QACX;;mGAAY;UAAE,KAAK,EAAE,IAAI;EAMrC;oEACqC;IACjC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,gBAAgB;MAC3B,KAAK,EAAE,gBAAgB;MAEvB;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;MAG1B;;;iGACO;QACH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,GAAG;QACZ,YAAY,EAAE,IAAI;MAGtB;;;sHAC4B;QACxB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QArC/C;4FAAkB;UAsCV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QA1C/C;4FAAkB;UA2CV,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA/C9C;4FAAkB;UAgDV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QApD9C;4FAAkB;UAqDV,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;qHACa;EACT,KAAK,EAAE,OAAO",
|
||||||
"sources": ["../../views/gutenberg-blocks/blocks/items-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
"sources": ["../../views/gutenberg-blocks/blocks/items-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
||||||
"names": [],
|
"names": [],
|
||||||
"file": "tainacan-gutenberg-block-items-list.css"
|
"file": "tainacan-gutenberg-block-items-list.css"
|
||||||
|
|
|
@ -34,7 +34,9 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: normal; }
|
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.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;
|
height: auto;
|
||||||
width: 185px;
|
width: 185px;
|
||||||
min-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.terms-layout-grid li.term-list-item,
|
||||||
.wp-block-tainacan-terms-list ul.terms-list-edit.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%; }
|
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.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 img,
|
||||||
|
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid li.term-list-item canvas {
|
||||||
width: 100%; } }
|
width: 100%; } }
|
||||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list,
|
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-list,
|
||||||
.wp-block-tainacan-terms-list ul.terms-list-edit.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-all;
|
||||||
word-break: break-word; }
|
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.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;
|
height: auto;
|
||||||
width: 54px;
|
width: 54px;
|
||||||
min-width: 54px;
|
min-width: 54px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-right: 20px; }
|
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.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; }
|
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.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,
|
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-list li.term-list-item a,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AAEA,6BAA8B;EAC1B,MAAM,EAAE,QAAQ;EAGhB,iDAAoB;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;EAIZ;8EAC+C;IAC3C,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,CAAC;EAId;oEACqC;IACjC,OAAO,EAAE,CAAC;ICpBd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,IAAI;IDmBT,gBAAgB,EAAE,6BAA6B;IAC/C,qBAAqB,EAAE,wBAAwB;IAC/C,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,YAAY;IAC7B,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,KAAK;MAEZ;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,MAAM;MAGvB;8FAAI;QACA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,GAAG;QACZ,aAAa,EAAE,KAAK;MAGxB;mHAAyB;QACrB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;EAIjC,kEAAqC;IACjC,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,UAAU;IAEvB,yEAAO;MACH,QAAQ,EAAE,mBAAmB;MAC7B,gBAAgB,EAAE,yBAAyB;MAC3C,KAAK,EAAE,oCAAmC;MAC1C,OAAO,EAAE,GAAG;MACZ,WAAW,EAAE,GAAG;MAChB,SAAS,EAAE,IAAI;MACf,UAAU,EAAE,MAAM;MAClB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,KAAK;MACZ,GAAG,EAAE,GAAG;MACR,eAAe,EAAE,MAAM;MACvB,OAAO,EAAE,GAAG;MAEZ,mFAAU;QAAE,MAAM,EAAE,GAAG;IAG3B,+EAAe;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,OAAO;MACnB,gBAAgB,EAAE,gBAAiC;MACnD,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;MACT,MAAM,EAAE,8CAA6C;MACrD,aAAa,EAAE,KAAK;MACpB,UAAU,EAAE,wCAAwC;IAExD,qFAAqB;MACjB,gBAAgB,EAAE,gBAAiC;MACnD,MAAM,EAAE,yDAAwD;EAGxE,yCAA0C;IAEtC;sEACqC;MACjC,qBAAqB,EAAE,uBAAuB;MAE9C;0FAAkB;QACd,KAAK,EAAE,IAAI;QACX;gGAAI;UAAE,KAAK,EAAE,IAAI;EAM7B;oEACqC;IACjC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,gBAAgB;MAC3B,KAAK,EAAE,gBAAgB;MAEvB;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;MAG1B;8FAAI;QACA,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,GAAG;QACZ,YAAY,EAAE,IAAI;MAGtB;mHAAyB;QACrB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QAnC/C;4FAAkB;UAoCV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QAxC/C;4FAAkB;UAyCV,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA7C9C;4FAAkB;UA8CV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QAlD9C;4FAAkB;UAmDV,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;qHACa;EACT,KAAK,EAAE,OAAO",
|
"mappings": "AAEA,6BAA8B;EAC1B,MAAM,EAAE,QAAQ;EAGhB,iDAAoB;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,CAAC;EAIZ;8EAC+C;IAC3C,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,CAAC;EAId;oEACqC;IACjC,OAAO,EAAE,CAAC;ICpBd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,IAAI;IDmBT,gBAAgB,EAAE,6BAA6B;IAC/C,qBAAqB,EAAE,wBAAwB;IAC/C,QAAQ,EAAE,GAAG;IACb,eAAe,EAAE,YAAY;IAC7B,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,KAAK,EAAE,KAAK;MAEZ;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,MAAM;MAGvB;;;iGACO;QACH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,GAAG;QACZ,aAAa,EAAE,KAAK;MAGxB;mHAAyB;QACrB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;EAIjC,kEAAqC;IACjC,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,UAAU;IAEvB,yEAAO;MACH,QAAQ,EAAE,mBAAmB;MAC7B,gBAAgB,EAAE,yBAAyB;MAC3C,KAAK,EAAE,oCAAmC;MAC1C,OAAO,EAAE,GAAG;MACZ,WAAW,EAAE,GAAG;MAChB,SAAS,EAAE,IAAI;MACf,UAAU,EAAE,MAAM;MAClB,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,KAAK;MACZ,GAAG,EAAE,GAAG;MACR,eAAe,EAAE,MAAM;MACvB,OAAO,EAAE,GAAG;MAEZ,mFAAU;QAAE,MAAM,EAAE,GAAG;IAG3B,+EAAe;MACX,MAAM,EAAE,IAAI;MACZ,UAAU,EAAE,OAAO;MACnB,gBAAgB,EAAE,gBAAiC;MACnD,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,IAAI;MACX,GAAG,EAAE,IAAI;MACT,MAAM,EAAE,8CAA6C;MACrD,aAAa,EAAE,KAAK;MACpB,UAAU,EAAE,wCAAwC;IAExD,qFAAqB;MACjB,gBAAgB,EAAE,gBAAiC;MACnD,MAAM,EAAE,yDAAwD;EAGxE,yCAA0C;IAEtC;sEACqC;MACjC,qBAAqB,EAAE,uBAAuB;MAE9C;0FAAkB;QACd,KAAK,EAAE,IAAI;QACX;;mGAAY;UAAE,KAAK,EAAE,IAAI;EAMrC;oEACqC;IACjC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,IAAI;IAErB;wFAAkB;MACd,QAAQ,EAAE,QAAQ;MAClB,MAAM,EAAE,mBAAmB;MAC3B,aAAa,EAAE,IAAI;MACnB,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,gBAAgB;MAC3B,KAAK,EAAE,gBAAgB;MAEvB;4FAAE;QACE,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,UAAU;MAG1B;;;iGACO;QACH,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,GAAG;QACZ,YAAY,EAAE,IAAI;MAGtB;;;sHAC4B;QACxB,OAAO,EAAE,IAAI;MAGjB;;kGACU;QACN,KAAK,EAAE,OAAO;QACd,eAAe,EAAE,IAAI;MAGzB,0CAA2C;QArC/C;4FAAkB;UAsCV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,0CAA2C;QA1C/C;4FAAkB;UA2CV,SAAS,EAAE,oBAAoB;UAC/B,KAAK,EAAE,oBAAoB;MAG/B,yCAA0C;QA/C9C;4FAAkB;UAgDV,SAAS,EAAE,gBAAgB;UAC3B,KAAK,EAAE,gBAAgB;MAG3B,yCAA0C;QApD9C;4FAAkB;UAqDV,SAAS,EAAE,iBAAiB;UAC5B,KAAK,EAAE,iBAAiB;;AAOhC;qHACa;EACT,KAAK,EAAE,OAAO",
|
||||||
"sources": ["../../views/gutenberg-blocks/blocks/terms-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
"sources": ["../../views/gutenberg-blocks/blocks/terms-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"],
|
||||||
"names": [],
|
"names": [],
|
||||||
"file": "tainacan-gutenberg-block-terms-list.css"
|
"file": "tainacan-gutenberg-block-terms-list.css"
|
||||||
|
|
|
@ -154,5 +154,7 @@
|
||||||
#tainacan-reports-app .apexcharts-legend-series {
|
#tainacan-reports-app .apexcharts-legend-series {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center; }
|
align-items: center; }
|
||||||
|
#tainacan-reports-app #current-page-selector {
|
||||||
|
min-width: 48px; }
|
||||||
|
|
||||||
/*# sourceMappingURL=tainacan-reports.css.map */
|
/*# sourceMappingURL=tainacan-reports.css.map */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AAAA,qBAAsB;EAClB,OAAO,EAAE,iBAAiB;EAC1B,MAAM,EAAE,CAAC;EAET,6BAAQ;IACJ,MAAM,EAAE,OAAO;EAGnB,8CAAyB;IACrB,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,aAAa;IAC9B,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,kBAAkB;IAE1B,iEAAmB;MACf,MAAM,EAAE,IAAI;IAGhB,qDAAO;MACH,YAAY,EAAE,IAAI;MAClB,WAAW,EAAE,GAAG;EAGxB,iDAA4B;IACxB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,oCAAoC;IAE3C,mGAAkD;MAC9C,YAAY,EAAE,IAAI;MAClB,WAAW,EAAE,8CAA8C;IAG/D,wFAAuC;MACnC,WAAW,EAAE,IAAI;MACjB,WAAW,EAAE,GAAG;IAGpB,0FAAyC;MACrC,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,MAAM;MACnB,MAAM,EAAE,gBAAgB;MACxB,SAAS,EAAE,IAAI;MAEf,kJAA0D;QACtD,UAAU,EAAE,eAAe;QAE3B,oCAAqC;UAHzC,kJAA0D;YAIlD,UAAU,EAAE,IAAI;MAGxB,oJAA4D;QACxD,UAAU,EAAE,oBAAoB;QAEhC,qCAAsC;UAH1C,oJAA4D;YAIpD,UAAU,EAAE,eAAe;QAE/B,oCAAqC;UANzC,oJAA4D;YAOpD,UAAU,EAAE,IAAI;IAK5B,6FAA4C;MACxC,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,MAAM;MACnB,MAAM,EAAE,eAAe;MACvB,UAAU,EAAE,IAAI;IAEpB,2DAAU;MACN,IAAI,EAAE,oCAAoC;MAC1C,WAAW,EAAE,OAAO;MACpB,MAAM,EAAE,OAAO;IAEnB,0EAAyB;MACrB,IAAI,EAAE,WAAW;MACjB,MAAM,EAAE,oCAAoC;IAEhD,wEAAuB;MACnB,WAAW,EAAE,CAAC;EAItB,8BAAS;IACL,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,UAAU;IACvB,eAAe,EAAE,MAAM;IAEvB,sCAAQ;MACJ,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,CAAC;MACV,QAAQ,EAAE,QAAQ;MAClB,UAAU,EAAE,WAAW;MAEvB,+CAAS;QACL,MAAM,EAAE,OAAO;MAEnB,0DAAoB;QAChB,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE,mBAAmB;QAC1B,OAAO,EAAE,YAAY;QACrB,OAAO,EAAE,QAAQ;QACjB,gBAAgB,EAAE,oCAAoC;QACtD,KAAK,EAAE,oCAAoC;QAC3C,SAAS,EAAE,OAAO;QAClB,sBAAsB,EAAE,GAAG;QAC3B,OAAO,EAAE,GAAG;QACZ,UAAU,EAAE,iBAAiB;QAE7B,iEAAO;UACH,MAAM,EAAE,IAAI;UACZ,UAAU,EAAE,IAAI;UAChB,MAAM,EAAE,OAAO;UAEf,uEAAQ;YACJ,KAAK,EAAE,oCAAoC;MAIvD;;sEAE0B;QACtB,OAAO,EAAE,GAAG;EAKxB,8BAAS;IACL,OAAO,EAAE,gBAAgB;IACzB,aAAa,EAAE,CAAC;IAChB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,KAAK;IACjB,gBAAgB,EAAE,oCAAoC;IAEtD,oCAAM;MACF,WAAW,EAAE,IAAI;MACjB,SAAS,EAAE,QAAQ;IAGvB,0CAAY;MACR,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,QAAQ;MACrB,eAAe,EAAE,aAAa;MAC9B,SAAS,EAAE,IAAI;MAEf,4DAAkB;QACd,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,IAAI;EAK7B,gDAA2B;IACvB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,MAAM;IACvB,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,IAAI;IAEb,kDAAE;MACE,KAAK,EAAE,oCAAoC;EAInD,wCAAmB;IACf,OAAO,EAAE,YAAY;IACrB,+CAAO;MACH,MAAM,EAAE,eAAe;MACvB,UAAU,EAAE,eAAe;MAC3B,UAAU,EAAE,eAAe;MAC3B,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,OAAO;MAEf,uDAAU;QACN,KAAK,EAAE,oCAAoC;EAKvD,8CAAyB;IACrB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,MAAM;IACvB,WAAW,EAAE,UAAU;IACvB,cAAc,EAAE,MAAM;IAEtB,+EAAiC;MAC7B,gBAAgB,EAAE,oCAAoC;MACtD,OAAO,EAAE,IAAI;MACb,eAAe,EAAE,UAAU;MAC3B,WAAW,EAAE,MAAM;MACnB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,iBAAiB;IAG9B,gHAAgE;MAC5D,OAAO,EAAE,iBAAiB;IAE9B,6EAA+B;MAC3B,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,QAAQ;MACjB,OAAO,EAAE,IAAI;MACb,eAAe,EAAE,MAAM;MACvB,WAAW,EAAE,UAAU;MACvB,cAAc,EAAE,MAAM;MAEtB,+EAAE;QACE,aAAa,EAAE,GAAG;QAClB,SAAS,EAAE,OAAO;EAK9B,+CAA0B;IACtB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM",
|
"mappings": "AAAA,qBAAsB;EAClB,OAAO,EAAE,iBAAiB;EAC1B,MAAM,EAAE,CAAC;EAET,6BAAQ;IACJ,MAAM,EAAE,OAAO;EAGnB,8CAAyB;IACrB,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,aAAa;IAC9B,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,kBAAkB;IAE1B,iEAAmB;MACf,MAAM,EAAE,IAAI;IAGhB,qDAAO;MACH,YAAY,EAAE,IAAI;MAClB,WAAW,EAAE,GAAG;EAGxB,iDAA4B;IACxB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,oCAAoC;IAE3C,mGAAkD;MAC9C,YAAY,EAAE,IAAI;MAClB,WAAW,EAAE,8CAA8C;IAG/D,wFAAuC;MACnC,WAAW,EAAE,IAAI;MACjB,WAAW,EAAE,GAAG;IAGpB,0FAAyC;MACrC,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,MAAM;MACnB,MAAM,EAAE,gBAAgB;MACxB,SAAS,EAAE,IAAI;MAEf,kJAA0D;QACtD,UAAU,EAAE,eAAe;QAE3B,oCAAqC;UAHzC,kJAA0D;YAIlD,UAAU,EAAE,IAAI;MAGxB,oJAA4D;QACxD,UAAU,EAAE,oBAAoB;QAEhC,qCAAsC;UAH1C,oJAA4D;YAIpD,UAAU,EAAE,eAAe;QAE/B,oCAAqC;UANzC,oJAA4D;YAOpD,UAAU,EAAE,IAAI;IAK5B,6FAA4C;MACxC,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,MAAM;MACnB,MAAM,EAAE,eAAe;MACvB,UAAU,EAAE,IAAI;IAEpB,2DAAU;MACN,IAAI,EAAE,oCAAoC;MAC1C,WAAW,EAAE,OAAO;MACpB,MAAM,EAAE,OAAO;IAEnB,0EAAyB;MACrB,IAAI,EAAE,WAAW;MACjB,MAAM,EAAE,oCAAoC;IAEhD,wEAAuB;MACnB,WAAW,EAAE,CAAC;EAItB,8BAAS;IACL,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,UAAU;IACvB,eAAe,EAAE,MAAM;IAEvB,sCAAQ;MACJ,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,CAAC;MACV,QAAQ,EAAE,QAAQ;MAClB,UAAU,EAAE,WAAW;MAEvB,+CAAS;QACL,MAAM,EAAE,OAAO;MAEnB,0DAAoB;QAChB,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,mBAAmB;QAC3B,KAAK,EAAE,mBAAmB;QAC1B,OAAO,EAAE,YAAY;QACrB,OAAO,EAAE,QAAQ;QACjB,gBAAgB,EAAE,oCAAoC;QACtD,KAAK,EAAE,oCAAoC;QAC3C,SAAS,EAAE,OAAO;QAClB,sBAAsB,EAAE,GAAG;QAC3B,OAAO,EAAE,GAAG;QACZ,UAAU,EAAE,iBAAiB;QAE7B,iEAAO;UACH,MAAM,EAAE,IAAI;UACZ,UAAU,EAAE,IAAI;UAChB,MAAM,EAAE,OAAO;UAEf,uEAAQ;YACJ,KAAK,EAAE,oCAAoC;MAIvD;;sEAE0B;QACtB,OAAO,EAAE,GAAG;EAKxB,8BAAS;IACL,OAAO,EAAE,gBAAgB;IACzB,aAAa,EAAE,CAAC;IAChB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,KAAK;IACjB,gBAAgB,EAAE,oCAAoC;IAEtD,oCAAM;MACF,WAAW,EAAE,IAAI;MACjB,SAAS,EAAE,QAAQ;IAGvB,0CAAY;MACR,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,QAAQ;MACrB,eAAe,EAAE,aAAa;MAC9B,SAAS,EAAE,IAAI;MAEf,4DAAkB;QACd,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,IAAI;EAK7B,gDAA2B;IACvB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,MAAM;IACvB,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,IAAI;IAEb,kDAAE;MACE,KAAK,EAAE,oCAAoC;EAInD,wCAAmB;IACf,OAAO,EAAE,YAAY;IACrB,+CAAO;MACH,MAAM,EAAE,eAAe;MACvB,UAAU,EAAE,eAAe;MAC3B,UAAU,EAAE,eAAe;MAC3B,OAAO,EAAE,CAAC;MACV,MAAM,EAAE,OAAO;MAEf,uDAAU;QACN,KAAK,EAAE,oCAAoC;EAKvD,8CAAyB;IACrB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,MAAM;IACvB,WAAW,EAAE,UAAU;IACvB,cAAc,EAAE,MAAM;IAEtB,+EAAiC;MAC7B,gBAAgB,EAAE,oCAAoC;MACtD,OAAO,EAAE,IAAI;MACb,eAAe,EAAE,UAAU;MAC3B,WAAW,EAAE,MAAM;MACnB,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,iBAAiB;IAG9B,gHAAgE;MAC5D,OAAO,EAAE,iBAAiB;IAE9B,6EAA+B;MAC3B,KAAK,EAAE,IAAI;MACX,OAAO,EAAE,QAAQ;MACjB,OAAO,EAAE,IAAI;MACb,eAAe,EAAE,MAAM;MACvB,WAAW,EAAE,UAAU;MACvB,cAAc,EAAE,MAAM;MAEtB,+EAAE;QACE,aAAa,EAAE,GAAG;QAClB,SAAS,EAAE,OAAO;EAK9B,+CAA0B;IACtB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;EAGvB,4CAAuB;IACnB,SAAS,EAAE,IAAI",
|
||||||
"sources": ["../../views/reports/tainacan-reports.scss"],
|
"sources": ["../../views/reports/tainacan-reports.scss"],
|
||||||
"names": [],
|
"names": [],
|
||||||
"file": "tainacan-reports.css"
|
"file": "tainacan-reports.css"
|
||||||
|
|
|
@ -11,7 +11,14 @@ use Tainacan\Entities;
|
||||||
*
|
*
|
||||||
* */
|
* */
|
||||||
class REST_Background_Processes_Controller extends REST_Controller {
|
class REST_Background_Processes_Controller extends REST_Controller {
|
||||||
private $table = '';
|
|
||||||
|
/**
|
||||||
|
* table
|
||||||
|
*
|
||||||
|
* @var String
|
||||||
|
* @access protected
|
||||||
|
*/
|
||||||
|
private $table;
|
||||||
|
|
||||||
protected function get_schema() {
|
protected function get_schema() {
|
||||||
return "TODO:get_schema";
|
return "TODO:get_schema";
|
||||||
|
@ -185,7 +192,7 @@ class REST_Background_Processes_Controller extends REST_Controller {
|
||||||
$process_type = '';
|
$process_type = '';
|
||||||
if (isset($request['search'])) {
|
if (isset($request['search'])) {
|
||||||
$name = $request['search'];
|
$name = $request['search'];
|
||||||
$process_type = "AND name LIKE '%${name}%'";
|
$process_type = "AND name LIKE '%$name%'";
|
||||||
$process_type = $wpdb->prepare($process_type);
|
$process_type = $wpdb->prepare($process_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ class REST_Items_Controller extends REST_Controller {
|
||||||
private $metadatum_repository;
|
private $metadatum_repository;
|
||||||
private $terms_repository;
|
private $terms_repository;
|
||||||
private $filters_repository;
|
private $filters_repository;
|
||||||
private $taxonomy_repository;
|
private $taxonomies_repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* REST_Items_Controller constructor.
|
* REST_Items_Controller constructor.
|
||||||
|
@ -587,7 +587,7 @@ class REST_Items_Controller extends REST_Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
$filter_name = is_string($filter_type_component)
|
$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';
|
: 'tainacan-api-items-filter-arguments';
|
||||||
|
|
||||||
$filters_arguments[] = apply_filters($filter_name, array(
|
$filters_arguments[] = apply_filters($filter_name, array(
|
||||||
|
@ -1025,7 +1025,8 @@ class REST_Items_Controller extends REST_Controller {
|
||||||
'status' => 'draft'
|
'status' => 'draft'
|
||||||
];
|
];
|
||||||
|
|
||||||
$body = json_decode($request->get_body(), true);
|
$data_body = $request->get_body() ?? '';
|
||||||
|
$body = json_decode($data_body, true);
|
||||||
|
|
||||||
if (!is_array($body)) {
|
if (!is_array($body)) {
|
||||||
$body = [];
|
$body = [];
|
||||||
|
@ -1178,7 +1179,7 @@ class REST_Items_Controller extends REST_Controller {
|
||||||
}
|
}
|
||||||
return $new_term;
|
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 () {
|
private function submission_rollback_new_terms () {
|
||||||
|
@ -1193,7 +1194,7 @@ class REST_Items_Controller extends REST_Controller {
|
||||||
$item = json_decode($request->get_body(), true);
|
$item = json_decode($request->get_body(), true);
|
||||||
$metadata = $item['metadata'];
|
$metadata = $item['metadata'];
|
||||||
foreach ($item as $key => $value) {
|
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);
|
$response_recaptcha = $this->submission_item_check_recaptcha($request);
|
||||||
|
@ -1236,7 +1237,7 @@ class REST_Items_Controller extends REST_Controller {
|
||||||
$child_value = implode(' ', $child_value);
|
$child_value = implode(' ', $child_value);
|
||||||
}
|
}
|
||||||
if (is_numeric($value) != true) {
|
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'] );
|
$metadatum_child = $this->metadatum_repository->fetch( $child['metadatum_id'] );
|
||||||
$item_metadata_child = new Entities\Item_Metadata_Entity($item, $metadatum_child, null, $parent_meta_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);
|
$child_value = implode(' ', $child_value);
|
||||||
}
|
}
|
||||||
if (is_numeric($value) != true) {
|
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'] );
|
$metadatum_child = $this->metadatum_repository->fetch( $child['metadatum_id'] );
|
||||||
$item_metadata_child = new Entities\Item_Metadata_Entity($item, $metadatum_child, null, $parent_meta_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 {
|
} else {
|
||||||
if (is_array($value) == true) {
|
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) {
|
} else if (is_numeric($value) != true) {
|
||||||
$value = filter_var($value, FILTER_SANITIZE_STRING);
|
$value = htmlspecialchars($value);
|
||||||
}
|
}
|
||||||
if ($item_metadata->is_multiple()) {
|
if ($item_metadata->is_multiple()) {
|
||||||
$item_metadata->set_value( is_array($value) ? $value : [$value] );
|
$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 ) ) {
|
if ( ! empty( $this->data ) ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
$wpdb->query('START TRANSACTION');
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$this->table,
|
$this->table,
|
||||||
[
|
[
|
||||||
|
@ -119,6 +120,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$this->ID = $wpdb->insert_id;
|
$this->ID = $wpdb->insert_id;
|
||||||
|
$wpdb->query('COMMIT');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -139,6 +141,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
||||||
if (!isset($batch->output)) {
|
if (!isset($batch->output)) {
|
||||||
$batch->output = '';
|
$batch->output = '';
|
||||||
}
|
}
|
||||||
|
$wpdb->query('START TRANSACTION');
|
||||||
$wpdb->update(
|
$wpdb->update(
|
||||||
$this->table,
|
$this->table,
|
||||||
[
|
[
|
||||||
|
@ -150,6 +153,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
||||||
],
|
],
|
||||||
['ID' => $key]
|
['ID' => $key]
|
||||||
);
|
);
|
||||||
|
$wpdb->query('COMMIT');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -164,6 +168,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
||||||
*/
|
*/
|
||||||
public function open( $key ) {
|
public function open( $key ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
$wpdb->query('START TRANSACTION');
|
||||||
$wpdb->update(
|
$wpdb->update(
|
||||||
$this->table,
|
$this->table,
|
||||||
[
|
[
|
||||||
|
@ -171,6 +176,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
||||||
],
|
],
|
||||||
['ID' => $key]
|
['ID' => $key]
|
||||||
);
|
);
|
||||||
|
$wpdb->query('COMMIT');
|
||||||
|
|
||||||
return $this;
|
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_label'] = __('Process completed with errors','tainacan');
|
||||||
$params['progress_value'] = 100;
|
$params['progress_value'] = 100;
|
||||||
}
|
}
|
||||||
|
$wpdb->query('START TRANSACTION');
|
||||||
$wpdb->update(
|
$wpdb->update(
|
||||||
$this->table,
|
$this->table,
|
||||||
$params,
|
$params,
|
||||||
['ID' => $key]
|
['ID' => $key]
|
||||||
);
|
);
|
||||||
|
$wpdb->query('COMMIT');
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,10 +221,12 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
||||||
*/
|
*/
|
||||||
public function delete( $key ) {
|
public function delete( $key ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
$wpdb->query('START TRANSACTION');
|
||||||
$wpdb->delete(
|
$wpdb->delete(
|
||||||
$this->table,
|
$this->table,
|
||||||
['ID' => $key]
|
['ID' => $key]
|
||||||
);
|
);
|
||||||
|
$wpdb->query('COMMIT');
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +362,8 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
||||||
$task = $this->task( $task );
|
$task = $this->task( $task );
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// TODO: Add Stacktrace
|
// 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']]);
|
$this->write_error_log($batch->key, [['datetime' => date("Y-m-d H:i:s"), 'message' => 'Process aborted']]);
|
||||||
$task = false;
|
$task = false;
|
||||||
$close_status = 'errored';
|
$close_status = 'errored';
|
||||||
|
@ -398,9 +408,9 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$table = $this->table;
|
$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( $wpdb->prepare( "DELETE FROM {$table} WHERE done = FALSE AND action LIKE %s", $this->action ) ); // @codingStandardsIgnoreLine.
|
||||||
|
$wpdb->query('COMMIT');
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,10 @@ use Tainacan\Repositories\Repository;
|
||||||
class Roles {
|
class Roles {
|
||||||
|
|
||||||
private static $instance = null;
|
private static $instance = null;
|
||||||
|
|
||||||
private $capabilities;
|
private $capabilities;
|
||||||
|
private $meta_caps;
|
||||||
|
private $meta_section_caps;
|
||||||
|
private $filters_caps;
|
||||||
|
|
||||||
public static function get_instance()
|
public static function get_instance()
|
||||||
{
|
{
|
||||||
|
@ -585,7 +587,7 @@ class Roles {
|
||||||
|
|
||||||
foreach ( $caps as $cap ) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,8 +91,8 @@ class Collection extends Entity {
|
||||||
$array_collection['header_image'] = $this->get_header_image();
|
$array_collection['header_image'] = $this->get_header_image();
|
||||||
$array_collection['author_name'] = $this->get_author_name();
|
$array_collection['author_name'] = $this->get_author_name();
|
||||||
$array_collection['url'] = $this->get_url();
|
$array_collection['url'] = $this->get_url();
|
||||||
$array_collection['creation_date'] = $this->get_date_i18n( explode( ' ', $array_collection['creation_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] );
|
$array_collection['modification_date'] = $this->get_date_i18n( explode( ' ', $array_collection['modification_date'] ?? '' )[0] );
|
||||||
|
|
||||||
return apply_filters('tainacan-collection-to-array', $array_collection, $this);
|
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
|
* Entity Super class
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#[\AllowDynamicProperties]
|
||||||
class Entity {
|
class Entity {
|
||||||
/**
|
/**
|
||||||
* The repository of that entity
|
* The repository of that entity
|
||||||
|
@ -202,6 +203,9 @@ class Entity {
|
||||||
return $this->$method($value);
|
return $this->$method($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// public function __set(string $name, mixed $value): void {
|
||||||
|
// $this->{$name} = $value;
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the value property
|
* get the value property
|
||||||
|
@ -216,6 +220,9 @@ class Entity {
|
||||||
return $this->$method();
|
return $this->$method();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// public function __get(string $name) {
|
||||||
|
// return $this->{$name};
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the status of the entity
|
* set the status of the entity
|
||||||
|
|
|
@ -140,7 +140,7 @@ class Filter extends Entity {
|
||||||
function get_filter_type_object(){
|
function get_filter_type_object(){
|
||||||
$class_name = $this->get_filter_type();
|
$class_name = $this->get_filter_type();
|
||||||
|
|
||||||
if( !class_exists( $class_name ) ){
|
if( is_null($class_name) || !class_exists( $class_name ) ){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,8 @@ class Item extends Entity {
|
||||||
$array_item['_thumbnail_id'] = $this->get__thumbnail_id();
|
$array_item['_thumbnail_id'] = $this->get__thumbnail_id();
|
||||||
$array_item['author_name'] = $this->get_author_name();
|
$array_item['author_name'] = $this->get_author_name();
|
||||||
$array_item['url'] = get_permalink( $this->get_id() );
|
$array_item['url'] = get_permalink( $this->get_id() );
|
||||||
$array_item['creation_date'] = $this->get_date_i18n( explode( ' ', $array_item['creation_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['modification_date'] = $this->get_date_i18n( explode( ' ', $array_item['modification_date'] ?? '' )[0] );
|
||||||
$array_item['document_mimetype'] = $this->get_document_mimetype();
|
$array_item['document_mimetype'] = $this->get_document_mimetype();
|
||||||
return apply_filters('tainacan-item-to-array', $array_item, $this);
|
return apply_filters('tainacan-item-to-array', $array_item, $this);
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ class Item extends Entity {
|
||||||
$output .= $embed;
|
$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 = '';
|
$return = '';
|
||||||
|
|
||||||
if ( $metadata_section->is_conditional_section() ) {
|
if ( $metadata_section->is_conditional_section() ) {
|
||||||
|
|
||||||
$rules = $metadata_section->get_conditional_section_rules();
|
$rules = $metadata_section->get_conditional_section_rules();
|
||||||
|
|
||||||
if ( !empty($rules) ) {
|
if ( !empty($rules) ) {
|
||||||
$item_id = $this->get_id();
|
|
||||||
|
|
||||||
foreach ( $rules as $meta_id => $meta_values_conditional ) {
|
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 );
|
$meta_values = get_post_meta( $item_id, $meta_id );
|
||||||
|
}
|
||||||
|
|
||||||
if ( !array_intersect($meta_values, $meta_values_conditional) )
|
if ( !array_intersect($meta_values, $meta_values_conditional) )
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
||||||
* Represents the Entity Term
|
* Represents the Entity Term
|
||||||
*/
|
*/
|
||||||
class Term extends Entity {
|
class Term extends Entity {
|
||||||
|
public $WP_Term;
|
||||||
|
|
||||||
protected
|
protected
|
||||||
$term_id,
|
$term_id,
|
||||||
$name,
|
$name,
|
||||||
|
|
|
@ -4,6 +4,14 @@ namespace Tainacan;
|
||||||
|
|
||||||
class Export_Handler {
|
class Export_Handler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bg_exporter
|
||||||
|
*
|
||||||
|
* @var Background_Exporter
|
||||||
|
* @access protected
|
||||||
|
*/
|
||||||
|
protected $bg_exporter;
|
||||||
|
|
||||||
private $registered_exporters = [];
|
private $registered_exporters = [];
|
||||||
|
|
||||||
function __construct() {
|
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"]
|
'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');
|
$items = $tainacan_items->fetch($filters, $collection_id, 'WP_Query');
|
||||||
|
|
||||||
if ( !isset($collection_definition['total_items']) ) {
|
if ( !isset($collection_definition['total_items']) ) {
|
||||||
|
@ -645,6 +649,8 @@ abstract class Exporter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wp_reset_postdata();
|
wp_reset_postdata();
|
||||||
|
$dataLen = count($data);
|
||||||
|
$this->add_log("Retrieved data size: $dataLen");
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -812,9 +818,6 @@ abstract class Exporter {
|
||||||
$method_name = $steps[$current_step]['callback'];
|
$method_name = $steps[$current_step]['callback'];
|
||||||
|
|
||||||
if (method_exists($this, $method_name)) {
|
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();
|
$result = $this->$method_name();
|
||||||
} else {
|
} else {
|
||||||
$this->add_error_log( 'Callback not found for step ' . $steps[$current_step]['name']);
|
$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
|
* @return Exposers\Exposer|boolean false
|
||||||
*/
|
*/
|
||||||
public static function request_has_exposer($request) {
|
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();
|
$query_url_params = $request->get_query_params();
|
||||||
$Tainacan_Exposers = self::get_instance();
|
$Tainacan_Exposers = self::get_instance();
|
||||||
if(
|
if(
|
||||||
|
|
|
@ -8,6 +8,11 @@ class Bulk_Edit_Process extends Generic_Process {
|
||||||
private $meta_key = '_tnc_bulk';
|
private $meta_key = '_tnc_bulk';
|
||||||
private $group_id = false;
|
private $group_id = false;
|
||||||
|
|
||||||
|
private $items_repository;
|
||||||
|
private $metadatum_repository;
|
||||||
|
private $item_metadata_repository;
|
||||||
|
private $bulk_edit_data;
|
||||||
|
|
||||||
public function __construct($attributes = array()) {
|
public function __construct($attributes = array()) {
|
||||||
$this->array_attributes = array_merge($this->array_attributes, [
|
$this->array_attributes = array_merge($this->array_attributes, [
|
||||||
'group_id',
|
'group_id',
|
||||||
|
@ -93,9 +98,9 @@ class Bulk_Edit_Process extends Generic_Process {
|
||||||
$metadata_label = __('Changed metadata', 'tainacan');
|
$metadata_label = __('Changed metadata', 'tainacan');
|
||||||
|
|
||||||
$message = __('Bulk edit finished', 'tainacan');
|
$message = __('Bulk edit finished', 'tainacan');
|
||||||
$message .= "<p> <strong> ${title_label}: </strong> ${name} </p>";
|
$message .= "<p> <strong> $title_label: </strong> $name </p>";
|
||||||
$message .= "<p> <strong> ${author_label}: </strong> ${author_name} </p>";
|
$message .= "<p> <strong> $author_label: </strong> $author_name </p>";
|
||||||
$message .= "<p> <strong> ${metadata_label}: </strong> ${metadata} </p>";
|
$message .= "<p> <strong> $metadata_label: </strong> $metadata </p>";
|
||||||
|
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
@ -268,7 +273,7 @@ class Bulk_Edit_Process extends Generic_Process {
|
||||||
|
|
||||||
$serealize_erro = (object) array('err' => array());
|
$serealize_erro = (object) array('err' => array());
|
||||||
$erro = $item_metadata->get_errors();
|
$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) );
|
$this->add_error_log( __('errors: ', 'tainacan') . implode(", ", $serealize_erro->err) );
|
||||||
|
|
||||||
return false;
|
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() ) );
|
$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());
|
$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) );
|
$this->add_error_log( __('errors: ', 'tainacan') . implode(", ", $serealize_erro->err) );
|
||||||
|
|
||||||
return false;
|
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() ) );
|
$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());
|
$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) );
|
$this->add_error_log( __('errors: ', 'tainacan') . implode(", ", $serealize_erro->err) );
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -4,6 +4,15 @@ namespace Tainacan;
|
||||||
|
|
||||||
class Generic_Process_Handler {
|
class Generic_Process_Handler {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bg_process
|
||||||
|
*
|
||||||
|
* @var Background_Generic_Process
|
||||||
|
* @access protected
|
||||||
|
*/
|
||||||
|
protected $bg_process;
|
||||||
|
|
||||||
private $registered_process = [];
|
private $registered_process = [];
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
|
|
@ -5,6 +5,8 @@ use Tainacan;
|
||||||
use Tainacan\Entities;
|
use Tainacan\Entities;
|
||||||
|
|
||||||
class CSV extends Importer {
|
class CSV extends Importer {
|
||||||
|
private $items_repo;
|
||||||
|
|
||||||
public function __construct($attributes = array()) {
|
public function __construct($attributes = array()) {
|
||||||
parent::__construct($attributes);
|
parent::__construct($attributes);
|
||||||
$this->items_repo = \Tainacan\Repositories\Items::get_instance();
|
$this->items_repo = \Tainacan\Repositories\Items::get_instance();
|
||||||
|
@ -487,7 +489,7 @@ class CSV extends Importer {
|
||||||
case 'utf8':
|
case 'utf8':
|
||||||
return $string;
|
return $string;
|
||||||
case 'iso88591':
|
case 'iso88591':
|
||||||
return utf8_encode($string);
|
return mb_convert_encoding($string, 'UTF-8', 'ISO-8859-1');
|
||||||
default:
|
default:
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
@ -1089,11 +1091,11 @@ class CSV extends Importer {
|
||||||
$author = $current_user->user_login;
|
$author = $current_user->user_login;
|
||||||
|
|
||||||
$message = __('imported file:', 'tainacan');
|
$message = __('imported file:', 'tainacan');
|
||||||
$message .= " <b> ${imported_file} </b><br/>";
|
$message .= " <b> $imported_file </b><br/>";
|
||||||
$message .= __('target collections:', 'tainacan');
|
$message .= __('target collections:', 'tainacan');
|
||||||
$message .= " <b>" . implode(", ", $this->get_collections_names() ) . "</b><br/>";
|
$message .= " <b>" . implode(", ", $this->get_collections_names() ) . "</b><br/>";
|
||||||
$message .= __('Imported by:', 'tainacan');
|
$message .= __('Imported by:', 'tainacan');
|
||||||
$message .= " <b> ${author} </b><br/>";
|
$message .= " <b> $author </b><br/>";
|
||||||
|
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,14 @@ namespace Tainacan;
|
||||||
|
|
||||||
class Importer_Handler {
|
class Importer_Handler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bg_importer
|
||||||
|
*
|
||||||
|
* @var Background_Importer
|
||||||
|
* @access protected
|
||||||
|
*/
|
||||||
|
protected $bg_importer;
|
||||||
|
|
||||||
private $registered_importers = [];
|
private $registered_importers = [];
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
|
|
@ -5,6 +5,13 @@ use \Tainacan\Entities;
|
||||||
|
|
||||||
class Old_Tainacan extends Importer {
|
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 = [
|
protected $steps = [
|
||||||
[
|
[
|
||||||
'name' => 'Create Taxonomies',
|
'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 );
|
$info = $this->requester( $this->get_url() . $this->tainacan_api_address . "/collections/".$collection_id."/items", $args );
|
||||||
|
|
||||||
if( !isset($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 total items');
|
$this->add_error_log('Error in fetch remote total items');
|
||||||
$this->abort();
|
$this->abort();
|
||||||
return false;
|
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 );
|
$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']) ){
|
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->add_error_log('Error in fetch remote first page item');
|
||||||
$this->abort();
|
$this->abort();
|
||||||
return false;
|
return false;
|
||||||
|
@ -493,7 +500,7 @@ class Old_Tainacan extends Importer{
|
||||||
$info = json_decode($info['body']);
|
$info = json_decode($info['body']);
|
||||||
|
|
||||||
if( !isset($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->add_error_log('Error in fetch remote ' . $page . ' page item');
|
||||||
$this->abort();
|
$this->abort();
|
||||||
return false;
|
return false;
|
||||||
|
@ -613,7 +620,7 @@ class Old_Tainacan extends Importer{
|
||||||
if (is_wp_error($result)) {
|
if (is_wp_error($result)) {
|
||||||
|
|
||||||
$this->add_log($result->get_error_message());
|
$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);
|
$this->add_log('request number ' . $requests);
|
||||||
|
|
||||||
} else if (isset($result['body'])){
|
} 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();
|
$this->abort();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -713,10 +720,9 @@ class Old_Tainacan extends Importer{
|
||||||
* @return int $metadatum_id
|
* @return int $metadatum_id
|
||||||
*/
|
*/
|
||||||
protected function create_metadata( $node_metadata_old, $collection_id = null){
|
protected function create_metadata( $node_metadata_old, $collection_id = null){
|
||||||
$this->add_log('Creating metadata' . $meta->name);
|
|
||||||
|
|
||||||
$newMetadatum = new Entities\Metadatum();
|
$newMetadatum = new Entities\Metadatum();
|
||||||
$meta = $node_metadata_old;
|
$meta = $node_metadata_old;
|
||||||
|
$this->add_log('Creating metadata' . $meta->name);
|
||||||
|
|
||||||
$name = $meta->name;
|
$name = $meta->name;
|
||||||
$type = $this->define_type($meta->type);
|
$type = $this->define_type($meta->type);
|
||||||
|
@ -856,7 +862,7 @@ class Old_Tainacan extends Importer{
|
||||||
/**
|
/**
|
||||||
* create attachments, document and thumb from old
|
* create attachments, document and thumb from old
|
||||||
*
|
*
|
||||||
* @param string $node_old
|
* @param Object $node_old
|
||||||
*
|
*
|
||||||
* @return string the class name
|
* @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'
|
'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()) {
|
public function __construct($attributes = array()) {
|
||||||
parent::__construct($attributes);
|
parent::__construct($attributes);
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,38 @@
|
||||||
*/
|
*/
|
||||||
protected $cron_interval_identifier;
|
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
|
* Initiate new background process
|
||||||
*/
|
*/
|
||||||
|
@ -257,8 +289,11 @@
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
protected function unlock_process() {
|
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' );
|
delete_site_transient( $this->identifier . '_process_lock' );
|
||||||
|
$wpdb->query('COMMIT');
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,56 +16,6 @@ class Dublin_Core extends Mapper {
|
||||||
public $prefixes = [
|
public $prefixes = [
|
||||||
'dc' => 'http://purl.org/dc/elements/1.1/'
|
'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 **/
|
/** XML especial case **/
|
||||||
const XML_DC_NAMESPACE = 'http://purl.org/dc/elements/1.1/';
|
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';
|
public $XML_append_root = 'rdf:Description';
|
||||||
/** END: XML especial case **/
|
/** 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;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function __construct() {}
|
||||||
}
|
}
|
|
@ -137,7 +137,8 @@ class Mappers_Handler {
|
||||||
* @return Mappers\Mapper|boolean false
|
* @return Mappers\Mapper|boolean false
|
||||||
*/
|
*/
|
||||||
public static function get_mapper_from_request($request) {
|
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();
|
$Tainacan_Mappers = self::get_instance();
|
||||||
$query_url_params = $request->get_query_params();
|
$query_url_params = $request->get_query_params();
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,10 @@ class OAIPMH_Expose {
|
||||||
var $token_valid;
|
var $token_valid;
|
||||||
var $token_prefix;
|
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 $sets;
|
||||||
public $metadataPrefix;
|
public $metadataPrefix;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @signature CONSTRUTOR
|
* @signature CONSTRUTOR
|
||||||
*
|
*
|
||||||
|
@ -186,7 +187,7 @@ class OAIPMH_List_Records extends OAIPMH_Expose {
|
||||||
$this->xml_creater->addChild($this->working_node, $key, '');
|
$this->xml_creater->addChild($this->working_node, $key, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch(Exception $e){
|
}catch(\Exception $e){
|
||||||
var_dump($e,$this->working_node,'dc:' . $key);
|
var_dump($e,$this->working_node,'dc:' . $key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,9 @@ class Collections extends Repository {
|
||||||
public $entities_type = '\Tainacan\Entities\Collection';
|
public $entities_type = '\Tainacan\Entities\Collection';
|
||||||
|
|
||||||
private static $instance = null;
|
private static $instance = null;
|
||||||
|
private $old_collection;
|
||||||
|
private $old_core_title;
|
||||||
|
private $old_core_description;
|
||||||
|
|
||||||
public static function get_instance() {
|
public static function get_instance() {
|
||||||
if ( ! isset( self::$instance ) ) {
|
if ( ! isset( self::$instance ) ) {
|
||||||
|
|
|
@ -70,8 +70,10 @@ class Item_Metadata extends Repository {
|
||||||
if ( $unique ) {
|
if ( $unique ) {
|
||||||
$item_metadata_value = $this->sanitize_value( $item_metadata->get_value() );
|
$item_metadata_value = $this->sanitize_value( $item_metadata->get_value() );
|
||||||
if ( !is_numeric($item_metadata->get_value()) && empty( $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() );
|
delete_metadata_by_mid( 'post', $item_metadata->get_meta_id() );
|
||||||
|
$this->upclean_compound_value( $item_metadata);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
delete_post_meta( $item_metadata->get_item()->get_id(), $item_metadata->get_metadatum()->get_id() );
|
delete_post_meta( $item_metadata->get_item()->get_id(), $item_metadata->get_metadatum()->get_id() );
|
||||||
} elseif ( is_int( $item_metadata->get_meta_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 ) {
|
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']) )
|
if ( empty($row['meta_value']) )
|
||||||
continue;
|
continue;
|
||||||
$value = $this->extract_compound_value( maybe_unserialize( $row['meta_value'] ), $item_metadata->get_item(), $row['meta_id'] );
|
$value = $this->extract_compound_value( maybe_unserialize( $row['meta_value'] ), $item_metadata->get_item(), $row['meta_id'] );
|
||||||
|
if ( empty($value) )
|
||||||
|
continue;
|
||||||
if ( $unique ) {
|
if ( $unique ) {
|
||||||
$return_value = $value;
|
$return_value = $value;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -14,6 +14,7 @@ use \Respect\Validation\Validator as v;
|
||||||
class Metadata extends Repository {
|
class Metadata extends Repository {
|
||||||
public $entities_type = '\Tainacan\Entities\Metadatum';
|
public $entities_type = '\Tainacan\Entities\Metadatum';
|
||||||
protected $default_metadata = 'default';
|
protected $default_metadata = 'default';
|
||||||
|
protected $current_taxonomy;
|
||||||
|
|
||||||
public $metadata_types = [];
|
public $metadata_types = [];
|
||||||
|
|
||||||
|
@ -1265,7 +1266,7 @@ class Metadata extends Repository {
|
||||||
}
|
}
|
||||||
|
|
||||||
$search_q = '';
|
$search_q = '';
|
||||||
$search = trim($args['search']);
|
$search = trim($args['search'] ?? '');
|
||||||
if (!empty($search)) {
|
if (!empty($search)) {
|
||||||
if( $metadatum_type === 'Tainacan\Metadata_Types\Relationship' ) {
|
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 . '%');
|
$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){
|
if( $number < 1){
|
||||||
$pages = 1;
|
$pages = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1401,8 +1402,10 @@ class Metadata extends Repository {
|
||||||
$total_items = null;
|
$total_items = null;
|
||||||
|
|
||||||
if ( $args['count_items'] ) {
|
if ( $args['count_items'] ) {
|
||||||
$count_items_query = $args['items_filter'];
|
$count_items_query = array(
|
||||||
$count_items_query['posts_per_page'] = 1;
|
'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']) ) {
|
if ( !isset($count_items_query['tax_query']) ) {
|
||||||
$count_items_query['tax_query'] = [];
|
$count_items_query['tax_query'] = [];
|
||||||
}
|
}
|
||||||
|
@ -1448,7 +1451,7 @@ class Metadata extends Repository {
|
||||||
|
|
||||||
$results = $wpdb->get_col($query);
|
$results = $wpdb->get_col($query);
|
||||||
$total = $wpdb->get_var($total_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){
|
if( $number < 1){
|
||||||
$pages = 1;
|
$pages = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1485,7 +1488,7 @@ class Metadata extends Repository {
|
||||||
|
|
||||||
if ( $args['count_items'] ) {
|
if ( $args['count_items'] ) {
|
||||||
$count_items_query = $args['items_filter'];
|
$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']) ) {
|
if ( !isset($count_items_query['meta_query']) ) {
|
||||||
$count_items_query['meta_query'] = [];
|
$count_items_query['meta_query'] = [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,6 +121,7 @@ abstract class Repository {
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function insert( $obj ) {
|
public function insert( $obj ) {
|
||||||
|
$obj_post_type = $obj->get_post_type();
|
||||||
// validate
|
// validate
|
||||||
$required_validation_statuses = ['publish', 'future', 'private'];
|
$required_validation_statuses = ['publish', 'future', 'private'];
|
||||||
if (in_array( $obj->get_status(), apply_filters( 'tainacan-status-require-validation', $required_validation_statuses) ) && ! $obj->get_validated() ) {
|
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 ) {
|
if ( ! $obj instanceof Entities\Log ) {
|
||||||
$obj->WP_Post->post_title = $sanitized_title;
|
$obj->WP_Post->post_title = $sanitized_title;
|
||||||
$obj->WP_Post->post_content = $sanitized_desc;
|
$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 );
|
$id = wp_insert_post( $obj->WP_Post );
|
||||||
|
@ -941,6 +945,9 @@ abstract class Repository {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function sanitize_value($content) {
|
protected function sanitize_value($content) {
|
||||||
|
if( $content == null ) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
if (is_numeric($content) || empty($content ) ) {
|
if (is_numeric($content) || empty($content ) ) {
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ class Terms extends Repository {
|
||||||
if ( $mapped['map'] != 'termmeta' ) {
|
if ( $mapped['map'] != 'termmeta' ) {
|
||||||
$get_ = 'get_' . $prop;
|
$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) ) {
|
($mapped['map'] == 'parent' && $term->WP_Term->{$mapped['map']} >= 0) ) {
|
||||||
|
|
||||||
$args[ $mapped['map'] ] = $term->$get_();
|
$args[ $mapped['map'] ] = $term->$get_();
|
||||||
|
|
|
@ -619,7 +619,7 @@ class Theme_Helper {
|
||||||
// If in a collection page
|
// If in a collection page
|
||||||
$collection = tainacan_get_collection($args);
|
$collection = tainacan_get_collection($args);
|
||||||
if ($collection) {
|
if ($collection) {
|
||||||
$props .= "collection-id='" . $collection->get_id() . "' ";
|
$props .= "data-collection-id='" . $collection->get_id() . "' ";
|
||||||
$default_view_mode = $collection->get_default_view_mode();
|
$default_view_mode = $collection->get_default_view_mode();
|
||||||
$enabled_view_modes = $collection->get_enabled_view_modes();
|
$enabled_view_modes = $collection->get_enabled_view_modes();
|
||||||
$default_order = $collection->get_default_order();
|
$default_order = $collection->get_default_order();
|
||||||
|
@ -632,19 +632,19 @@ class Theme_Helper {
|
||||||
// If in a tainacan taxonomy
|
// If in a tainacan taxonomy
|
||||||
$term = tainacan_get_term($args);
|
$term = tainacan_get_term($args);
|
||||||
if ($term) {
|
if ($term) {
|
||||||
$props .= "term-id='" . $term->term_id . "' ";
|
$props .= "data-term-id='" . $term->term_id . "' ";
|
||||||
$props .= "taxonomy='" . $term->taxonomy . "' ";
|
$props .= "data-taxonomy='" . $term->taxonomy . "' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$props .= "default-view-mode='" . $default_view_mode . "' ";
|
$props .= "data-default-view-mode='" . $default_view_mode . "' ";
|
||||||
$props .= "enabled-view-modes='" . implode(',', $enabled_view_modes) . "' ";
|
$props .= "data-enabled-view-modes='" . implode(',', $enabled_view_modes) . "' ";
|
||||||
$props .= "default-order='" . $default_order . "' ";
|
$props .= "data-default-order='" . $default_order . "' ";
|
||||||
$props .= "default-orderby='" . (is_array($default_orderby) ? json_encode($default_orderby) : $default_orderby) . "' ";
|
$props .= "data-default-orderby='" . (is_array($default_orderby) ? json_encode($default_orderby) : $default_orderby) . "' ";
|
||||||
|
|
||||||
// Passes arguments to custom props
|
// Passes arguments to custom props
|
||||||
foreach ($args as $key => $value) {
|
foreach ($args as $key => $value) {
|
||||||
if ($value == true || $value == 'true') {
|
if ($value == true || $value == 'true') {
|
||||||
$props .= str_replace("_", "-", $key) . "='" . $value . "' ";
|
$props .= 'data-' . str_replace("_", "-", $key) . "='" . $value . "' ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,32 +652,32 @@ class Theme_Helper {
|
||||||
'div' => [
|
'div' => [
|
||||||
'id' => true,
|
'id' => true,
|
||||||
'data-module' => true,
|
'data-module' => true,
|
||||||
'collection-id' => true,
|
'data-collection-id' => true,
|
||||||
'term-id' => true,
|
'data-term-id' => true,
|
||||||
'taxonomy' => true,
|
'data-taxonomy' => true,
|
||||||
'default-view-mode' => true,
|
'data-default-view-mode' => true,
|
||||||
'is-forced-view-mode' => true,
|
'data-is-forced-view-mode' => true,
|
||||||
'enabled-view-modes' => true,
|
'data-enabled-view-modes' => true,
|
||||||
'default-order' => true,
|
'data-default-order' => true,
|
||||||
'default-orderby' => true,
|
'data-default-orderby' => true,
|
||||||
'hide-filters' => true,
|
'data-hide-filters' => true,
|
||||||
'hide-hide-filters-button' => true,
|
'data-hide-hide-filters-button' => true,
|
||||||
'hide-search' => true,
|
'data-hide-search' => true,
|
||||||
'hide-advanced-search' => true,
|
'data-hide-advanced-search' => true,
|
||||||
'hide-displayed-metadata-button' => true,
|
'data-hide-displayed-metadata-button' => true,
|
||||||
'hide-sorting-area' => true,
|
'data-hide-sorting-area' => true,
|
||||||
'hide-items-thumbnail' => true,
|
'data-hide-items-thumbnail' => true,
|
||||||
'hide-sort-by-button' => true,
|
'data-hide-sort-by-button' => true,
|
||||||
'hide-exposers-button' => true,
|
'data-hide-exposers-button' => true,
|
||||||
'hide-items-per-page-button' => true,
|
'data-hide-items-per-page-button' => true,
|
||||||
'hide-go-to-page-button' => true,
|
'data-hide-go-to-page-button' => true,
|
||||||
'hide-pagination-area' => true,
|
'data-hide-pagination-area' => true,
|
||||||
'default-items-per-page' => true,
|
'data-default-items-per-page' => true,
|
||||||
'show-filters-button-inside-search-control' => true,
|
'data-show-filters-button-inside-search-control' => true,
|
||||||
'start-with-filters-hidden' => true,
|
'data-start-with-filters-hidden' => true,
|
||||||
'filters-as-modal' => true,
|
'data-filters-as-modal' => true,
|
||||||
'show-inline-view-mode-options' => true,
|
'data-show-inline-view-mode-options' => true,
|
||||||
'show-fullscreen-with-view-modes' => true
|
'data-show-fullscreen-with-view-modes' => true
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
||||||
*/
|
*/
|
||||||
trait Entity_Collection_Relation {
|
trait Entity_Collection_Relation {
|
||||||
|
|
||||||
|
protected $collection;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return int collection item ID
|
* @return int collection item ID
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Tainacan;
|
namespace Tainacan;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Migrations {
|
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() {
|
static function alter_table_tnc_bg_process_add_uuid() {
|
||||||
global $wpdb;
|
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
|
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
|
Tags: museums, archives, GLAM, collections, repository
|
||||||
Requires at least: 5.9
|
Requires at least: 5.9
|
||||||
Tested up to: 6.4
|
Tested up to: 6.5
|
||||||
Requires PHP: 7.0
|
Requires PHP: 7.0
|
||||||
Stable tag: 0.20.8
|
Stable tag: 0.21.0
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
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.
|
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: Tainacan.org
|
||||||
Author URI: https://tainacan.org/
|
Author URI: https://tainacan.org/
|
||||||
Version: 0.20.8
|
Version: 0.21.0
|
||||||
Requires at least: 5.9
|
Requires at least: 5.9
|
||||||
Tested up to: 6.4
|
Tested up to: 6.5
|
||||||
Requires PHP: 7.0
|
Requires PHP: 7.0
|
||||||
Stable tag: 0.20.8
|
Stable tag: 0.21.0
|
||||||
Text Domain: tainacan
|
Text Domain: tainacan
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
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!' );
|
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
||||||
$TAINACAN_BASE_URL = plugins_url('', __FILE__);
|
$TAINACAN_BASE_URL = plugins_url('', __FILE__);
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
:is-menu-compressed="isMenuCompressed" />
|
:is-menu-compressed="isMenuCompressed" />
|
||||||
<button
|
<button
|
||||||
v-if="!$adminOptions.hidePrimaryMenu && !$adminOptions.hidePrimaryMenuCompressButton"
|
v-if="!$adminOptions.hidePrimaryMenu && !$adminOptions.hidePrimaryMenuCompressButton"
|
||||||
class="is-hidden-mobile"
|
|
||||||
id="menu-compress-button"
|
id="menu-compress-button"
|
||||||
|
class="is-hidden-mobile"
|
||||||
:style="{ top: menuCompressButtonTop }"
|
:style="{ top: menuCompressButtonTop }"
|
||||||
@click="isMenuCompressed = !isMenuCompressed"
|
:aria-label="$i18n.get('label_shrink_menu')"
|
||||||
:aria-label="$i18n.get('label_shrink_menu')">
|
@click="isMenuCompressed = !isMenuCompressed">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('label_shrink_menu'),
|
content: $i18n.get('label_shrink_menu'),
|
||||||
|
@ -54,7 +54,6 @@
|
||||||
import TainacanHeader from './components/navigation/tainacan-header.vue';
|
import TainacanHeader from './components/navigation/tainacan-header.vue';
|
||||||
import TainacanRepositorySubheader from './components/navigation/tainacan-repository-subheader.vue';
|
import TainacanRepositorySubheader from './components/navigation/tainacan-repository-subheader.vue';
|
||||||
import CustomDialog from './components/other/custom-dialog.vue';
|
import CustomDialog from './components/other/custom-dialog.vue';
|
||||||
import "floating-vue/dist/style.css";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AdminPage",
|
name: "AdminPage",
|
||||||
|
@ -63,6 +62,10 @@
|
||||||
TainacanHeader,
|
TainacanHeader,
|
||||||
TainacanRepositorySubheader
|
TainacanRepositorySubheader
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'onCollectionBreadCrumbUpdate',
|
||||||
|
'openProcessesPopup'
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
isMenuCompressed: false,
|
isMenuCompressed: false,
|
||||||
|
@ -92,10 +95,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route' (to) {
|
'$route': {
|
||||||
|
handler(to) {
|
||||||
this.isMenuCompressed = (to.params.collectionId != undefined);
|
this.isMenuCompressed = (to.params.collectionId != undefined);
|
||||||
this.activeRoute = to.name;
|
this.activeRoute = to.name;
|
||||||
this.isRepositoryLevel = this.$route.params.collectionId == undefined;
|
this.isRepositoryLevel = this.$route.params.collectionId == undefined;
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -139,6 +145,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@import url('floating-vue/dist/style.css');
|
||||||
|
|
||||||
.is-fullheight {
|
.is-fullheight {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
:message="$i18n.getHelperMessage('collections', 'name')" />
|
:message="$i18n.getHelperMessage('collections', 'name')" />
|
||||||
<b-input
|
<b-input
|
||||||
id="tainacan-text-name"
|
id="tainacan-text-name"
|
||||||
:placeholder="$i18n.get('instruction_collection_name')"
|
|
||||||
v-model="form.name"
|
v-model="form.name"
|
||||||
|
:placeholder="$i18n.get('instruction_collection_name')"
|
||||||
@blur="updateSlug"
|
@blur="updateSlug"
|
||||||
@focus="clearErrors('name')" />
|
@focus="clearErrors('name')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
<!-- Hook for extra Form options -->
|
<!-- Hook for extra Form options -->
|
||||||
<template v-if="hasBeginLeftForm">
|
<template v-if="hasBeginLeftForm">
|
||||||
<form
|
<form
|
||||||
class="form-hook-region"
|
|
||||||
id="form-collection-begin-left"
|
id="form-collection-begin-left"
|
||||||
|
class="form-hook-region"
|
||||||
v-html="getBeginLeftForm" />
|
v-html="getBeginLeftForm" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -50,10 +50,10 @@
|
||||||
:message="$i18n.getHelperMessage('collections', 'description')" />
|
:message="$i18n.getHelperMessage('collections', 'description')" />
|
||||||
<b-input
|
<b-input
|
||||||
id="tainacan-text-description"
|
id="tainacan-text-description"
|
||||||
|
v-model="form.description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="4"
|
rows="4"
|
||||||
:placeholder="$i18n.get('instruction_collection_description')"
|
:placeholder="$i18n.get('instruction_collection_description')"
|
||||||
v-model="form.description"
|
|
||||||
@focus="clearErrors('description')" />
|
@focus="clearErrors('description')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
|
@ -68,17 +68,17 @@
|
||||||
:message="$i18n.getHelperMessage('collections', 'slug')" />
|
:message="$i18n.getHelperMessage('collections', 'slug')" />
|
||||||
<b-input
|
<b-input
|
||||||
id="tainacan-text-slug"
|
id="tainacan-text-slug"
|
||||||
@input="updateSlug"
|
|
||||||
v-model="form.slug"
|
v-model="form.slug"
|
||||||
@focus="clearErrors('slug')"
|
|
||||||
:disabled="isUpdatingSlug"
|
:disabled="isUpdatingSlug"
|
||||||
:loading="isUpdatingSlug"/>
|
:loading="isUpdatingSlug"
|
||||||
|
@update:model-value="updateSlug"
|
||||||
|
@focus="clearErrors('slug')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<!-- Items list options ------------------------ -->
|
<!-- Items list options ------------------------ -->
|
||||||
<div
|
<div
|
||||||
@click="showItemsListOptions = !showItemsListOptions;"
|
class="collection-form-section"
|
||||||
class="collection-form-section">
|
@click="showItemsListOptions = !showItemsListOptions;">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i
|
<i
|
||||||
class="tainacan-icon"
|
class="tainacan-icon"
|
||||||
|
@ -126,14 +126,14 @@
|
||||||
{{ $i18n.get('info_by_inner') }}
|
{{ $i18n.get('info_by_inner') }}
|
||||||
</span>
|
</span>
|
||||||
<b-select
|
<b-select
|
||||||
expanded
|
id="tainacan-select-default_orderby"
|
||||||
:loading="isLoadingMetadata"
|
|
||||||
v-model="localDefaultOrderBy"
|
v-model="localDefaultOrderBy"
|
||||||
id="tainacan-select-default_orderby">
|
expanded
|
||||||
|
:loading="isLoadingMetadata">
|
||||||
<option
|
<option
|
||||||
v-for="metadatum of sortingMetadata"
|
v-for="metadatum of sortingMetadata"
|
||||||
:value="metadatum.id"
|
:key="metadatum.id"
|
||||||
:key="metadatum.id">
|
:value="metadatum.id">
|
||||||
{{ metadatum.name }}
|
{{ metadatum.name }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
|
@ -152,16 +152,16 @@
|
||||||
:message="$i18n.getHelperMessage('collections', 'enabled_view_modes')" />
|
:message="$i18n.getHelperMessage('collections', 'enabled_view_modes')" />
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
class="enabled-view-modes-dropdown"
|
|
||||||
ref="enabledViewModesDropdown"
|
ref="enabledViewModesDropdown"
|
||||||
|
class="enabled-view-modes-dropdown"
|
||||||
:mobile-modal="true"
|
:mobile-modal="true"
|
||||||
:disabled="Object.keys(registeredViewModes).length < 0"
|
:disabled="Object.keys(registeredViewModes).length < 0"
|
||||||
aria-role="list"
|
aria-role="list"
|
||||||
trap-focus
|
trap-focus
|
||||||
position="is-top-right">
|
position="is-top-right">
|
||||||
|
<template #trigger>
|
||||||
<button
|
<button
|
||||||
class="button is-white"
|
class="button is-white"
|
||||||
slot="trigger"
|
|
||||||
position="is-top-right"
|
position="is-top-right"
|
||||||
type="button">
|
type="button">
|
||||||
<span>{{ $i18n.get('label_enabled_view_modes') }}</span>
|
<span>{{ $i18n.get('label_enabled_view_modes') }}</span>
|
||||||
|
@ -169,6 +169,7 @@
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
</template>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
v-for="(viewMode, index) in Object.keys(registeredViewModes)"
|
v-for="(viewMode, index) in Object.keys(registeredViewModes)"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -176,9 +177,9 @@
|
||||||
aria-role="listitem">
|
aria-role="listitem">
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
v-if="registeredViewModes[viewMode] != undefined"
|
v-if="registeredViewModes[viewMode] != undefined"
|
||||||
@input="updateViewModeslist(viewMode)"
|
:model-value="checkIfViewModeEnabled(viewMode)"
|
||||||
:value="checkIfViewModeEnabled(viewMode)"
|
:disabled="checkIfViewModeEnabled(viewMode) && form.enabled_view_modes.filter((aViewMode) => (registeredViewModes[aViewMode] && registeredViewModes[aViewMode].full_screen != true)).length <= 1"
|
||||||
:disabled="checkIfViewModeEnabled(viewMode) && form.enabled_view_modes.filter((aViewMode) => (registeredViewModes[aViewMode] && registeredViewModes[aViewMode].full_screen != true)).length <= 1">
|
@update:model-value="updateViewModeslist(viewMode)">
|
||||||
<p>
|
<p>
|
||||||
<strong>
|
<strong>
|
||||||
<span
|
<span
|
||||||
|
@ -191,7 +192,9 @@
|
||||||
{{ registeredViewModes[viewMode].label }}
|
{{ registeredViewModes[viewMode].label }}
|
||||||
</strong>
|
</strong>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="registeredViewModes[viewMode].description">{{ registeredViewModes[viewMode].description }}</p>
|
<p v-if="registeredViewModes[viewMode].description">
|
||||||
|
{{ registeredViewModes[viewMode].description }}
|
||||||
|
</p>
|
||||||
</b-checkbox>
|
</b-checkbox>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
|
@ -209,9 +212,9 @@
|
||||||
:title="$i18n.getHelperTitle('collections', 'default_view_mode')"
|
:title="$i18n.getHelperTitle('collections', 'default_view_mode')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'default_view_mode')" />
|
:message="$i18n.getHelperMessage('collections', 'default_view_mode')" />
|
||||||
<b-select
|
<b-select
|
||||||
expanded
|
|
||||||
id="tainacan-select-default_view_mode"
|
id="tainacan-select-default_view_mode"
|
||||||
v-model="form.default_view_mode"
|
v-model="form.default_view_mode"
|
||||||
|
expanded
|
||||||
@focus="clearErrors('default_view_mode')">
|
@focus="clearErrors('default_view_mode')">
|
||||||
<option
|
<option
|
||||||
v-for="(viewMode, index) of validDefaultViewModes"
|
v-for="(viewMode, index) of validDefaultViewModes"
|
||||||
|
@ -230,10 +233,10 @@
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-hide-items-thumbnail-on-lists"
|
id="tainacan-checkbox-hide-items-thumbnail-on-lists"
|
||||||
|
v-model="form.hide_items_thumbnail_on_lists"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no" />
|
||||||
v-model="form.hide_items_thumbnail_on_lists" />
|
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'hide_items_thumbnail_on_lists')"
|
:title="$i18n.getHelperTitle('collections', 'hide_items_thumbnail_on_lists')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'hide_items_thumbnail_on_lists')" />
|
:message="$i18n.getHelperMessage('collections', 'hide_items_thumbnail_on_lists')" />
|
||||||
|
@ -244,8 +247,8 @@
|
||||||
|
|
||||||
<!-- Item edition form options ------------------------ -->
|
<!-- Item edition form options ------------------------ -->
|
||||||
<div
|
<div
|
||||||
@click="showItemEditionFormOptions = !showItemEditionFormOptions;"
|
class="collection-form-section"
|
||||||
class="collection-form-section">
|
@click="showItemEditionFormOptions = !showItemEditionFormOptions;">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i
|
<i
|
||||||
class="tainacan-icon"
|
class="tainacan-icon"
|
||||||
|
@ -304,10 +307,10 @@
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-item-enable-thumbnail"
|
id="tainacan-checkbox-item-enable-thumbnail"
|
||||||
|
v-model="form.item_enable_thumbnail"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no" />
|
||||||
v-model="form.item_enable_thumbnail" />
|
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'item_enable_thumbnail')"
|
:title="$i18n.getHelperTitle('collections', 'item_enable_thumbnail')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'item_enable_thumbnail')" />
|
:message="$i18n.getHelperMessage('collections', 'item_enable_thumbnail')" />
|
||||||
|
@ -335,10 +338,10 @@
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-item-enable-attachments"
|
id="tainacan-checkbox-item-enable-attachments"
|
||||||
|
v-model="form.item_enable_attachments"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no" />
|
||||||
v-model="form.item_enable_attachments" />
|
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'item_enable_attachments')"
|
:title="$i18n.getHelperTitle('collections', 'item_enable_attachments')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'item_enable_attachments')" />
|
:message="$i18n.getHelperMessage('collections', 'item_enable_attachments')" />
|
||||||
|
@ -403,10 +406,10 @@
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-comment-status"
|
id="tainacan-checkbox-comment-status"
|
||||||
|
v-model="form.allow_comments"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="open"
|
true-value="open"
|
||||||
false-value="closed"
|
false-value="closed" />
|
||||||
v-model="form.allow_comments" />
|
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'allow_comments')"
|
:title="$i18n.getHelperTitle('collections', 'allow_comments')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'allow_comments')" />
|
:message="$i18n.getHelperMessage('collections', 'allow_comments')" />
|
||||||
|
@ -417,8 +420,8 @@
|
||||||
|
|
||||||
<!-- Item submission options ------------------------ -->
|
<!-- Item submission options ------------------------ -->
|
||||||
<div
|
<div
|
||||||
@click="showItemSubmissionOptions = !showItemSubmissionOptions;"
|
class="collection-form-section"
|
||||||
class="collection-form-section">
|
@click="showItemSubmissionOptions = !showItemSubmissionOptions;">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i
|
<i
|
||||||
class="tainacan-icon"
|
class="tainacan-icon"
|
||||||
|
@ -442,10 +445,10 @@
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-allow-submission"
|
id="tainacan-checkbox-allow-submission"
|
||||||
|
v-model="form.allows_submission"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no" />
|
||||||
v-model="form.allows_submission" />
|
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'allows_submission')"
|
:title="$i18n.getHelperTitle('collections', 'allows_submission')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'allows_submission')" />
|
:message="$i18n.getHelperMessage('collections', 'allows_submission')" />
|
||||||
|
@ -465,10 +468,10 @@
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-allow-submission"
|
id="tainacan-checkbox-allow-submission"
|
||||||
|
v-model="form.submission_anonymous_user"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no" />
|
||||||
v-model="form.submission_anonymous_user" />
|
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'submission_anonymous_user')"
|
:title="$i18n.getHelperTitle('collections', 'submission_anonymous_user')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'submission_anonymous_user')" />
|
:message="$i18n.getHelperMessage('collections', 'submission_anonymous_user')" />
|
||||||
|
@ -485,9 +488,9 @@
|
||||||
:message="$i18n.getHelperMessage('collections', 'submission_default_status')" />
|
:message="$i18n.getHelperMessage('collections', 'submission_default_status')" />
|
||||||
<div class="options-checkboxes">
|
<div class="options-checkboxes">
|
||||||
<b-radio
|
<b-radio
|
||||||
v-model="form.submission_default_status"
|
|
||||||
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'trash')"
|
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'trash')"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
v-model="form.submission_default_status"
|
||||||
:native-value="statusOption.slug">
|
:native-value="statusOption.slug">
|
||||||
<span class="icon has-text-gray">
|
<span class="icon has-text-gray">
|
||||||
<i
|
<i
|
||||||
|
@ -499,8 +502,8 @@
|
||||||
</div>
|
</div>
|
||||||
<transition name="filter-item">
|
<transition name="filter-item">
|
||||||
<p
|
<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') }}
|
{{ $i18n.get('info_item_submission_draft_status') }}
|
||||||
</p>
|
</p>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -515,10 +518,10 @@
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-submission-use-recaptcha"
|
id="tainacan-checkbox-submission-use-recaptcha"
|
||||||
|
v-model="form.submission_use_recaptcha"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no" />
|
||||||
v-model="form.submission_use_recaptcha" />
|
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'submission_use_recaptcha')"
|
:title="$i18n.getHelperTitle('collections', 'submission_use_recaptcha')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'submission_use_recaptcha')" />
|
:message="$i18n.getHelperMessage('collections', 'submission_use_recaptcha')" />
|
||||||
|
@ -537,8 +540,8 @@
|
||||||
<!-- Hook for extra Form options -->
|
<!-- Hook for extra Form options -->
|
||||||
<template v-if="hasEndLeftForm">
|
<template v-if="hasEndLeftForm">
|
||||||
<form
|
<form
|
||||||
ref="form-collection-end-left"
|
|
||||||
id="form-collection-end-left"
|
id="form-collection-end-left"
|
||||||
|
ref="form-collection-end-left"
|
||||||
class="form-hook-region"
|
class="form-hook-region"
|
||||||
v-html="getEndLeftForm" />
|
v-html="getEndLeftForm" />
|
||||||
</template>
|
</template>
|
||||||
|
@ -557,9 +560,9 @@
|
||||||
:message="$i18n.getHelperMessage('collections', 'status')" />
|
:message="$i18n.getHelperMessage('collections', 'status')" />
|
||||||
<div class="status-radios">
|
<div class="status-radios">
|
||||||
<b-radio
|
<b-radio
|
||||||
v-model="form.status"
|
|
||||||
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'draft')"
|
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'draft')"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
v-model="form.status"
|
||||||
:native-value="statusOption.slug">
|
:native-value="statusOption.slug">
|
||||||
<span class="icon has-text-gray">
|
<span class="icon has-text-gray">
|
||||||
<i
|
<i
|
||||||
|
@ -600,8 +603,8 @@
|
||||||
</figure>
|
</figure>
|
||||||
<div class="header-buttons-row">
|
<div class="header-buttons-row">
|
||||||
<a
|
<a
|
||||||
class="button is-rounded is-secondary"
|
|
||||||
id="button-edit-header-image"
|
id="button-edit-header-image"
|
||||||
|
class="button is-rounded is-secondary"
|
||||||
:aria-label="$i18n.get('label_button_edit_header_image')"
|
:aria-label="$i18n.get('label_button_edit_header_image')"
|
||||||
@click="headerImageMediaFrame.openFrame($event)">
|
@click="headerImageMediaFrame.openFrame($event)">
|
||||||
<span
|
<span
|
||||||
|
@ -616,8 +619,8 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class="button is-rounded is-secondary"
|
|
||||||
id="button-delete-header-image"
|
id="button-delete-header-image"
|
||||||
|
class="button is-rounded is-secondary"
|
||||||
:aria-label="$i18n.get('label_button_delete_thumb')"
|
:aria-label="$i18n.get('label_button_delete_thumb')"
|
||||||
@click="deleteHeaderImage()">
|
@click="deleteHeaderImage()">
|
||||||
<span
|
<span
|
||||||
|
@ -657,8 +660,8 @@
|
||||||
</figure>
|
</figure>
|
||||||
<div class="thumbnail-buttons-row">
|
<div class="thumbnail-buttons-row">
|
||||||
<a
|
<a
|
||||||
class="button is-rounded is-secondary"
|
|
||||||
id="button-edit-thumbnail"
|
id="button-edit-thumbnail"
|
||||||
|
class="button is-rounded is-secondary"
|
||||||
:aria-label="$i18n.get('label_button_edit_thumb')"
|
:aria-label="$i18n.get('label_button_edit_thumb')"
|
||||||
@click.prevent="thumbnailMediaFrame.openFrame($event)">
|
@click.prevent="thumbnailMediaFrame.openFrame($event)">
|
||||||
<span
|
<span
|
||||||
|
@ -673,8 +676,8 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class="button is-rounded is-secondary"
|
|
||||||
id="button-delete-header-image"
|
id="button-delete-header-image"
|
||||||
|
class="button is-rounded is-secondary"
|
||||||
:aria-label="$i18n.get('label_button_delete_thumb')"
|
:aria-label="$i18n.get('label_button_delete_thumb')"
|
||||||
@click="deleteThumbnail()">
|
@click="deleteThumbnail()">
|
||||||
<span
|
<span
|
||||||
|
@ -701,30 +704,32 @@
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-cover-page"
|
id="tainacan-checkbox-cover-page"
|
||||||
|
v-model="form.enable_cover_page"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no" />
|
||||||
v-model="form.enable_cover_page" />
|
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('collections', 'cover_page_id')"
|
:title="$i18n.getHelperTitle('collections', 'cover_page_id')"
|
||||||
:message="$i18n.getHelperMessage('collections', 'cover_page_id')" />
|
:message="$i18n.getHelperMessage('collections', 'cover_page_id')" />
|
||||||
<template v-if="form.enable_cover_page == 'yes'">
|
<template v-if="form.enable_cover_page == 'yes'">
|
||||||
<b-autocomplete
|
<b-autocomplete
|
||||||
|
v-if="coverPage == undefined || coverPage.title == undefined"
|
||||||
id="tainacan-text-cover-page"
|
id="tainacan-text-cover-page"
|
||||||
|
v-model="coverPageTitle"
|
||||||
:placeholder="$i18n.get('instruction_cover_page')"
|
:placeholder="$i18n.get('instruction_cover_page')"
|
||||||
:data="coverPages"
|
:data="coverPages"
|
||||||
v-model="coverPageTitle"
|
|
||||||
@select="onSelectCoverPage($event)"
|
|
||||||
:loading="isFetchingPages"
|
:loading="isFetchingPages"
|
||||||
@input="fecthCoverPages"
|
|
||||||
@focus="clearErrors('cover_page_id')"
|
|
||||||
v-if="coverPage == undefined || coverPage.title == undefined"
|
|
||||||
check-infinite-scroll
|
check-infinite-scroll
|
||||||
|
@select="onSelectCoverPage($event)"
|
||||||
|
@update:model-value="fecthCoverPages"
|
||||||
|
@focus="clearErrors('cover_page_id')"
|
||||||
@infinite-scroll="fetchMoreCoverPages">
|
@infinite-scroll="fetchMoreCoverPages">
|
||||||
<template slot-scope="props">
|
<template #default="props">
|
||||||
{{ props.option.title.rendered }}
|
{{ props.option.title.rendered }}
|
||||||
</template>
|
</template>
|
||||||
<template slot="empty">{{ $i18n.get('info_no_page_found') }}</template>
|
<template #empty>
|
||||||
|
{{ $i18n.get('info_no_page_found') }}
|
||||||
|
</template>
|
||||||
</b-autocomplete>
|
</b-autocomplete>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
@ -844,28 +849,30 @@
|
||||||
type="button"
|
type="button"
|
||||||
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
<p class="help is-danger">
|
||||||
|
{{ formErrorMessage }}
|
||||||
|
</p>
|
||||||
<div
|
<div
|
||||||
style="margin-left: auto;"
|
style="margin-left: auto;"
|
||||||
class="control">
|
class="control">
|
||||||
<button
|
<button
|
||||||
v-if="isNewCollection && $userCaps.hasCapability('tnc_rep_edit_metadata') && !fromImporter"
|
v-if="isNewCollection && $userCaps.hasCapability('tnc_rep_edit_metadata') && !fromImporter"
|
||||||
id="button-submit-goto-metadata"
|
id="button-submit-goto-metadata"
|
||||||
@click.prevent="onSubmit('metadata')"
|
class="button is-secondary"
|
||||||
class="button is-secondary">{{ $i18n.get('label_save_goto_metadata') }}</button>
|
@click.prevent="onSubmit('metadata')">{{ $i18n.get('label_save_goto_metadata') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
v-if="isNewCollection && $userCaps.hasCapability('tnc_rep_edit_metadata') && !fromImporter"
|
v-if="isNewCollection && $userCaps.hasCapability('tnc_rep_edit_metadata') && !fromImporter"
|
||||||
id="button-submit-goto-filter"
|
id="button-submit-goto-filter"
|
||||||
@click.prevent="onSubmit('filters')"
|
class="button is-secondary"
|
||||||
class="button is-secondary">{{ $i18n.get('label_save_goto_filter') }}</button>
|
@click.prevent="onSubmit('filters')">{{ $i18n.get('label_save_goto_filter') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
id="button-submit-collection-creation"
|
id="button-submit-collection-creation"
|
||||||
@click.prevent="onSubmit('items')"
|
class="button is-success"
|
||||||
class="button is-success">{{ $i18n.get('finish') }}</button>
|
@click.prevent="onSubmit('items')">{{ $i18n.get('finish') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</form>
|
</form>
|
||||||
|
@ -884,26 +891,27 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<b-loading
|
<b-loading
|
||||||
:active.sync="isLoading"
|
v-model="isLoading"
|
||||||
:can-cancel="false" />
|
:can-cancel="false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { nextTick } from 'vue';
|
||||||
import { mapGetters, mapActions } from 'vuex';
|
import { mapGetters, mapActions } from 'vuex';
|
||||||
import wpMediaFrames from '../../js/wp-media-frames';
|
import wpMediaFrames from '../../js/wp-media-frames';
|
||||||
import FileItem from '../other/file-item.vue';
|
import FileItem from '../other/file-item.vue';
|
||||||
import { wpAjax, formHooks } from '../../js/mixins';
|
import { permalinkGetter, formHooks } from '../../js/mixins';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CollectionEditionForm',
|
name: 'CollectionEditionForm',
|
||||||
components: {
|
components: {
|
||||||
FileItem
|
FileItem
|
||||||
},
|
},
|
||||||
mixins: [ wpAjax, formHooks ],
|
mixins: [ permalinkGetter, formHooks ],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
collection: null,
|
collection: null,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
form: {
|
form: {
|
||||||
|
@ -1027,7 +1035,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
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)
|
if (this.$route.query.fromImporter != undefined)
|
||||||
|
@ -1050,7 +1058,7 @@ export default {
|
||||||
|
|
||||||
// Initializes Media Frames now that collectonId exists
|
// Initializes Media Frames now that collectonId exists
|
||||||
this.initializeMediaFrames();
|
this.initializeMediaFrames();
|
||||||
this.$nextTick()
|
nextTick()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// Fills hook forms with it's real values
|
// Fills hook forms with it's real values
|
||||||
this.updateExtraFormData(this.collection);
|
this.updateExtraFormData(this.collection);
|
||||||
|
@ -1300,7 +1308,7 @@ export default {
|
||||||
this.form.default_view_mode = this.collection.default_view_mode;
|
this.form.default_view_mode = this.collection.default_view_mode;
|
||||||
this.form.default_order = this.collection.default_order;
|
this.form.default_order = this.collection.default_order;
|
||||||
this.form.default_orderby = this.collection.default_orderby;
|
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.allow_comments = this.collection.allow_comments;
|
||||||
this.form.allows_submission = this.collection.allows_submission;
|
this.form.allows_submission = this.collection.allows_submission;
|
||||||
this.form.submission_anonymous_user = this.collection.submission_anonymous_user;
|
this.form.submission_anonymous_user = this.collection.submission_anonymous_user;
|
||||||
|
@ -1715,7 +1723,7 @@ export default {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
img,
|
img,
|
||||||
/deep/ .image-wrapper {
|
:deep(.image-wrapper) {
|
||||||
height: 146px;
|
height: 146px;
|
||||||
width: 146px;
|
width: 146px;
|
||||||
border: 6px solid var(--tainacan-background-color);
|
border: 6px solid var(--tainacan-background-color);
|
||||||
|
@ -1794,7 +1802,8 @@ export default {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
/deep/ .b-checkbox.checkbox {
|
:deep(.b-checkbox.checkbox),
|
||||||
|
:deep(.b-radio.radio) {
|
||||||
width: auto
|
width: auto
|
||||||
}
|
}
|
||||||
.control-label {
|
.control-label {
|
||||||
|
@ -1836,13 +1845,13 @@ export default {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 101;
|
z-index: 101;
|
||||||
|
|
||||||
/deep/ .dropdown-item {
|
:deep(.dropdown-item) {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
/deep/ svg {
|
:deep(svg) {
|
||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
{ path: '', label: exporterType != undefined ? (exporterName != undefined ? exporterName : exporterType) : $i18n.get('title_exporter_page') }
|
{ path: '', label: exporterType != undefined ? (exporterName != undefined ? exporterName : exporterType) : $i18n.get('title_exporter_page') }
|
||||||
]" />
|
]" />
|
||||||
<b-loading
|
<b-loading
|
||||||
:active.sync="isLoading"
|
v-model="isLoading"
|
||||||
:can-cancel="false" />
|
:can-cancel="false" />
|
||||||
<form
|
<form
|
||||||
@click="formErrorMessage = ''"
|
|
||||||
label-width="120px"
|
|
||||||
v-if="exporterSession"
|
v-if="exporterSession"
|
||||||
class="tainacan-form">
|
label-width="120px"
|
||||||
|
class="tainacan-form"
|
||||||
|
@click="formErrorMessage = ''">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
|
||||||
<div class="column is-gapless">
|
<div class="column is-gapless">
|
||||||
|
@ -34,38 +34,38 @@
|
||||||
extra-classes="tainacan-repository-tooltip" />
|
extra-classes="tainacan-repository-tooltip" />
|
||||||
<br>
|
<br>
|
||||||
<b-select
|
<b-select
|
||||||
@input="formErrorMessage = null"
|
|
||||||
expanded
|
|
||||||
v-model="selectedCollection"
|
v-model="selectedCollection"
|
||||||
|
expanded
|
||||||
:loading="isFetchingCollections"
|
:loading="isFetchingCollections"
|
||||||
:placeholder="$i18n.get('instruction_select_a_collection')">
|
:placeholder="$i18n.get('instruction_select_a_collection')"
|
||||||
|
@update:model-value="formErrorMessage = null">
|
||||||
<option
|
<option
|
||||||
v-for="collection in collections"
|
v-for="collection in collections"
|
||||||
:value="collection.id"
|
:key="collection.id"
|
||||||
:key="collection.id">
|
:value="collection.id">
|
||||||
{{ collection.name }}
|
{{ collection.name }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-field
|
<b-field
|
||||||
class="is-block"
|
|
||||||
v-if="Object.keys(exporterSession).length &&
|
v-if="Object.keys(exporterSession).length &&
|
||||||
Object.keys(exporterSession.mapping_accept).length &&
|
Object.keys(exporterSession.mapping_accept).length &&
|
||||||
exporterSession.mapping_list.length"
|
exporterSession.mapping_list.length"
|
||||||
|
class="is-block"
|
||||||
:label="$i18n.get('mapping')">
|
:label="$i18n.get('mapping')">
|
||||||
<b-select
|
<b-select
|
||||||
@input="formErrorMessage = null"
|
|
||||||
expanded
|
|
||||||
v-model="selectedMapping"
|
v-model="selectedMapping"
|
||||||
:placeholder="$i18n.get('instruction_select_a_mapper')">
|
expanded
|
||||||
|
:placeholder="$i18n.get('instruction_select_a_mapper')"
|
||||||
|
@update:model-value="formErrorMessage = null">
|
||||||
<option
|
<option
|
||||||
v-if="exporterSession.accept_no_mapping"
|
v-if="exporterSession.accept_no_mapping"
|
||||||
:value="''">{{ $i18n.get('label_no_mapping') }}</option>
|
:value="''">{{ $i18n.get('label_no_mapping') }}</option>
|
||||||
<option
|
<option
|
||||||
v-for="(mapping) in exporterSession.mapping_list"
|
v-for="(mapping) in exporterSession.mapping_list"
|
||||||
:value="mapping"
|
:key="mapping"
|
||||||
:key="mapping">
|
:value="mapping">
|
||||||
{{ mapping.replace(/-/, ' ') }}
|
{{ mapping.replace(/-/, ' ') }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</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>'"
|
: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" />
|
extra-classes="tainacan-repository-tooltip" />
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
|
v-model="sendEmail"
|
||||||
true-value="1"
|
true-value="1"
|
||||||
false-value="0"
|
false-value="0"
|
||||||
v-model="sendEmail"
|
@update:model-value="formErrorMessage = null">
|
||||||
@input="formErrorMessage = null">
|
|
||||||
{{ $i18n.get('label_yes') }}
|
{{ $i18n.get('label_yes') }}
|
||||||
</b-checkbox>
|
</b-checkbox>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
@ -93,17 +93,17 @@
|
||||||
|
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button
|
<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') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button
|
<button
|
||||||
:class="{'is-loading': runButtonLoading}"
|
:class="{'is-loading': runButtonLoading}"
|
||||||
@click.prevent="runExporter()"
|
|
||||||
:disabled="!formIsValid()"
|
:disabled="!formIsValid()"
|
||||||
class="button is-pulled-right is-success">
|
class="button is-pulled-right is-success"
|
||||||
|
@click.prevent="runExporter()">
|
||||||
{{ $i18n.get('run') }}
|
{{ $i18n.get('run') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
:message="$i18n.getHelperMessage('filters', 'description')" />
|
:message="$i18n.getHelperMessage('filters', 'description')" />
|
||||||
</label>
|
</label>
|
||||||
<b-input
|
<b-input
|
||||||
|
v-model="form.description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
name="description"
|
name="description"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
v-model="form.description"
|
|
||||||
@focus="clearErrors('description')" />
|
@focus="clearErrors('description')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="inline-block">
|
<div class="inline-block">
|
||||||
<b-radio
|
<b-radio
|
||||||
@focus="clearErrors('label_status')"
|
|
||||||
id="tainacan-select-status-publish"
|
id="tainacan-select-status-publish"
|
||||||
name="status"
|
|
||||||
v-model="form.status"
|
v-model="form.status"
|
||||||
native-value="publish">
|
name="status"
|
||||||
|
native-value="publish"
|
||||||
|
@focus="clearErrors('label_status')">
|
||||||
<span class="icon has-text-gray3">
|
<span class="icon has-text-gray3">
|
||||||
<i class="tainacan-icon tainacan-icon-public" />
|
<i class="tainacan-icon tainacan-icon-public" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -73,11 +73,11 @@
|
||||||
</b-radio>
|
</b-radio>
|
||||||
<br>
|
<br>
|
||||||
<b-radio
|
<b-radio
|
||||||
@focus="clearErrors('label_status')"
|
|
||||||
id="tainacan-select-status-private"
|
id="tainacan-select-status-private"
|
||||||
name="status"
|
|
||||||
v-model="form.status"
|
v-model="form.status"
|
||||||
native-value="private">
|
name="status"
|
||||||
|
native-value="private"
|
||||||
|
@focus="clearErrors('label_status')">
|
||||||
<span class="icon has-text-gray3">
|
<span class="icon has-text-gray3">
|
||||||
<i class="tainacan-icon tainacan-icon-private" />
|
<i class="tainacan-icon tainacan-icon-private" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -87,8 +87,8 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<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">
|
<label class="label is-inline">
|
||||||
{{ $i18n.get('label_max_options_to_show') }}
|
{{ $i18n.get('label_max_options_to_show') }}
|
||||||
<help-button
|
<help-button
|
||||||
|
@ -100,12 +100,18 @@
|
||||||
v-if="!showEditMaxOptions"
|
v-if="!showEditMaxOptions"
|
||||||
class="is-flex">
|
class="is-flex">
|
||||||
<b-select
|
<b-select
|
||||||
name="max_options"
|
|
||||||
v-model="form.max_options"
|
v-model="form.max_options"
|
||||||
|
name="max_options"
|
||||||
:placeholder="$i18n.get('instruction_select_max_options_to_show')">
|
:placeholder="$i18n.get('instruction_select_max_options_to_show')">
|
||||||
<option value="4">4</option>
|
<option value="4">
|
||||||
<option value="8">8</option>
|
4
|
||||||
<option value="12">12</option>
|
</option>
|
||||||
|
<option value="8">
|
||||||
|
8
|
||||||
|
</option>
|
||||||
|
<option value="12">
|
||||||
|
12
|
||||||
|
</option>
|
||||||
<option
|
<option
|
||||||
v-if="form.max_options && ![4,8,12].find( (element) => element == form.max_options )"
|
v-if="form.max_options && ![4,8,12].find( (element) => element == form.max_options )"
|
||||||
:value="form.max_options">
|
:value="form.max_options">
|
||||||
|
@ -131,13 +137,13 @@
|
||||||
v-if="showEditMaxOptions"
|
v-if="showEditMaxOptions"
|
||||||
class="is-flex">
|
class="is-flex">
|
||||||
<b-input
|
<b-input
|
||||||
name="max_options"
|
|
||||||
v-model="form.max_options"
|
v-model="form.max_options"
|
||||||
|
name="max_options"
|
||||||
type="number"
|
type="number"
|
||||||
step="1" />
|
step="1" />
|
||||||
<button
|
<button
|
||||||
@click.prevent="showEditMaxOptions = false"
|
class="button is-white is-pulled-right"
|
||||||
class="button is-white is-pulled-right">
|
@click.prevent="showEditMaxOptions = false">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('close'),
|
content: $i18n.get('close'),
|
||||||
|
@ -159,13 +165,13 @@
|
||||||
:message="formErrors['begin_with_filter_collapsed'] != undefined ? formErrors['begin_with_filter_collapsed'] : ''">
|
:message="formErrors['begin_with_filter_collapsed'] != undefined ? formErrors['begin_with_filter_collapsed'] : ''">
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
size="is-small"
|
|
||||||
@input="clearErrors('begin_with_filter_collapsed')"
|
|
||||||
v-model="form.begin_with_filter_collapsed"
|
v-model="form.begin_with_filter_collapsed"
|
||||||
|
size="is-small"
|
||||||
:true-value="'yes'"
|
:true-value="'yes'"
|
||||||
:false-value="'no'"
|
:false-value="'no'"
|
||||||
:native-value="form.begin_with_filter_collapsed == 'yes' ? 'yes' : '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
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('filters', 'begin_with_filter_collapsed')"
|
:title="$i18n.getHelperTitle('filters', 'begin_with_filter_collapsed')"
|
||||||
:message="$i18n.getHelperMessage('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'] : ''">
|
:message="formErrors['display_in_repository_level_lists'] != undefined ? formErrors['display_in_repository_level_lists'] : ''">
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
size="is-small"
|
|
||||||
@input="clearErrors('display_in_repository_level_lists')"
|
|
||||||
v-model="form.display_in_repository_level_lists"
|
v-model="form.display_in_repository_level_lists"
|
||||||
|
size="is-small"
|
||||||
:true-value="'yes'"
|
:true-value="'yes'"
|
||||||
:false-value="'no'"
|
:false-value="'no'"
|
||||||
:native-value="form.display_in_repository_level_lists == 'yes' ? 'yes' : '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
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('filters', 'display_in_repository_level_lists')"
|
:title="$i18n.getHelperTitle('filters', 'display_in_repository_level_lists')"
|
||||||
:message="$i18n.getHelperMessage('filters', 'display_in_repository_level_lists')"
|
:message="$i18n.getHelperMessage('filters', 'display_in_repository_level_lists')"
|
||||||
|
@ -196,14 +202,14 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<component
|
<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"
|
:is="form.filter_type_object.form_component"
|
||||||
:filter="form"
|
v-if="(form.filter_type_object && form.filter_type_object.form_component) || form.edit_form == ''"
|
||||||
v-model="form.filter_type_options"/>
|
v-model="form.filter_type_options"
|
||||||
|
:errors="formErrors['filter_type_options']"
|
||||||
|
:filter="form" />
|
||||||
<div
|
<div
|
||||||
v-html="form.edit_form"
|
v-else
|
||||||
v-else/>
|
v-html="form.edit_form" />
|
||||||
|
|
||||||
<!-- Hook for extra Form options -->
|
<!-- Hook for extra Form options -->
|
||||||
<template v-if="hasEndLeftForm">
|
<template v-if="hasEndLeftForm">
|
||||||
|
@ -219,8 +225,9 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
@click.prevent="cancelEdition()"
|
@click.prevent="cancelEdition()">
|
||||||
slot="trigger">{{ $i18n.get('cancel') }}</button>
|
{{ $i18n.get('cancel') }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<b-button
|
<b-button
|
||||||
|
@ -231,22 +238,41 @@
|
||||||
</b-button>
|
</b-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
<p class="help is-danger">
|
||||||
|
{{ formErrorMessage }}
|
||||||
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { nextTick } from 'vue';
|
||||||
import { mapActions } from 'vuex';
|
import { mapActions } from 'vuex';
|
||||||
import { formHooks } from "../../js/mixins";
|
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 {
|
export default {
|
||||||
name: 'FilterEditionForm',
|
name: 'FilterEditionForm',
|
||||||
|
components: {
|
||||||
|
'tainacan-filter-form-numeric': FormFilterNumeric,
|
||||||
|
'tainacan-filter-form-numeric-interval': FormFilterNumericInterval,
|
||||||
|
'tainacan-filter-form-numeric-list-interval': FormFilterNumericListInterval
|
||||||
|
},
|
||||||
mixins: [ formHooks ],
|
mixins: [ formHooks ],
|
||||||
props: {
|
props: {
|
||||||
index: '',
|
index: '',
|
||||||
editedFilter: Object,
|
editedFilter: Object,
|
||||||
originalFilter: Object,
|
originalFilter: Object,
|
||||||
|
isRepositoryLevel: Boolean
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'on-update-saved-state',
|
||||||
|
'on-edition-finished',
|
||||||
|
'on-edition-canceled',
|
||||||
|
'on-error-found'
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
|
@ -259,7 +285,6 @@ export default {
|
||||||
isLoading: false
|
isLoading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
this.form = this.editedFilter;
|
this.form = this.editedFilter;
|
||||||
|
@ -270,20 +295,20 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// Fills hook forms with it's real values
|
// Fills hook forms with it's real values
|
||||||
this.$nextTick()
|
nextTick()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.updateExtraFormData(this.form);
|
this.updateExtraFormData(this.form);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.closedByForm) {
|
if (this.closedByForm) {
|
||||||
this.$emit('onUpdateSavedState', true);
|
this.$emit('on-update-saved-state', true);
|
||||||
} else {
|
} else {
|
||||||
this.oldForm.saved = this.form.saved;
|
this.oldForm.saved = this.form.saved;
|
||||||
if (JSON.stringify(this.form) != JSON.stringify(this.oldForm))
|
if (JSON.stringify(this.form) != JSON.stringify(this.oldForm))
|
||||||
this.$emit('onUpdateSavedState', false);
|
this.$emit('on-update-saved-state', false);
|
||||||
else
|
else
|
||||||
this.$emit('onUpdateSavedState', true);
|
this.$emit('on-update-saved-state', true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -310,7 +335,7 @@ export default {
|
||||||
this.formErrorMessage = '';
|
this.formErrorMessage = '';
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.closedByForm = true;
|
this.closedByForm = true;
|
||||||
this.$emit('onEditionFinished');
|
this.$emit('on-edition-finished');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
@ -319,7 +344,7 @@ export default {
|
||||||
this.formErrors[attribute] = error[attribute];
|
this.formErrors[attribute] = error[attribute];
|
||||||
}
|
}
|
||||||
this.formErrorMessage = errors.error_message;
|
this.formErrorMessage = errors.error_message;
|
||||||
this.$emit('onErrorFound');
|
this.$emit('on-error-found');
|
||||||
|
|
||||||
this.form.formErrors = this.formErrors;
|
this.form.formErrors = this.formErrors;
|
||||||
this.form.formErrorMessage = this.formErrorMessage;
|
this.form.formErrorMessage = this.formErrorMessage;
|
||||||
|
@ -349,7 +374,7 @@ export default {
|
||||||
this.formErrorMessage = '';
|
this.formErrorMessage = '';
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.closedByForm = true;
|
this.closedByForm = true;
|
||||||
this.$emit('onEditionFinished');
|
this.$emit('on-edition-finished');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
@ -358,7 +383,7 @@ export default {
|
||||||
this.formErrors[attribute] = error[attribute];
|
this.formErrors[attribute] = error[attribute];
|
||||||
}
|
}
|
||||||
this.formErrorMessage = errors.error_message;
|
this.formErrorMessage = errors.error_message;
|
||||||
this.$emit('onErrorFound');
|
this.$emit('on-error-found');
|
||||||
|
|
||||||
this.form.formErrors = this.formErrors;
|
this.form.formErrors = this.formErrors;
|
||||||
this.form.formErrorMessage = this.formErrorMessage;
|
this.form.formErrorMessage = this.formErrorMessage;
|
||||||
|
@ -370,7 +395,7 @@ export default {
|
||||||
},
|
},
|
||||||
cancelEdition() {
|
cancelEdition() {
|
||||||
this.closedByForm = true;
|
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') }
|
{ path: '', label: importerType != undefined ? (importerName != undefined ? importerName :importerType) : $i18n.get('title_importer_page') }
|
||||||
]" />
|
]" />
|
||||||
<form
|
<form
|
||||||
@click="formErrorMessage = ''"
|
v-if="importer != undefined && importer != null"
|
||||||
class="tainacan-form"
|
class="tainacan-form"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
v-if="importer != undefined && importer != null">
|
@click="formErrorMessage = ''">
|
||||||
<div
|
<div
|
||||||
v-if="importer.manual_collection || importer.accepts.file || importer.accepts.url"
|
v-if="importer.manual_collection || importer.accepts.file || importer.accepts.url"
|
||||||
class="columns">
|
class="columns">
|
||||||
|
@ -44,8 +44,8 @@
|
||||||
</section>
|
</section>
|
||||||
</b-upload>
|
</b-upload>
|
||||||
<div
|
<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>
|
<span>{{ (importerFile.length != undefined && importerFile.length > 0 ) ? importerFile[0].name : importerFile.name }}</span>
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
@ -63,8 +63,8 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
<p>{{ $i18n.get('label_select_file') + ': ' + importer.tmp_file }}</p>
|
||||||
</div>
|
</div>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
@ -107,12 +107,12 @@
|
||||||
<br>
|
<br>
|
||||||
<div class="is-inline">
|
<div class="is-inline">
|
||||||
<b-select
|
<b-select
|
||||||
expanded
|
|
||||||
id="tainacan-select-target-collection"
|
id="tainacan-select-target-collection"
|
||||||
:value="collectionId"
|
expanded
|
||||||
@input="onSelectCollection($event)"
|
:model-value="collectionId"
|
||||||
:loading="isFetchingCollections"
|
:loading="isFetchingCollections"
|
||||||
:placeholder="$i18n.get('instruction_select_a_target_collection')">
|
:placeholder="$i18n.get('instruction_select_a_target_collection')"
|
||||||
|
@update:model-value="onSelectCollection($event)">
|
||||||
<option
|
<option
|
||||||
v-for="collection of collections"
|
v-for="collection of collections"
|
||||||
:key="collection.id"
|
:key="collection.id"
|
||||||
|
@ -121,7 +121,6 @@
|
||||||
</b-select>
|
</b-select>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="$userCaps.hasCapability('tnc_rep_edit_collections')"
|
v-if="$userCaps.hasCapability('tnc_rep_edit_collections')"
|
||||||
tag="a"
|
|
||||||
style="font-size: 0.875em;"
|
style="font-size: 0.875em;"
|
||||||
class="add-link"
|
class="add-link"
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath(), query: { fromImporter: true }}">
|
:to="{ path: $routerHelper.getNewCollectionPath(), query: { fromImporter: true }}">
|
||||||
|
@ -159,6 +158,7 @@
|
||||||
v-if="!importer.manual_mapping"
|
v-if="!importer.manual_mapping"
|
||||||
class="control">
|
class="control">
|
||||||
<button
|
<button
|
||||||
|
id="button-submit-importer-creation"
|
||||||
:disabled="
|
:disabled="
|
||||||
(formErrorMessage != undefined && formErrorMessage != '') ||
|
(formErrorMessage != undefined && formErrorMessage != '') ||
|
||||||
sessionId == undefined ||
|
sessionId == undefined ||
|
||||||
|
@ -167,15 +167,15 @@
|
||||||
(importer.accepts.file && !importer.accepts.url && !importerFile) ||
|
(importer.accepts.file && !importer.accepts.url && !importerFile) ||
|
||||||
(!importer.accepts.file && importer.accepts.url && !url) ||
|
(!importer.accepts.file && importer.accepts.url && !url) ||
|
||||||
(importer.accepts.file && importer.accepts.url && !importerFile && !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="{ 'is-loading': isLoadingRun, 'is-success': !isLoadingRun }"
|
||||||
class="button">{{ $i18n.get('run') }}</button>
|
class="button"
|
||||||
|
@click.prevent="onFinishImporter()">{{ $i18n.get('run') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="importer.manual_mapping"
|
v-if="importer.manual_mapping"
|
||||||
class="control">
|
class="control">
|
||||||
<button
|
<button
|
||||||
|
id="button-submit-collection-creation"
|
||||||
:disabled="
|
:disabled="
|
||||||
(formErrorMessage != undefined && formErrorMessage != '') ||
|
(formErrorMessage != undefined && formErrorMessage != '') ||
|
||||||
sessionId == undefined ||
|
sessionId == undefined ||
|
||||||
|
@ -184,16 +184,15 @@
|
||||||
(importer.accepts.file && !importer.accepts.url && !importerFile) ||
|
(importer.accepts.file && !importer.accepts.url && !importerFile) ||
|
||||||
(!importer.accepts.file && importer.accepts.url && !url) ||
|
(!importer.accepts.file && importer.accepts.url && !url) ||
|
||||||
(importer.accepts.file && importer.accepts.url && !importerFile && !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="{ 'is-loading': isLoadingUpload, 'is-success': !isLoadingUpload }"
|
||||||
class="button">{{ $i18n.get('next') }}</button>
|
class="button"
|
||||||
|
@click.prevent="onFinishImporter()">{{ $i18n.get('next') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<b-loading
|
<b-loading
|
||||||
:active.sync="isLoading"
|
v-model="isLoading"
|
||||||
:can-cancel="false" />
|
:can-cancel="false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -462,7 +461,7 @@ export default {
|
||||||
|
|
||||||
@import "../../scss/_variables.scss";
|
@import "../../scss/_variables.scss";
|
||||||
|
|
||||||
/deep/ .columns {
|
:deep(.columns) {
|
||||||
padding-left: var(--tainacan-one-column);
|
padding-left: var(--tainacan-one-column);
|
||||||
padding-right: var(--tainacan-one-column);
|
padding-right: var(--tainacan-one-column);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,42 +4,38 @@
|
||||||
<div class="tainacan-page-title">
|
<div class="tainacan-page-title">
|
||||||
<h1>{{ $i18n.get('label_metadata_mapping') }} </h1>
|
<h1>{{ $i18n.get('label_metadata_mapping') }} </h1>
|
||||||
<a
|
<a
|
||||||
@click="$router.go(-1)"
|
class="back-link has-text-secondary"
|
||||||
class="back-link has-text-secondary">
|
@click="$router.go(-1)">
|
||||||
{{ $i18n.get('back') }}
|
{{ $i18n.get('back') }}
|
||||||
</a>
|
</a>
|
||||||
<hr>
|
<hr>
|
||||||
<nav class="breadcrumbs">
|
<nav class="breadcrumbs">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link> >
|
:to="$routerHelper.getCollectionsPath()">{{ $i18n.get('repository') }}</router-link> >
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getAvailableImportersPath()">{{ $i18n.get('importers') }}</router-link> >
|
:to="$routerHelper.getAvailableImportersPath()">{{ $i18n.get('importers') }}</router-link> >
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getImporterPath(importerType, sessionId)">{{ importerType != undefined ? (importerName != undefined ? importerName :importerType) : $i18n.get('title_importer_page') }}</router-link> >
|
:to="$routerHelper.getImporterPath(importerType, sessionId)">{{ importerType != undefined ? (importerName != undefined ? importerName :importerType) : $i18n.get('title_importer_page') }}</router-link> >
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getImporterMappingPath(importerType, sessionId, collectionId)">{{ $i18n.get('label_metadata_mapping') }}</router-link>
|
:to="$routerHelper.getImporterMappingPath(importerType, sessionId, collectionId)">{{ $i18n.get('label_metadata_mapping') }}</router-link>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<b-loading
|
<b-loading
|
||||||
:active.sync="isLoading"
|
v-model="isLoading"
|
||||||
:can-cancel="false" />
|
:can-cancel="false" />
|
||||||
|
|
||||||
<form
|
<form
|
||||||
|
v-if="importer != undefined && importer != null"
|
||||||
class="tainacan-form"
|
class="tainacan-form"
|
||||||
label-width="120px"
|
label-width="120px">
|
||||||
v-if="importer != undefined && importer != null">
|
|
||||||
<p>{{ $i18n.get('info_metadata_mapping_helper') }}</p>
|
<p>{{ $i18n.get('info_metadata_mapping_helper') }}</p>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<b-loading
|
<b-loading
|
||||||
|
v-model="isLoadingSourceInfo"
|
||||||
:is-full-page="false"
|
:is-full-page="false"
|
||||||
:active.sync="isLoadingSourceInfo"
|
|
||||||
:can-cancel="false" />
|
:can-cancel="false" />
|
||||||
|
|
||||||
<!-- Metadata Mapping -->
|
<!-- Metadata Mapping -->
|
||||||
|
@ -70,8 +66,8 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
<p>{{ $i18n.get('label_from_source_collection') }}</p>
|
||||||
<hr>
|
<hr>
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -82,19 +78,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="source-metadatum"
|
|
||||||
:class="{ 'has-children': typeof sourceMetadatum == 'object' && Object.entries(sourceMetadatum)[0] }"
|
|
||||||
v-for="(sourceMetadatum, index) of importerSourceInfo.source_metadata"
|
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'">
|
<template v-if="typeof sourceMetadatum == 'string'">
|
||||||
<p>{{ sourceMetadatum }}</p>
|
<p>{{ sourceMetadatum }}</p>
|
||||||
<b-select
|
<b-select
|
||||||
v-if="collectionMetadata != undefined &&
|
v-if="collectionMetadata != undefined &&
|
||||||
collectionMetadata.length > 0 &&
|
collectionMetadata.length > 0 &&
|
||||||
!isFetchingCollectionMetadata"
|
!isFetchingCollectionMetadata"
|
||||||
:value="checkCurrentSelectedCollectionMetadatum(sourceMetadatum)"
|
:model-value="checkCurrentSelectedCollectionMetadatum(sourceMetadatum)"
|
||||||
@input="onSelectCollectionMetadata($event, sourceMetadatum)"
|
:placeholder="$i18n.get('label_select_metadatum')"
|
||||||
:placeholder="$i18n.get('label_select_metadatum')">
|
@update:model-value="onSelectCollectionMetadata($event, sourceMetadatum)">
|
||||||
<option :value="null">
|
<option :value="null">
|
||||||
{{ $i18n.get('label_select_metadatum') }}
|
{{ $i18n.get('label_select_metadatum') }}
|
||||||
</option>
|
</option>
|
||||||
|
@ -128,9 +124,9 @@
|
||||||
v-if="collectionMetadata != undefined &&
|
v-if="collectionMetadata != undefined &&
|
||||||
collectionMetadata.length > 0 &&
|
collectionMetadata.length > 0 &&
|
||||||
!isFetchingCollectionMetadata"
|
!isFetchingCollectionMetadata"
|
||||||
:value="checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true)"
|
:model-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')"
|
||||||
: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">
|
<option :value="null">
|
||||||
{{ $i18n.get('label_select_metadatum') }}
|
{{ $i18n.get('label_select_metadatum') }}
|
||||||
</option>
|
</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="{ 'disabled-child-source-metadatum': [undefined, null, false, 'create_metadata' + index].includes(checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true)) }"
|
||||||
class="child-source-metadatum">
|
class="child-source-metadatum">
|
||||||
<div
|
<div
|
||||||
class="source-metadatum"
|
|
||||||
v-for="(childSourceMetadatum, childIndex) of Object.entries(sourceMetadatum)[0][1]"
|
v-for="(childSourceMetadatum, childIndex) of Object.entries(sourceMetadatum)[0][1]"
|
||||||
:key="childIndex">
|
:key="childIndex"
|
||||||
|
class="source-metadatum">
|
||||||
<p>{{ childSourceMetadatum }}</p>
|
<p>{{ childSourceMetadatum }}</p>
|
||||||
<b-select
|
<b-select
|
||||||
v-if="collectionMetadata != undefined &&
|
v-if="collectionMetadata != undefined &&
|
||||||
collectionMetadata.length > 0 &&
|
collectionMetadata.length > 0 &&
|
||||||
!isFetchingCollectionMetadata"
|
!isFetchingCollectionMetadata"
|
||||||
:disabled="[undefined, null, false, 'create_metadata' + index].includes(checkCurrentSelectedCollectionMetadatum(Object.entries(sourceMetadatum)[0][0], true))"
|
: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))"
|
:model-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')"
|
||||||
: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">
|
<option :value="null">
|
||||||
{{ $i18n.get('label_select_metadatum') }}
|
{{ $i18n.get('label_select_metadatum') }}
|
||||||
</option>
|
</option>
|
||||||
|
@ -187,38 +183,46 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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>
|
</div>
|
||||||
<template v-if="importerSourceInfo.source_special_fields">
|
<template v-if="importerSourceInfo.source_special_fields">
|
||||||
<div
|
<div
|
||||||
v-for="(specialField, specialFieldIndex) of importerSourceInfo.source_special_fields"
|
v-for="(specialField, specialFieldIndex) of importerSourceInfo.source_special_fields"
|
||||||
:key="specialFieldIndex"
|
:key="specialFieldIndex"
|
||||||
class="source-metadatum">
|
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>
|
<p>{{ $i18n.get('info_special_fields_mapped_default') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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
|
<b-modal
|
||||||
@close="onMetadatumEditionCanceled()"
|
v-model="isNewMetadatumModalActive"
|
||||||
:active.sync="isNewMetadatumModalActive"
|
|
||||||
trap-focus
|
trap-focus
|
||||||
aria-modal
|
aria-modal
|
||||||
aria-role="dialog"
|
aria-role="dialog"
|
||||||
:close-button-aria-label="$i18n.get('close')"
|
:close-button-aria-label="$i18n.get('close')"
|
||||||
custom-class="tainacan-modal">
|
custom-class="tainacan-modal"
|
||||||
|
@close="onMetadatumEditionCanceled()">
|
||||||
<div
|
<div
|
||||||
|
v-if="selectedMetadatumType == undefined && !isEditingMetadatum"
|
||||||
autofocus="true"
|
autofocus="true"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal
|
aria-modal>
|
||||||
v-if="selectedMetadatumType == undefined && !isEditingMetadatum">
|
|
||||||
<b-loading
|
<b-loading
|
||||||
:is-full-page="isFullPage"
|
v-model="isLoadingMetadatumTypes"
|
||||||
:active.sync="isLoadingMetadatumTypes"/>
|
:is-full-page="false" />
|
||||||
<div
|
<div
|
||||||
|
|
||||||
class="tainacan-modal-content">
|
class="tainacan-modal-content">
|
||||||
|
@ -229,9 +233,9 @@
|
||||||
<section class="tainacan-form">
|
<section class="tainacan-form">
|
||||||
<div class="metadata-types-container">
|
<div class="metadata-types-container">
|
||||||
<div
|
<div
|
||||||
class="metadata-type"
|
|
||||||
v-for="(metadatumType, index) of metadatumTypes"
|
v-for="(metadatumType, index) of metadatumTypes"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
class="metadata-type"
|
||||||
@click="onSelectMetadatumType(metadatumType)">
|
@click="onSelectMetadatumType(metadatumType)">
|
||||||
<h4>{{ metadatumType.name }}</h4>
|
<h4>{{ metadatumType.name }}</h4>
|
||||||
</div>
|
</div>
|
||||||
|
@ -254,11 +258,11 @@
|
||||||
v-if="selectedMetadatumType && isEditingMetadatum"
|
v-if="selectedMetadatumType && isEditingMetadatum"
|
||||||
:collection-id="collectionId"
|
:collection-id="collectionId"
|
||||||
:is-repository-level="false"
|
:is-repository-level="false"
|
||||||
@onEditionFinished="onMetadatumEditionFinished()"
|
|
||||||
@onEditionCanceled="onMetadatumEditionCanceled()"
|
|
||||||
:index="0"
|
:index="0"
|
||||||
:original-metadatum="metadatum"
|
:original-metadatum="metadatum"
|
||||||
:is-inside-importer-flow="true" />
|
:is-inside-importer-flow="true"
|
||||||
|
@on-edition-finished="onMetadatumEditionFinished()"
|
||||||
|
@on-edition-canceled="onMetadatumEditionCanceled()" />
|
||||||
</b-modal>
|
</b-modal>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -276,14 +280,16 @@
|
||||||
type="button"
|
type="button"
|
||||||
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
<p class="help is-danger">
|
||||||
|
{{ formErrorMessage }}
|
||||||
|
</p>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
:disabled="sessionId == undefined || importer == undefined"
|
|
||||||
id="button-submit-importer-mapping"
|
id="button-submit-importer-mapping"
|
||||||
@click.prevent="onRunImporter"
|
:disabled="sessionId == undefined || importer == undefined"
|
||||||
:class="{ 'is-loading': isLoadingRun, 'is-success': !isLoadingRun }"
|
:class="{ 'is-loading': isLoadingRun, 'is-success': !isLoadingRun }"
|
||||||
class="button">{{ $i18n.get('run') }}</button>
|
class="button"
|
||||||
|
@click.prevent="onRunImporter">{{ $i18n.get('run') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -291,7 +297,7 @@
|
||||||
<!-- Prompt to show title -->
|
<!-- Prompt to show title -->
|
||||||
<b-modal
|
<b-modal
|
||||||
v-if="importerSourceInfo"
|
v-if="importerSourceInfo"
|
||||||
:active.sync="showTitlePromptModal"
|
v-model="showTitlePromptModal"
|
||||||
:can-cancel="false"
|
:can-cancel="false"
|
||||||
:width="820"
|
:width="820"
|
||||||
scroll="keep"
|
scroll="keep"
|
||||||
|
@ -309,11 +315,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<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-field>
|
||||||
<b-select
|
<b-select
|
||||||
expanded
|
|
||||||
v-model="selectedTitle"
|
v-model="selectedTitle"
|
||||||
|
expanded
|
||||||
:placeholder="$i18n.get('label_select_metadatum')">
|
:placeholder="$i18n.get('label_select_metadatum')">
|
||||||
<option
|
<option
|
||||||
v-for="(sourceMetadatum, index) of importerSourceInfo.source_metadata"
|
v-for="(sourceMetadatum, index) of importerSourceInfo.source_metadata"
|
||||||
|
@ -363,8 +371,8 @@
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="button is-success"
|
class="button is-success"
|
||||||
@click="onConfirmTitleSelection"
|
:disabled="selectedTitle === '' || selectedTitle == undefined"
|
||||||
:disabled="selectedTitle === '' || selectedTitle == undefined">
|
@click="onConfirmTitleSelection">
|
||||||
{{ $i18n.get('apply') }}
|
{{ $i18n.get('apply') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -415,9 +423,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
metadatumTypes() {
|
...mapGetters('metadata', {
|
||||||
return this.getMetadatumTypes();
|
'metadatumTypes': 'getMetadatumTypes'
|
||||||
},
|
}),
|
||||||
collectionNonChildMetadata() {
|
collectionNonChildMetadata() {
|
||||||
return Array.isArray(this.collectionMetadata) ? this.collectionMetadata.filter((metadatum) => !this.checkIfMetadatumIsChild(metadatum)) : [];
|
return Array.isArray(this.collectionMetadata) ? this.collectionMetadata.filter((metadatum) => !this.checkIfMetadatumIsChild(metadatum)) : [];
|
||||||
}
|
}
|
||||||
|
@ -441,7 +449,7 @@ export default {
|
||||||
this.collection = collection;
|
this.collection = collection;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
// Cancels previous Request
|
// Cancels previous Request
|
||||||
if (this.metadataSearchCancel != undefined)
|
if (this.metadataSearchCancel != undefined)
|
||||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||||
|
@ -468,12 +476,6 @@ export default {
|
||||||
'fetchMetadatumTypes',
|
'fetchMetadatumTypes',
|
||||||
'sendMetadatum'
|
'sendMetadatum'
|
||||||
]),
|
]),
|
||||||
...mapGetters('metadata', [
|
|
||||||
'getMetadatumTypes'
|
|
||||||
]),
|
|
||||||
...mapGetters('bgprocess', [
|
|
||||||
'getProcess'
|
|
||||||
]),
|
|
||||||
...mapActions('collection', [
|
...mapActions('collection', [
|
||||||
'fetchCollectionBasics'
|
'fetchCollectionBasics'
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
style="float: right; font-size: 0.875em; margin: 2px 5px;"
|
style="float: right; font-size: 0.875em; margin: 2px 5px;"
|
||||||
type="button"
|
type="button"
|
||||||
class="link-style"
|
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">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-edit" />
|
<i class="tainacan-icon tainacan-icon-edit" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
:collection="collection"
|
:collection="collection"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:should-load-attachments="shouldLoadAttachments"
|
:should-load-attachments="shouldLoadAttachments"
|
||||||
@onDeleteAttachment="($event) => $emit('onDeleteAttachment', $event)"/>
|
@on-delete-attachment="($event) => $emit('on-delete-attachment', $event)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -60,7 +60,11 @@ export default {
|
||||||
totalAttachments: Number,
|
totalAttachments: Number,
|
||||||
isLoading: Boolean,
|
isLoading: Boolean,
|
||||||
shouldLoadAttachments: Boolean
|
shouldLoadAttachments: Boolean
|
||||||
}
|
},
|
||||||
|
emits: [
|
||||||
|
'open-attachments-media-frame',
|
||||||
|
'on-delete-attachment'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<b-loading
|
<b-loading
|
||||||
|
v-model="isLoading"
|
||||||
:is-full-page="false"
|
:is-full-page="false"
|
||||||
:active.sync="isLoading"
|
|
||||||
:can-cancel="false" />
|
:can-cancel="false" />
|
||||||
<div
|
<div
|
||||||
v-if="!$adminOptions.hideBulkEditionPageTitle"
|
v-if="!$adminOptions.hideBulkEditionPageTitle"
|
||||||
class="tainacan-page-title">
|
class="tainacan-page-title">
|
||||||
<h1>{{ $i18n.get('add_items_bulk') }}</h1>
|
<h1>{{ $i18n.get('add_items_bulk') }}</h1>
|
||||||
<a
|
<a
|
||||||
@click="$router.go(-1)"
|
class="back-link has-text-secondary"
|
||||||
class="back-link has-text-secondary">
|
@click="$router.go(-1)">
|
||||||
{{ $i18n.get('back') }}
|
{{ $i18n.get('back') }}
|
||||||
</a>
|
</a>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -25,18 +25,18 @@
|
||||||
<label class="label">{{ $i18n.get('label_documents_upload') }}</label>
|
<label class="label">{{ $i18n.get('label_documents_upload') }}</label>
|
||||||
<br>
|
<br>
|
||||||
<b-upload
|
<b-upload
|
||||||
native
|
|
||||||
v-model="submitedFileList"
|
v-model="submitedFileList"
|
||||||
|
native
|
||||||
drag-drop
|
drag-drop
|
||||||
multiple
|
multiple
|
||||||
@input="uploadFiles()"
|
class="source-file-upload"
|
||||||
class="source-file-upload">
|
@update:model-value="uploadFiles()">
|
||||||
<section class="drop-inner">
|
<section class="drop-inner">
|
||||||
<div class="content has-text-centered">
|
<div class="content has-text-centered">
|
||||||
<p>
|
<p>
|
||||||
<b-icon
|
<span class="icon">
|
||||||
icon="upload"
|
<i class="tainacan-icon tainacan-icon-30px tainacan-icon-upload" />
|
||||||
size="is-large"/>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>{{ $i18n.get('instruction_drop_file_or_click_to_upload') }}</p>
|
<p>{{ $i18n.get('instruction_drop_file_or_click_to_upload') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,9 +84,9 @@
|
||||||
<!-- Uploaded Items -->
|
<!-- Uploaded Items -->
|
||||||
<transition-group name="item-appear">
|
<transition-group name="item-appear">
|
||||||
<div
|
<div
|
||||||
class="document-item"
|
|
||||||
v-for="(item, index) of uploadedItems"
|
v-for="(item, index) of uploadedItems"
|
||||||
:key="item.id">
|
:key="item.id"
|
||||||
|
class="document-item">
|
||||||
<img
|
<img
|
||||||
v-if="item.document != undefined && item.document != '' && item.document_type != 'empty'"
|
v-if="item.document != undefined && item.document != '' && item.document_type != 'empty'"
|
||||||
class="document-thumb"
|
class="document-thumb"
|
||||||
|
@ -108,7 +108,6 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="item.document != '' && item.document_type != 'empty'"
|
v-if="item.document != '' && item.document_type != 'empty'"
|
||||||
class="icon has-text-success"
|
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
shown: 500,
|
shown: 500,
|
||||||
|
@ -118,7 +117,8 @@
|
||||||
autoHide: false,
|
autoHide: false,
|
||||||
placement: 'auto-start',
|
placement: 'auto-start',
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip']
|
popperClass: ['tainacan-tooltip', 'tooltip']
|
||||||
}">
|
}"
|
||||||
|
class="icon has-text-success">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-approvedcircle" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-approvedcircle" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -150,8 +150,9 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
@click.prevent="$router.go(-1)"
|
@click.prevent="$router.go(-1)">
|
||||||
slot="trigger">{{ $i18n.get('cancel') }}</button>
|
{{ $i18n.get('cancel') }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="margin-left: auto;"
|
style="margin-left: auto;"
|
||||||
|
@ -160,15 +161,17 @@
|
||||||
:disabled="!(uploadedItems.length > 0 && uploadedItems.length == amountFinished)"
|
:disabled="!(uploadedItems.length > 0 && uploadedItems.length == amountFinished)"
|
||||||
class="button is-secondary"
|
class="button is-secondary"
|
||||||
:class="{'is-loading': isCreatingSequenceEditGroup }"
|
:class="{'is-loading': isCreatingSequenceEditGroup }"
|
||||||
@click.prevent="sequenceEditGroup()"
|
type="submit"
|
||||||
type="submit">{{ $i18n.get('label_sequence_edit_items') }}</button>
|
@click.prevent="sequenceEditGroup()">
|
||||||
|
{{ $i18n.get('label_sequence_edit_items') }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
:disabled="!(uploadedItems.length > 0 && uploadedItems.length == amountFinished)"
|
:disabled="!(uploadedItems.length > 0 && uploadedItems.length == amountFinished)"
|
||||||
class="button is-secondary"
|
class="button is-secondary"
|
||||||
@click.prevent="openBulkEditionModal()"
|
type="submit"
|
||||||
type="submit">{{ $i18n.get('label_bulk_edit_items') }}</button>
|
@click.prevent="openBulkEditionModal()">{{ $i18n.get('label_bulk_edit_items') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -206,12 +209,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
uploadedFileList() {
|
...mapGetters('collection', {
|
||||||
return this.getFiles();
|
'collection': 'getCollection'
|
||||||
},
|
})
|
||||||
collection() {
|
|
||||||
return this.getCollection()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// Obtains collection ID
|
// Obtains collection ID
|
||||||
|
@ -220,7 +220,7 @@ export default {
|
||||||
this.cleanFiles();
|
this.cleanFiles();
|
||||||
|
|
||||||
// Updates Collection BreadCrumb
|
// Updates Collection BreadCrumb
|
||||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||||
{ path: '', label: this.$i18n.get('add_items_bulk') }
|
{ path: '', label: this.$i18n.get('add_items_bulk') }
|
||||||
]);
|
]);
|
||||||
|
@ -230,10 +230,6 @@ export default {
|
||||||
'sendFile',
|
'sendFile',
|
||||||
'cleanFiles',
|
'cleanFiles',
|
||||||
'deleteItem'
|
'deleteItem'
|
||||||
]),
|
|
||||||
...mapGetters('collection', [
|
|
||||||
'getFiles',
|
|
||||||
'getCollection'
|
|
||||||
]),
|
]),
|
||||||
...mapActions('item', [
|
...mapActions('item', [
|
||||||
'sendItem',
|
'sendItem',
|
||||||
|
@ -257,7 +253,7 @@ export default {
|
||||||
|
|
||||||
let index = this.uploadedItems.findIndex(existingItem => existingItem.id === item.id);
|
let index = this.uploadedItems.findIndex(existingItem => existingItem.id === item.id);
|
||||||
if ( index >= 0)
|
if ( index >= 0)
|
||||||
this.$set( this.uploadedItems, index, item );
|
Object.assign(this.uploadedItems, { [index]: item });
|
||||||
else
|
else
|
||||||
this.uploadedItems.push( item );
|
this.uploadedItems.push( item );
|
||||||
|
|
||||||
|
@ -276,7 +272,7 @@ export default {
|
||||||
|
|
||||||
let index = this.uploadedItems.findIndex(existingItem => existingItem.id === item.id);
|
let index = this.uploadedItems.findIndex(existingItem => existingItem.id === item.id);
|
||||||
if ( index >= 0)
|
if ( index >= 0)
|
||||||
this.$set( this.uploadedItems, index, item);
|
Object.assign(this.uploadedItems, { [index]: item });
|
||||||
else
|
else
|
||||||
this.uploadedItems.unshift( item );
|
this.uploadedItems.unshift( item );
|
||||||
})
|
})
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
<div v-html="item.document_as_html" />
|
<div v-html="item.document_as_html" />
|
||||||
<div class="document-buttons-row">
|
<div class="document-buttons-row">
|
||||||
<a
|
<a
|
||||||
|
id="button-edit-document"
|
||||||
class="button is-rounded is-secondary"
|
class="button is-rounded is-secondary"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
id="button-edit-document"
|
|
||||||
:aria-label="$i18n.get('label_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
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('edit'),
|
content: $i18n.get('edit'),
|
||||||
|
@ -38,11 +38,11 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
|
id="button-delete-document"
|
||||||
class="button is-rounded is-secondary"
|
class="button is-rounded is-secondary"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
id="button-delete-document"
|
|
||||||
:aria-label="$i18n.get('label_button_delete_document')"
|
:aria-label="$i18n.get('label_button_delete_document')"
|
||||||
@click.prevent="$emit('onRemoveDocument')">
|
@click.prevent="$emit('on-remove-document')">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('delete'),
|
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')">
|
<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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click.prevent="($event) => $emit('onSetFileDocument', $event)">
|
@click.prevent="($event) => $emit('on-set-file-document', $event)">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-upload" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-upload" />
|
||||||
</span>
|
</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')">
|
<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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click.prevent="$emit('onSetTextDocument')">
|
@click.prevent="$emit('on-set-text-document')">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-text" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-text" />
|
||||||
</span>
|
</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')">
|
<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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click.prevent="$emit('onSetURLDocument')">
|
@click.prevent="$emit('on-set-url-document')">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-url" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-url" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -100,7 +100,14 @@ export default {
|
||||||
item: Object,
|
item: Object,
|
||||||
form: Object,
|
form: Object,
|
||||||
collection: Object
|
collection: Object
|
||||||
}
|
},
|
||||||
|
emits: [
|
||||||
|
'on-set-file-document',
|
||||||
|
'on-set-text-document',
|
||||||
|
'on-set-url-document',
|
||||||
|
'on-set-document',
|
||||||
|
'on-remove-document'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -114,48 +121,46 @@ export default {
|
||||||
&.document-field-content--text {
|
&.document-field-content--text {
|
||||||
padding-bottom: 2rem;
|
padding-bottom: 2rem;
|
||||||
|
|
||||||
/deep/ article {
|
:deep(article) {
|
||||||
max-height: calc(32vh - 2rem);
|
max-height: calc(32vh - 2rem);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ img,
|
:deep(img),
|
||||||
/deep/ video,
|
:deep(video),
|
||||||
/deep/ figure {
|
:deep(figure) {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 32vh;
|
max-height: 32vh;
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
/deep/ a {
|
:deep(a){
|
||||||
min-height: 60px;
|
min-height: 60px;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
/deep/ audio,
|
:deep(audio),
|
||||||
/deep/ iframe,
|
:deep(iframe),
|
||||||
/deep/ blockquote {
|
:deep(blockquote) {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 32vh;
|
max-height: 32vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
min-height: 150px;
|
min-height: 150px;
|
||||||
}
|
}
|
||||||
/deep/ audio {
|
:deep(audio) {
|
||||||
min-height: 80px;
|
min-height: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-height: 760px) {
|
@media screen and (max-height: 760px) {
|
||||||
max-height: 25vh;
|
max-height: 25vh;
|
||||||
|
|
||||||
/deep/ img,
|
:deep(img),
|
||||||
/deep/ video,
|
:deep(video),
|
||||||
/deep/ figure {
|
:deep(figure),
|
||||||
max-height: 25vh;
|
:deep(audio),
|
||||||
}
|
:deep(iframe),
|
||||||
/deep/ audio,
|
:deep(blockquote) {
|
||||||
/deep/ iframe,
|
|
||||||
/deep/ blockquote {
|
|
||||||
max-height: 25vh;
|
max-height: 25vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="isCreatingNewItem ? 'item-creation-container' : 'item-edition-container'"><!-- Do NOT remove this classes, they may be used by third party plugins -->
|
<div :class="isCreatingNewItem ? 'item-creation-container' : 'item-edition-container'"><!-- Do NOT remove this classes, they may be used by third party plugins -->
|
||||||
<b-loading
|
<b-loading
|
||||||
|
v-model="isLoading"
|
||||||
:is-full-page="false"
|
:is-full-page="false"
|
||||||
:active.sync="isLoading"
|
|
||||||
:can-cancel="false" />
|
:can-cancel="false" />
|
||||||
|
|
||||||
<tainacan-title
|
<tainacan-title
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
</h1>
|
</h1>
|
||||||
</transition>
|
</transition>
|
||||||
<button
|
<button
|
||||||
v-if="!formErrors.length || isUpdatingValues"
|
v-if="!errors.length || isUpdatingValues"
|
||||||
@click="isMobileSubheaderOpen = !isMobileSubheaderOpen">
|
@click="isMobileSubheaderOpen = !isMobileSubheaderOpen">
|
||||||
<span
|
<span
|
||||||
v-if="isUpdatingValues"
|
v-if="isUpdatingValues"
|
||||||
|
@ -106,14 +106,14 @@
|
||||||
</button>
|
</button>
|
||||||
<item-metadatum-errors-tooltip
|
<item-metadatum-errors-tooltip
|
||||||
v-else
|
v-else
|
||||||
:form-errors="formErrors" />
|
:form-errors="errors" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<transition name="item-appear">
|
<transition name="item-appear">
|
||||||
<div
|
<div
|
||||||
v-if="isMobileSubheaderOpen"
|
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>
|
||||||
<transition name="panel-from-top">
|
<transition name="panel-from-top">
|
||||||
<div
|
<div
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
{{ $i18n.get('title_edit_item') + ' ' }}
|
{{ $i18n.get('title_edit_item') + ' ' }}
|
||||||
<span style="font-weight: 600;">{{ (item != null && item != undefined) ? item.title : '' }}</span>
|
<span style="font-weight: 600;">{{ (item != null && item != undefined) ? item.title : '' }}</span>
|
||||||
</h1>
|
</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
|
<span
|
||||||
v-else
|
v-else
|
||||||
class="help is-danger">
|
class="help is-danger">
|
||||||
|
@ -196,11 +196,11 @@
|
||||||
<ul class="swiper-wrapper">
|
<ul class="swiper-wrapper">
|
||||||
<li
|
<li
|
||||||
v-for="(tab, tabIndex) of tabs"
|
v-for="(tab, tabIndex) of tabs"
|
||||||
|
:id="tab.slug + '-tab-label'"
|
||||||
:key="tabIndex"
|
:key="tabIndex"
|
||||||
:class="{ 'is-active': activeTab === tab.slug }"
|
:class="{ 'is-active': activeTab === tab.slug }"
|
||||||
@click="activeTab = tab.slug"
|
|
||||||
class="swiper-slide"
|
class="swiper-slide"
|
||||||
:id="tab.slug + '-tab-label'">
|
@click="activeTab = tab.slug">
|
||||||
<a>
|
<a>
|
||||||
<span class="icon has-text-gray4">
|
<span class="icon has-text-gray4">
|
||||||
<i :class="'tainacan-icon tainacan-icon-18px tainacan-icon-' + tab.icon" />
|
<i :class="'tainacan-icon tainacan-icon-18px tainacan-icon-' + tab.icon" />
|
||||||
|
@ -215,9 +215,8 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<button
|
<button
|
||||||
class="swiper-button-prev"
|
|
||||||
id="tainacan-tabs-prev"
|
id="tainacan-tabs-prev"
|
||||||
slot="button-prev">
|
class="swiper-button-prev">
|
||||||
<svg
|
<svg
|
||||||
width="24"
|
width="24"
|
||||||
height="24"
|
height="24"
|
||||||
|
@ -229,9 +228,8 @@
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="swiper-button-next"
|
|
||||||
id="tainacan-tabs-next"
|
id="tainacan-tabs-next"
|
||||||
slot="button-next">
|
class="swiper-button-next">
|
||||||
<svg
|
<svg
|
||||||
width="24"
|
width="24"
|
||||||
height="24"
|
height="24"
|
||||||
|
@ -288,9 +286,9 @@
|
||||||
:style="$adminOptions.hideItemEditionCollapses ? 'padding-left: 0.35em !important;' : ''">
|
:style="$adminOptions.hideItemEditionCollapses ? 'padding-left: 0.35em !important;' : ''">
|
||||||
<b-button
|
<b-button
|
||||||
v-if="!$adminOptions.hideItemEditionFocusMode && (collection && collection.item_enable_metadata_focus_mode === 'yes') && !isMetadataNavigation && !showOnlyRequiredMetadata && !metadataNameFilterString"
|
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"
|
class="collapse-all has-text-secondary"
|
||||||
size="is-small">
|
size="is-small"
|
||||||
|
@click="isMetadataNavigation = true; setMetadatumFocus({ index: 0, scrollIntoView: true });">
|
||||||
<span
|
<span
|
||||||
class="icon">
|
class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-play" />
|
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-play" />
|
||||||
|
@ -300,8 +298,8 @@
|
||||||
<b-button
|
<b-button
|
||||||
v-if="isMetadataNavigation"
|
v-if="isMetadataNavigation"
|
||||||
:disabled="focusedMetadatum === 0"
|
:disabled="focusedMetadatum === 0"
|
||||||
@click="focusPreviousMetadatum"
|
outlined
|
||||||
outlined>
|
@click="focusPreviousMetadatum">
|
||||||
<span
|
<span
|
||||||
class="icon">
|
class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-showmore tainacan-icon-rotate-180" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-showmore tainacan-icon-rotate-180" />
|
||||||
|
@ -311,8 +309,8 @@
|
||||||
<b-button
|
<b-button
|
||||||
v-if="isMetadataNavigation"
|
v-if="isMetadataNavigation"
|
||||||
:disabled="(focusedMetadatum === itemMetadata.length - 1) && (!isCurrentlyFocusedOnCompoundMetadatum || isOnLastMetadatumOfCompoundNavigation)"
|
:disabled="(focusedMetadatum === itemMetadata.length - 1) && (!isCurrentlyFocusedOnCompoundMetadatum || isOnLastMetadatumOfCompoundNavigation)"
|
||||||
@click="focusNextMetadatum"
|
outlined
|
||||||
outlined>
|
@click="focusNextMetadatum">
|
||||||
<span
|
<span
|
||||||
class="icon">
|
class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-showmore" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-showmore" />
|
||||||
|
@ -321,8 +319,8 @@
|
||||||
</b-button>
|
</b-button>
|
||||||
<b-button
|
<b-button
|
||||||
v-if="isMetadataNavigation"
|
v-if="isMetadataNavigation"
|
||||||
@click="setMetadatumFocus({ index: 0, scrollIntoView: true }); isMetadataNavigation = false;"
|
outlined
|
||||||
outlined>
|
@click="setMetadatumFocus({ index: 0, scrollIntoView: true }); isMetadataNavigation = false;">
|
||||||
<span
|
<span
|
||||||
class="icon has-success-color">
|
class="icon has-success-color">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-finish" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-finish" />
|
||||||
|
@ -342,9 +340,9 @@
|
||||||
<b-switch
|
<b-switch
|
||||||
v-if="!isMetadataNavigation && !$adminOptions.hideItemEditionRequiredOnlySwitch && (collection && collection.item_enable_metadata_required_filter === 'yes')"
|
v-if="!isMetadataNavigation && !$adminOptions.hideItemEditionRequiredOnlySwitch && (collection && collection.item_enable_metadata_required_filter === 'yes')"
|
||||||
id="tainacan-switch-required-metadata"
|
id="tainacan-switch-required-metadata"
|
||||||
|
v-model="showOnlyRequiredMetadata"
|
||||||
:style="'font-size: 0.625em;' + (isMobileScreen ? 'margin-right: 2rem;' : '')"
|
:style="'font-size: 0.625em;' + (isMobileScreen ? 'margin-right: 2rem;' : '')"
|
||||||
size="is-small"
|
size="is-small">
|
||||||
v-model="showOnlyRequiredMetadata">
|
|
||||||
{{ isMobileScreen ? $i18n.get('label_required') : $i18n.get('label_only_required') }} *
|
{{ isMobileScreen ? $i18n.get('label_required') : $i18n.get('label_only_required') }} *
|
||||||
</b-switch>
|
</b-switch>
|
||||||
|
|
||||||
|
@ -353,17 +351,17 @@
|
||||||
class="header-item metadata-name-search">
|
class="header-item metadata-name-search">
|
||||||
<b-input
|
<b-input
|
||||||
v-if="!isMobileScreen || openMetadataNameFilter"
|
v-if="!isMobileScreen || openMetadataNameFilter"
|
||||||
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
|
|
||||||
v-model="metadataNameFilterString"
|
v-model="metadataNameFilterString"
|
||||||
|
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
|
||||||
icon="magnify"
|
icon="magnify"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
icon-right="close-circle"
|
icon-right="close-circle"
|
||||||
icon-right-clickable
|
icon-right-clickable
|
||||||
@icon-right-click="openMetadataNameFilterClose" />
|
@icon-right-click="openMetadataNameFilterClose" />
|
||||||
<span
|
<span
|
||||||
@click="openMetadataNameFilter = true"
|
|
||||||
v-else
|
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" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-search" />
|
||||||
</span>
|
</span>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
@ -371,15 +369,15 @@
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-for="(metadataSection, sectionIndex) of metadataSections"
|
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"
|
:id="'metadata-section-id-' + metadataSection.id"
|
||||||
|
:key="sectionIndex"
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: isSectionHidden(metadataSection.id) ? $i18n.get('info_metadata_section_hidden_conditional') : false,
|
content: isSectionHidden(metadataSection.id) ? $i18n.get('info_metadata_section_hidden_conditional') : false,
|
||||||
autoHide: true,
|
autoHide: true,
|
||||||
placement: 'auto',
|
placement: 'auto',
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip']
|
popperClass: ['tainacan-tooltip', 'tooltip']
|
||||||
}">
|
}"
|
||||||
|
:class="'metadata-section-slug-' + metadataSection.slug + (isSectionHidden(metadataSection.id) ? ' metadata-section-hidden' : '')">
|
||||||
<div class="metadata-section-header section-label">
|
<div class="metadata-section-header section-label">
|
||||||
<span
|
<span
|
||||||
class="collapse-handle"
|
class="collapse-handle"
|
||||||
|
@ -389,8 +387,8 @@
|
||||||
class="icon">
|
class="icon">
|
||||||
<i
|
<i
|
||||||
:class="{
|
:class="{
|
||||||
'tainacan-icon-arrowdown' : (metadataSectionCollapses[sectionIndex] || errorMessage) && !isSectionHidden(metadataSection.id),
|
'tainacan-icon-arrowdown' : (metadataSectionCollapses[sectionIndex] || formErrorMessage) && !isSectionHidden(metadataSection.id),
|
||||||
'tainacan-icon-arrowright' : !(metadataSectionCollapses[sectionIndex] || errorMessage) || isSectionHidden(metadataSection.id)
|
'tainacan-icon-arrowright' : !(metadataSectionCollapses[sectionIndex] || formErrorMessage) || isSectionHidden(metadataSection.id)
|
||||||
}"
|
}"
|
||||||
class="has-text-secondary tainacan-icon tainacan-icon-1-25em" />
|
class="has-text-secondary tainacan-icon tainacan-icon-1-25em" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -399,7 +397,7 @@
|
||||||
<i class="tainacan-icon tainacan-icon-metadata" />
|
<i class="tainacan-icon tainacan-icon-metadata" />
|
||||||
</span>
|
</span>
|
||||||
<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;"
|
style="opacity: 0.65;"
|
||||||
class="metadata-section-enumeration">
|
class="metadata-section-enumeration">
|
||||||
{{ Number(sectionIndex) + 1 }}.
|
{{ Number(sectionIndex) + 1 }}.
|
||||||
|
@ -420,22 +418,23 @@
|
||||||
</div>
|
</div>
|
||||||
<transition name="filter-item">
|
<transition name="filter-item">
|
||||||
<div
|
<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
|
<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 }}
|
{{ metadataSection.description }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<template v-for="(itemMetadatum, index) of itemMetadata">
|
<template
|
||||||
|
v-for="(itemMetadatum, index) of itemMetadata"
|
||||||
|
:key="index">
|
||||||
<tainacan-form-item
|
<tainacan-form-item
|
||||||
v-if="itemMetadatum.metadatum.metadata_section_id == metadataSection.id"
|
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))"
|
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"
|
:ref="'tainacan-form-item--' + index"
|
||||||
|
:class="{ 'is-metadata-navigation-active': isMetadataNavigation }"
|
||||||
:item-metadatum="itemMetadatum"
|
:item-metadatum="itemMetadatum"
|
||||||
:metadata-name-filter-string="metadataNameFilterString"
|
:metadata-name-filter-string="metadataNameFilterString"
|
||||||
:is-collapsed="metadataCollapses[index]"
|
:is-collapsed="metadataCollapses[index]"
|
||||||
|
@ -444,14 +443,15 @@
|
||||||
:hide-help-buttons="false"
|
:hide-help-buttons="false"
|
||||||
:help-info-bellow-label="false"
|
:help-info-bellow-label="false"
|
||||||
:is-mobile-screen="isMobileScreen"
|
: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-last-metadatum="index > 2 && (index == itemMetadata.length - 1)"
|
||||||
:is-focused="focusedMetadatum === index"
|
:is-focused="focusedMetadatum === index"
|
||||||
:is-metadata-navigation="isMetadataNavigation"
|
:is-metadata-navigation="isMetadataNavigation"
|
||||||
@changeCollapse="onChangeCollapse($event, index)"
|
@input="updateItemMetadataValue"
|
||||||
@touchstart.native="isMetadataNavigation ? setMetadatumFocus({ index: index, scrollIntoView: false }): ''"
|
@change-collapse="onChangeCollapse($event, index)"
|
||||||
@mousedown.native="isMetadataNavigation ? setMetadatumFocus({ index: index, scrollIntoView: false }) : ''"
|
@touchstart="isMetadataNavigation ? setMetadatumFocus({ index: index, scrollIntoView: false }): ''"
|
||||||
@mobileSpecialFocus="setMetadatumFocus({ index: index, scrollIntoView: true })" />
|
@mousedown="isMetadataNavigation ? setMetadatumFocus({ index: index, scrollIntoView: false }) : ''"
|
||||||
|
@mobile-special-focus="setMetadatumFocus({ index: index, scrollIntoView: true })" />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -484,11 +484,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<related-items-list
|
<related-items-list
|
||||||
|
v-model:is-loading="isLoading"
|
||||||
:item-id="itemId"
|
:item-id="itemId"
|
||||||
:collection-id="collectionId"
|
:collection-id="collectionId"
|
||||||
:related-items="item.related_items"
|
:related-items="item.related_items"
|
||||||
:is-editable="!$adminOptions.itemEditionMode"
|
:is-editable="!$adminOptions.itemEditionMode" />
|
||||||
:is-loading.sync="isLoading" />
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -503,19 +503,19 @@
|
||||||
:item="item"
|
:item="item"
|
||||||
:form="form"
|
:form="form"
|
||||||
:collection="collection"
|
:collection="collection"
|
||||||
@onSetDocument="setDocument"
|
@on-set-document="setDocument"
|
||||||
@onRemoveDocument="removeDocument"
|
@on-remove-document="removeDocument"
|
||||||
@onSetFileDocument="setFileDocument"
|
@on-set-file-document="setFileDocument"
|
||||||
@onSetTextDocument="setTextDocument"
|
@on-set-text-document="setTextDocument"
|
||||||
@onSetURLDocument="setURLDocument" />
|
@on-set-url-document="setURLDocument" />
|
||||||
<item-thumbnail-edition-form
|
<item-thumbnail-edition-form
|
||||||
:item="item"
|
:item="item"
|
||||||
:form="form"
|
:form="form"
|
||||||
:collection="collection"
|
:collection="collection"
|
||||||
:is-loading="isLoading"
|
:is-loading="isLoading"
|
||||||
@onDeleteThumbnail="deleteThumbnail"
|
@on-delete-thumbnail="deleteThumbnail"
|
||||||
@onUpdateThumbnailAlt="($event) => onUpdateThumbnailAlt($event)"
|
@on-update-thumbnail-alt="($event) => onUpdateThumbnailAlt($event)"
|
||||||
@openThumbnailMediaFrame="thumbnailMediaFrame.openFrame($event)" />
|
@open-thumbnail-media-frame="thumbnailMediaFrame.openFrame($event)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Attachments on mobile modal -->
|
<!-- Attachments on mobile modal -->
|
||||||
|
@ -532,8 +532,8 @@
|
||||||
:is-loading="isLoading"
|
:is-loading="isLoading"
|
||||||
:total-attachments="totalAttachments"
|
:total-attachments="totalAttachments"
|
||||||
:should-load-attachments="shouldLoadAttachments"
|
:should-load-attachments="shouldLoadAttachments"
|
||||||
@openAttachmentsMediaFrame="($event) => attachmentsMediaFrame.openFrame($event)"
|
@open-attachments-media-frame="($event) => attachmentsMediaFrame.openFrame($event)"
|
||||||
@onDeleteAttachment="deleteAttachment($event)" />
|
@on-delete-attachment="deleteAttachment($event)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -564,11 +564,11 @@
|
||||||
:item="item"
|
:item="item"
|
||||||
:form="form"
|
:form="form"
|
||||||
:collection="collection"
|
:collection="collection"
|
||||||
@onSetDocument="setDocument"
|
@on-set-document="setDocument"
|
||||||
@onRemoveDocument="removeDocument"
|
@on-remove-document="removeDocument"
|
||||||
@onSetFileDocument="setFileDocument"
|
@on-set-file-document="setFileDocument"
|
||||||
@onSetTextDocument="setTextDocument"
|
@on-set-text-document="setTextDocument"
|
||||||
@onSetURLDocument="setURLDocument" />
|
@on-set-url-document="setURLDocument" />
|
||||||
|
|
||||||
<hr v-if="shouldDisplayItemEditionDocument && shouldDisplayItemEditionThumbnail">
|
<hr v-if="shouldDisplayItemEditionDocument && shouldDisplayItemEditionThumbnail">
|
||||||
|
|
||||||
|
@ -579,9 +579,9 @@
|
||||||
:form="form"
|
:form="form"
|
||||||
:collection="collection"
|
:collection="collection"
|
||||||
:is-loading="isLoading"
|
:is-loading="isLoading"
|
||||||
@onDeleteThumbnail="deleteThumbnail"
|
@on-delete-thumbnail="deleteThumbnail"
|
||||||
@onUpdateThumbnailAlt="($event) => onUpdateThumbnailAlt($event)"
|
@on-update-thumbnail-alt="($event) => onUpdateThumbnailAlt($event)"
|
||||||
@openThumbnailMediaFrame="thumbnailMediaFrame.openFrame($event)" />
|
@open-thumbnail-media-frame="thumbnailMediaFrame.openFrame($event)" />
|
||||||
|
|
||||||
<hr v-if="(shouldDisplayItemEditionAttachments && !$adminOptions.itemEditionAttachmentsInsideTabs) || hasEndLeftForm">
|
<hr v-if="(shouldDisplayItemEditionAttachments && !$adminOptions.itemEditionAttachmentsInsideTabs) || hasEndLeftForm">
|
||||||
|
|
||||||
|
@ -594,8 +594,8 @@
|
||||||
:is-loading="isLoading"
|
:is-loading="isLoading"
|
||||||
:total-attachments="totalAttachments"
|
:total-attachments="totalAttachments"
|
||||||
:should-load-attachments="shouldLoadAttachments"
|
:should-load-attachments="shouldLoadAttachments"
|
||||||
@openAttachmentsMediaFrame="($event) => attachmentsMediaFrame.openFrame($event)"
|
@open-attachments-media-frame="($event) => attachmentsMediaFrame.openFrame($event)"
|
||||||
@onDeleteAttachment="deleteAttachment($event)" />
|
@on-delete-attachment="deleteAttachment($event)" />
|
||||||
|
|
||||||
<hr v-if="hasEndLeftForm">
|
<hr v-if="hasEndLeftForm">
|
||||||
|
|
||||||
|
@ -615,6 +615,12 @@
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<transition
|
||||||
|
mode="out-in"
|
||||||
|
:name="(isOnSequenceEdit && sequenceRightDirection != undefined) ? (sequenceRightDirection ? 'page-right' : 'page-left') : ''">
|
||||||
|
|
||||||
<!-- In case user enters this page whithout having permission -->
|
<!-- 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))">
|
<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">
|
<section class="section">
|
||||||
|
@ -649,8 +655,8 @@
|
||||||
v-if="!$adminOptions.mobileAppMode"
|
v-if="!$adminOptions.mobileAppMode"
|
||||||
class="update-info-section">
|
class="update-info-section">
|
||||||
<p
|
<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 : '') + "." }}
|
{{ $i18n.get('label_sequence_editing_item') + " " + itemPosition + " " + $i18n.get('info_of') + " " + ((group != null && group.items_count != undefined) ? group.items_count : '') + "." }}
|
||||||
</p>
|
</p>
|
||||||
<p class="footer-message">
|
<p class="footer-message">
|
||||||
|
@ -662,28 +668,37 @@
|
||||||
</span>
|
</span>
|
||||||
<span>{{ $i18n.get('info_updating_metadata_values') }}</span>
|
<span>{{ $i18n.get('info_updating_metadata_values') }}</span>
|
||||||
</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">
|
<span class="help is-danger">
|
||||||
{{ formErrorMessage }}
|
{{ formErrorMessage }}
|
||||||
<item-metadatum-errors-tooltip
|
<item-metadatum-errors-tooltip
|
||||||
v-if="formErrors.length"
|
v-if="errors.length"
|
||||||
:form-errors="formErrors" />
|
:form-errors="errors" />
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- Comment Status ------------------------ -->
|
<!-- Comment Status ------------------------ -->
|
||||||
<div
|
<div
|
||||||
|
v-if="collection && collection.allow_comments && collection.allow_comments == 'open' && !$adminOptions.hideItemEditionCommentsToggle"
|
||||||
style="margin-left: 2em;"
|
style="margin-left: 2em;"
|
||||||
class="section-status"
|
class="section-status">
|
||||||
v-if="collection && collection.allow_comments && collection.allow_comments == 'open' && !$adminOptions.hideItemEditionCommentsToggle">
|
|
||||||
<div class="field has-addons">
|
<div class="field has-addons">
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-comment-status"
|
id="tainacan-checkbox-comment-status"
|
||||||
|
v-model="form.comment_status"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
true-value="open"
|
true-value="open"
|
||||||
false-value="closed"
|
false-value="closed">
|
||||||
v-model="form.comment_status">
|
|
||||||
<span class="icon has-text-gray4">
|
<span class="icon has-text-gray4">
|
||||||
<i class="tainacan-icon tainacan-icon-comment" />
|
<i class="tainacan-icon tainacan-icon-comment" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -708,21 +723,22 @@
|
||||||
:current-user-can-delete="item && item.current_user_can_delete"
|
:current-user-can-delete="item && item.current_user_can_delete"
|
||||||
:current-user-can-publish="collection && collection.current_user_can_publish_items"
|
:current-user-can-publish="collection && collection.current_user_can_publish_items"
|
||||||
:is-editing-item-metadata-inside-iframe="isEditingItemMetadataInsideIframe"
|
:is-editing-item-metadata-inside-iframe="isEditingItemMetadataInsideIframe"
|
||||||
@onSubmit="onSubmit"
|
@on-submit="onSubmit"
|
||||||
@onDiscard="onDiscard"
|
@on-discard="onDiscard"
|
||||||
@onPrevInSequence="onPrevInSequence"
|
@on-prev-in-sequence="onPrevInSequence"
|
||||||
@onNextInSequence="onNextInSequence" />
|
@on-next-in-sequence="onNextInSequence" />
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { nextTick, defineAsyncComponent } from 'vue';
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
|
|
||||||
import { eventBusItemMetadata } from '../../js/event-bus-item-metadata';
|
|
||||||
import wpMediaFrames from '../../js/wp-media-frames';
|
import wpMediaFrames from '../../js/wp-media-frames';
|
||||||
import { formHooks } from '../../js/mixins';
|
import { formHooks } from '../../js/mixins';
|
||||||
|
import { itemMetadataMixin } from '../../js/item-metadata-mixin';
|
||||||
|
|
||||||
import RelatedItemsList from '../lists/related-items-list.vue';
|
import RelatedItemsList from '../lists/related-items-list.vue';
|
||||||
import CustomDialog from '../other/custom-dialog.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';
|
||||||
import 'swiper/css/mousewheel';
|
import 'swiper/css/mousewheel';
|
||||||
import 'swiper/css/navigation';
|
import 'swiper/css/navigation';
|
||||||
import Swiper, { Mousewheel, Navigation } from 'swiper';
|
|
||||||
|
import Swiper from 'swiper';
|
||||||
|
import { Mousewheel, Navigation } from 'swiper/modules';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ItemEditionForm',
|
name: 'ItemEditionForm',
|
||||||
|
@ -747,9 +765,10 @@ export default {
|
||||||
ItemThumbnailEditionForm,
|
ItemThumbnailEditionForm,
|
||||||
ItemDocumentEditionForm,
|
ItemDocumentEditionForm,
|
||||||
ItemAttachmentsEditionForm,
|
ItemAttachmentsEditionForm,
|
||||||
ItemFormFooterButtons
|
ItemFormFooterButtons,
|
||||||
|
TainacanFormItem: defineAsyncComponent(() => import('../metadata-types/tainacan-form-item.vue')),
|
||||||
},
|
},
|
||||||
mixins: [ formHooks ],
|
mixins: [ formHooks, itemMetadataMixin ],
|
||||||
beforeRouteLeave ( to, from, next ) {
|
beforeRouteLeave ( to, from, next ) {
|
||||||
if (this.item.status == 'auto-draft') {
|
if (this.item.status == 'auto-draft') {
|
||||||
this.$buefy.modal.open({
|
this.$buefy.modal.open({
|
||||||
|
@ -771,15 +790,18 @@ export default {
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'toggleItemEditionFooterDropdown'
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
swiper: {},
|
swiper: {},
|
||||||
selected: 'Home',
|
selected: 'Home',
|
||||||
pageTitle: '',
|
pageTitle: '',
|
||||||
itemId: Number,
|
itemId: [String, Number],
|
||||||
item: {},
|
item: {},
|
||||||
itemRequestCancel: undefined,
|
itemRequestCancel: undefined,
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
sequenceId: Number,
|
sequenceId: Number,
|
||||||
itemPosition: Number,
|
itemPosition: Number,
|
||||||
isCreatingNewItem: false,
|
isCreatingNewItem: false,
|
||||||
|
@ -791,7 +813,7 @@ export default {
|
||||||
metadataSectionCollapses: [],
|
metadataSectionCollapses: [],
|
||||||
collapseAll: true,
|
collapseAll: true,
|
||||||
form: {
|
form: {
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
status: '',
|
status: '',
|
||||||
document: '',
|
document: '',
|
||||||
document_type: '',
|
document_type: '',
|
||||||
|
@ -827,11 +849,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
collection() {
|
...mapGetters('collection', {
|
||||||
return this.getCollection()
|
'collection': 'getCollection'
|
||||||
},
|
}),
|
||||||
itemMetadata() {
|
itemMetadata() {
|
||||||
const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata()));
|
const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata()));
|
||||||
|
|
||||||
const tweakedItemMetadata = realItemMetadata.map((anItemMetadatum) => {
|
const tweakedItemMetadata = realItemMetadata.map((anItemMetadatum) => {
|
||||||
|
|
||||||
// We need this because repository level metadata have an array of section IDs
|
// We need this because repository level metadata have an array of section IDs
|
||||||
|
@ -854,30 +877,20 @@ export default {
|
||||||
});
|
});
|
||||||
return tweakedItemMetadata;
|
return tweakedItemMetadata;
|
||||||
},
|
},
|
||||||
metadataSections() {
|
...mapGetters('metadata', {
|
||||||
return this.getMetadataSections();
|
'metadataSections': 'getMetadataSections'
|
||||||
},
|
}),
|
||||||
lastUpdated() {
|
...mapGetters('item', {
|
||||||
return this.getLastUpdated();
|
'totalAttachments': 'getTotalAttachments',
|
||||||
},
|
'lastUpdated': 'getLastUpdated'
|
||||||
group() {
|
}),
|
||||||
return this.getGroup();
|
...mapGetters('bulkedition', {
|
||||||
},
|
'itemIdInSequence': 'getItemIdInSequence',
|
||||||
itemIdInSequence() {
|
'group': 'getGroup'
|
||||||
return this.getItemIdInSequence();
|
}),
|
||||||
},
|
|
||||||
totalAttachments() {
|
|
||||||
return this.getTotalAttachments();
|
|
||||||
},
|
|
||||||
totalRelatedItems() {
|
totalRelatedItems() {
|
||||||
return (this.item && this.item.related_items) ? Object.values(this.item.related_items).reduce((totalItems, aRelatedItemsGroup) => totalItems + parseInt(aRelatedItemsGroup.total_items), 0) : false;
|
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() {
|
isEditingItemMetadataInsideIframe() {
|
||||||
return this.$route.query && this.$route.query.editingmetadata;
|
return this.$route.query && this.$route.query.editingmetadata;
|
||||||
},
|
},
|
||||||
|
@ -946,7 +959,7 @@ export default {
|
||||||
|
|
||||||
// Clear form variables
|
// Clear form variables
|
||||||
this.cleanItemMetadata();
|
this.cleanItemMetadata();
|
||||||
eventBusItemMetadata.clearAllErrors();
|
this.clearAllErrors();
|
||||||
this.formErrorMessage = '';
|
this.formErrorMessage = '';
|
||||||
|
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
@ -974,7 +987,7 @@ export default {
|
||||||
if (typeof this.swiper.update == 'function')
|
if (typeof this.swiper.update == 'function')
|
||||||
this.swiper.update();
|
this.swiper.update();
|
||||||
else {
|
else {
|
||||||
this.$nextTick(() => {
|
nextTick(() => {
|
||||||
this.swiper = new Swiper('#tainacanTabsSwiper', {
|
this.swiper = new Swiper('#tainacanTabsSwiper', {
|
||||||
watchOverflow: true,
|
watchOverflow: true,
|
||||||
mousewheel: true,
|
mousewheel: true,
|
||||||
|
@ -994,13 +1007,14 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// Obtains collection ID
|
// Obtains collection ID
|
||||||
this.cleanItemMetadata();
|
this.cleanItemMetadata();
|
||||||
eventBusItemMetadata.clearAllErrors();
|
this.clearAllErrors();
|
||||||
this.formErrorMessage = '';
|
this.formErrorMessage = '';
|
||||||
this.collectionId = this.$route.params.collectionId;
|
this.collectionId = this.$route.params.collectionId;
|
||||||
this.form.collectionId = this.collectionId;
|
this.form.collectionId = this.collectionId;
|
||||||
|
@ -1062,12 +1076,12 @@ export default {
|
||||||
* Creates the conditional metadata set to later watch values
|
* Creates the conditional metadata set to later watch values
|
||||||
* of certain metadata that control sections visibility.
|
* of certain metadata that control sections visibility.
|
||||||
*/
|
*/
|
||||||
eventBusItemMetadata.conditionalSections = {};
|
this.conditionalSections = {};
|
||||||
for (let metadataSection of metadataSections) {
|
for (let metadataSection of metadataSections) {
|
||||||
if ( metadataSection.is_conditional_section == 'yes') {
|
if ( metadataSection.is_conditional_section == 'yes') {
|
||||||
const conditionalSectionId = Object.keys(metadataSection.conditional_section_rules);
|
const conditionalSectionId = Object.keys(metadataSection.conditional_section_rules);
|
||||||
if ( conditionalSectionId.length ) {
|
if ( conditionalSectionId.length ) {
|
||||||
eventBusItemMetadata.conditionalSections[metadataSection.id] = {
|
this.conditionalSections[metadataSection.id] = {
|
||||||
sectionId: metadataSection.id,
|
sectionId: metadataSection.id,
|
||||||
metadatumId: conditionalSectionId[0],
|
metadatumId: conditionalSectionId[0],
|
||||||
metadatumValues: metadataSection.conditional_section_rules[conditionalSectionId[0]],
|
metadatumValues: metadataSection.conditional_section_rules[conditionalSectionId[0]],
|
||||||
|
@ -1083,22 +1097,13 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Sets feedback variables
|
// 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();
|
this.cleanLastUpdated();
|
||||||
|
|
||||||
// Updates variables for metadata navigation from compound childs
|
// Updates variables for metadata navigation from compound childs
|
||||||
eventBusItemMetadata.$on('isOnFirstMetadatumOfCompoundNavigation', (isOnFirstMetadatumOfCompoundNavigation) => {
|
this.$emitter.on('isOnFirstMetadatumOfCompoundNavigation', (isOnFirstMetadatumOfCompoundNavigation) => {
|
||||||
this.isOnFirstMetadatumOfCompoundNavigation = isOnFirstMetadatumOfCompoundNavigation
|
this.isOnFirstMetadatumOfCompoundNavigation = isOnFirstMetadatumOfCompoundNavigation
|
||||||
});
|
});
|
||||||
eventBusItemMetadata.$on('isOnLastMetadatumOfCompoundNavigation', (isOnLastMetadatumOfCompoundNavigation) => {
|
this.$emitter.on('isOnLastMetadatumOfCompoundNavigation', (isOnLastMetadatumOfCompoundNavigation) => {
|
||||||
this.isOnLastMetadatumOfCompoundNavigation = isOnLastMetadatumOfCompoundNavigation
|
this.isOnLastMetadatumOfCompoundNavigation = isOnLastMetadatumOfCompoundNavigation
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1110,11 +1115,9 @@ export default {
|
||||||
if (this.$adminOptions.mobileAppMode)
|
if (this.$adminOptions.mobileAppMode)
|
||||||
this.isMobileSubheaderOpen = true;
|
this.isMobileSubheaderOpen = true;
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeUnmount () {
|
||||||
eventBusItemMetadata.$off('isUpdatingValue');
|
this.$emitter.off('isOnFirstMetadatumOfCompoundNavigation');
|
||||||
eventBusItemMetadata.$off('hasErrorsOnForm');
|
this.$emitter.off('isOnLastMetadatumOfCompoundNavigation');
|
||||||
eventBusItemMetadata.$off('isOnFirstMetadatumOfCompoundNavigation');
|
|
||||||
eventBusItemMetadata.$off('isOnLastMetadatumOfCompoundNavigation');
|
|
||||||
window.removeEventListener('resize', this.handleWindowResize);
|
window.removeEventListener('resize', this.handleWindowResize);
|
||||||
if (typeof this.swiper.destroy == 'function')
|
if (typeof this.swiper.destroy == 'function')
|
||||||
this.swiper.destroy();
|
this.swiper.destroy();
|
||||||
|
@ -1137,30 +1140,17 @@ export default {
|
||||||
]),
|
]),
|
||||||
...mapGetters('item',[
|
...mapGetters('item',[
|
||||||
'getItemMetadata',
|
'getItemMetadata',
|
||||||
'getTotalAttachments',
|
|
||||||
'getLastUpdated',
|
|
||||||
'getAttachments'
|
|
||||||
]),
|
]),
|
||||||
...mapActions('collection', [
|
...mapActions('collection', [
|
||||||
'deleteItem',
|
'deleteItem',
|
||||||
]),
|
]),
|
||||||
...mapGetters('collection', [
|
|
||||||
'getCollection',
|
|
||||||
]),
|
|
||||||
...mapActions('bulkedition', [
|
...mapActions('bulkedition', [
|
||||||
'fetchItemIdInSequence',
|
'fetchItemIdInSequence',
|
||||||
'fetchSequenceGroup'
|
'fetchSequenceGroup'
|
||||||
]),
|
]),
|
||||||
...mapGetters('bulkedition', [
|
|
||||||
'getItemIdInSequence',
|
|
||||||
'getGroup'
|
|
||||||
]),
|
|
||||||
...mapActions('metadata',[
|
...mapActions('metadata',[
|
||||||
'fetchMetadataSections'
|
'fetchMetadataSections'
|
||||||
]),
|
]),
|
||||||
...mapGetters('metadata',[
|
|
||||||
'getMetadataSections'
|
|
||||||
]),
|
|
||||||
onSubmit(status, sequenceDirection) {
|
onSubmit(status, sequenceDirection) {
|
||||||
|
|
||||||
// Puts loading on Item edition
|
// Puts loading on Item edition
|
||||||
|
@ -1182,7 +1172,7 @@ export default {
|
||||||
promise = this.updateItem(data);
|
promise = this.updateItem(data);
|
||||||
|
|
||||||
// Clear errors so we don't have them duplicated from api
|
// Clear errors so we don't have them duplicated from api
|
||||||
eventBusItemMetadata.errors = [];
|
this.errors = [];
|
||||||
|
|
||||||
promise.then(updatedItem => {
|
promise.then(updatedItem => {
|
||||||
|
|
||||||
|
@ -1241,7 +1231,7 @@ export default {
|
||||||
if (errors.errors) {
|
if (errors.errors) {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBusItemMetadata.errors.push({
|
this.errors.push({
|
||||||
metadatum_id: metadatum,
|
metadatum_id: metadatum,
|
||||||
errors: error[metadatum]
|
errors: error[metadatum]
|
||||||
});
|
});
|
||||||
|
@ -1255,6 +1245,12 @@ export default {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
hasErrorsOnForm(hasErrors) {
|
||||||
|
if (hasErrors)
|
||||||
|
this.formErrorMessage = this.formErrorMessage ? this.formErrorMessage : this.$i18n.get('info_errors_in_form');
|
||||||
|
else
|
||||||
|
this.formErrorMessage = '';
|
||||||
|
},
|
||||||
onDiscard() {
|
onDiscard() {
|
||||||
if (!this.$adminOptions.itemEditionMode && !this.$adminOptions.mobileAppMode)
|
if (!this.$adminOptions.itemEditionMode && !this.$adminOptions.mobileAppMode)
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
|
@ -1271,13 +1267,13 @@ export default {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
|
||||||
// Updates Collection BreadCrumb
|
// Updates Collection BreadCrumb
|
||||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||||
{ path: '', label: this.$i18n.get('new') }
|
{ path: '', label: this.$i18n.get('new') }
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Clear errors so we don't have them duplicated from api
|
// Clear errors so we don't have them duplicated from api
|
||||||
eventBusItemMetadata.errors = [];
|
this.errors = [];
|
||||||
|
|
||||||
// Creates draft Item
|
// Creates draft Item
|
||||||
this.form.comment_status = this.form.comment_status == 'open' ? 'open' : 'closed';
|
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 a parameter was passed with a suggestion of item title, also send a patch to item metadata
|
||||||
if (this.$route.query.newitemtitle) {
|
if (this.$route.query.newitemtitle) {
|
||||||
eventBusItemMetadata.$emit('input', {
|
this.updateItemMetadataValue({
|
||||||
itemId: this.itemId,
|
itemId: this.itemId,
|
||||||
metadatumId: this.$route.query.newmetadatumid,
|
metadatumId: this.$route.query.newmetadatumid,
|
||||||
values: this.$route.query.newitemtitle,
|
values: this.$route.query.newitemtitle,
|
||||||
|
@ -1350,8 +1346,8 @@ export default {
|
||||||
const currentItemMetadatum = metadata.find(anItemMetadatum => anItemMetadatum.metadatum.id == this.conditionalSections[conditionalSectionId].metadatumId);
|
const currentItemMetadatum = metadata.find(anItemMetadatum => anItemMetadatum.metadatum.id == this.conditionalSections[conditionalSectionId].metadatumId);
|
||||||
if (currentItemMetadatum) {
|
if (currentItemMetadatum) {
|
||||||
const itemMetadatumValues = Array.isArray(currentItemMetadatum.value) ? currentItemMetadatum.value : [ currentItemMetadatum.value ];
|
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];
|
const conditionalValues = Array.isArray(this.conditionalSections[conditionalSectionId].metadatumValues) ? this.conditionalSections[conditionalSectionId].metadatumValues : [this.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;
|
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) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBusItemMetadata.errors.push({
|
this.errors.push({
|
||||||
metadatum_id: metadatum,
|
metadatum_id: metadatum,
|
||||||
errors: error[metadatum]
|
errors: error[metadatum]
|
||||||
});
|
});
|
||||||
|
@ -1488,7 +1484,7 @@ export default {
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBusItemMetadata.errors.push({
|
this.errors.push({
|
||||||
metadatum_id: metadatum,
|
metadatum_id: metadatum,
|
||||||
errors: error[metadatum]
|
errors: error[metadatum]
|
||||||
});
|
});
|
||||||
|
@ -1516,7 +1512,7 @@ export default {
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBusItemMetadata.errors.push({
|
this.errors.push({
|
||||||
metadatum_id: metadatum,
|
metadatum_id: metadatum,
|
||||||
errors: error[metadatum]
|
errors: error[metadatum]
|
||||||
});
|
});
|
||||||
|
@ -1591,7 +1587,7 @@ export default {
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
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;
|
this.formErrorMessage = errors.error_message;
|
||||||
|
@ -1657,18 +1653,18 @@ export default {
|
||||||
this.metadataCollapses[i] = this.collapseAll;
|
this.metadataCollapses[i] = this.collapseAll;
|
||||||
|
|
||||||
for (let i = 0; i < this.metadataSectionCollapses.length; i++)
|
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) {
|
onChangeCollapse(event, index) {
|
||||||
if (event && !this.metadataCollapses[index] && this.itemMetadata[index].metadatum && this.itemMetadata[index].metadatum['metadata_type'] === "Tainacan\\Metadata_Types\\GeoCoordinate")
|
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);
|
this.metadataCollapses.splice(index, 1, event);
|
||||||
},
|
},
|
||||||
toggleMetadataSectionCollapse(sectionIndex) {
|
toggleMetadataSectionCollapse(sectionIndex) {
|
||||||
if (!this.isMetadataNavigation)
|
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() {
|
onDeletePermanently() {
|
||||||
this.$buefy.modal.open({
|
this.$buefy.modal.open({
|
||||||
|
@ -1709,14 +1705,14 @@ export default {
|
||||||
|
|
||||||
// Updates Collection BreadCrumb
|
// Updates Collection BreadCrumb
|
||||||
if (this.isOnSequenceEdit) {
|
if (this.isOnSequenceEdit) {
|
||||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
||||||
{ path: '', label: this.$i18n.get('sequence') },
|
{ path: '', label: this.$i18n.get('sequence') },
|
||||||
{ path: '', label: this.item.title },
|
{ path: '', label: this.item.title },
|
||||||
{ path: '', label: this.$i18n.get('edit') }
|
{ path: '', label: this.$i18n.get('edit') }
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
this.$root.$emit('onCollectionBreadCrumbUpdate', [
|
this.$emitter.emit('onCollectionBreadCrumbUpdate', [
|
||||||
{ path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items') },
|
{ 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: this.$routerHelper.getItemPath(this.form.collectionId, this.itemId), label: this.item.title },
|
||||||
{ path: '', label: this.$i18n.get('edit') }
|
{ path: '', label: this.$i18n.get('edit') }
|
||||||
|
@ -1724,7 +1720,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fills hook forms with it's real values
|
// Fills hook forms with it's real values
|
||||||
this.$nextTick()
|
nextTick()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.updateExtraFormData(this.item);
|
this.updateExtraFormData(this.item);
|
||||||
});
|
});
|
||||||
|
@ -1801,8 +1797,8 @@ export default {
|
||||||
this.openMetadataNameFilter = false;
|
this.openMetadataNameFilter = false;
|
||||||
},
|
},
|
||||||
handleWindowResize: _.debounce( function() {
|
handleWindowResize: _.debounce( function() {
|
||||||
this.$nextTick(() => {
|
nextTick(() => {
|
||||||
eventBusItemMetadata.$emit('itemEditionFormResize');
|
this.$emitter.emit('itemEditionFormResize');
|
||||||
if (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)
|
if (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth)
|
||||||
this.isMobileScreen = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= 768;
|
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';
|
const isPreviouslyFocusedOnCompoundMetadatum = previouslyFocusedMetadatum.metadatum && previouslyFocusedMetadatum.metadatum.metadata_type === 'Tainacan\\Metadata_Types\\Compound';
|
||||||
|
|
||||||
if (isPreviouslyFocusedOnCompoundMetadatum || this.isCurrentlyFocusedOnCompoundMetadatum)
|
if (isPreviouslyFocusedOnCompoundMetadatum || this.isCurrentlyFocusedOnCompoundMetadatum)
|
||||||
eventBusItemMetadata.$emit('focusPreviousChildMetadatum');
|
this.$emitter.emit('focusPreviousChildMetadatum');
|
||||||
|
|
||||||
if ( !this.isCurrentlyFocusedOnCompoundMetadatum || (this.isCurrentlyFocusedOnCompoundMetadatum && this.isOnFirstMetadatumOfCompoundNavigation) )
|
if ( !this.isCurrentlyFocusedOnCompoundMetadatum || (this.isCurrentlyFocusedOnCompoundMetadatum && this.isOnFirstMetadatumOfCompoundNavigation) )
|
||||||
this.setMetadatumFocus({ index: this.focusedMetadatum - 1, scrollIntoView: true });
|
this.setMetadatumFocus({ index: this.focusedMetadatum - 1, scrollIntoView: true });
|
||||||
},
|
},
|
||||||
focusNextMetadatum() {
|
focusNextMetadatum() {
|
||||||
if (this.isCurrentlyFocusedOnCompoundMetadatum && !this.isOnLastMetadatumOfCompoundNavigation)
|
if (this.isCurrentlyFocusedOnCompoundMetadatum && !this.isOnLastMetadatumOfCompoundNavigation)
|
||||||
eventBusItemMetadata.$emit('focusNextChildMetadatum');
|
this.$emitter.emit('focusNextChildMetadatum');
|
||||||
|
|
||||||
if ( !this.isCurrentlyFocusedOnCompoundMetadatum || (this.isCurrentlyFocusedOnCompoundMetadatum && this.isOnLastMetadatumOfCompoundNavigation) )
|
if ( !this.isCurrentlyFocusedOnCompoundMetadatum || (this.isCurrentlyFocusedOnCompoundMetadatum && this.isOnLastMetadatumOfCompoundNavigation) )
|
||||||
this.setMetadatumFocus({ index: this.focusedMetadatum + 1, scrollIntoView: true });
|
this.setMetadatumFocus({ index: this.focusedMetadatum + 1, scrollIntoView: true });
|
||||||
|
@ -1879,7 +1875,7 @@ export default {
|
||||||
},
|
},
|
||||||
getMetadatumOrderInSection(sectionIndex, metadatum) {
|
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;
|
return -1;
|
||||||
|
|
||||||
let enabledMetadata = [];
|
let enabledMetadata = [];
|
||||||
|
@ -2153,7 +2149,7 @@ export default {
|
||||||
.metadata-navigation {
|
.metadata-navigation {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
.metadata-navigation /deep/ .button {
|
.metadata-navigation :deep(.button) {
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
min-height: 2.25em;
|
min-height: 2.25em;
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
<!-- Item edition inside iframe -->
|
<!-- Item edition inside iframe -->
|
||||||
<template v-if="isEditingItemMetadataInsideIframe">
|
<template v-if="isEditingItemMetadataInsideIframe">
|
||||||
<button
|
<button
|
||||||
@click="$emit('onSubmit')"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-secondary">
|
class="button is-secondary"
|
||||||
|
@click="$emit('on-submit')">
|
||||||
{{ $i18n.get('label_back_to_related_item') }}
|
{{ $i18n.get('label_back_to_related_item') }}
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
<!-- Sequence edition Previous -->
|
<!-- Sequence edition Previous -->
|
||||||
<button
|
<button
|
||||||
v-if="isOnSequenceEdit && hasPreviousItemOnSequenceEdit"
|
v-if="isOnSequenceEdit && hasPreviousItemOnSequenceEdit"
|
||||||
@click="$emit('onPrevInSequence')"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="button sequence-button">
|
class="button sequence-button"
|
||||||
|
@click="$emit('on-prev-in-sequence')">
|
||||||
<span class="icon is-large">
|
<span class="icon is-large">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-previous" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-previous" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -30,14 +30,14 @@
|
||||||
<template v-if="(status == 'auto-draft' || status == undefined)">
|
<template v-if="(status == 'auto-draft' || status == undefined)">
|
||||||
<button
|
<button
|
||||||
v-if="!$adminOptions.mobileAppMode"
|
v-if="!$adminOptions.mobileAppMode"
|
||||||
@click="$emit('onDiscard')"
|
|
||||||
type="button"
|
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
|
<button
|
||||||
@click="openItemCreationStatusDialog"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-secondary"
|
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>
|
</template>
|
||||||
|
|
||||||
<!-- Item is public, draft or private -->
|
<!-- Item is public, draft or private -->
|
||||||
|
@ -46,9 +46,9 @@
|
||||||
<!-- Send items to Trash -->
|
<!-- Send items to Trash -->
|
||||||
<button
|
<button
|
||||||
v-if="!isOnSequenceEdit && currentUserCanDelete && !$adminOptions.mobileAppMode"
|
v-if="!isOnSequenceEdit && currentUserCanDelete && !$adminOptions.mobileAppMode"
|
||||||
@click="$emit('onSubmit', 'trash')"
|
|
||||||
type="button"
|
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-if="!isMobileScreen">{{ $i18n.get('label_send_to_trash') }}</span>
|
||||||
<span v-else>{{ $i18n.get('status_trash') }}</span>
|
<span v-else>{{ $i18n.get('status_trash') }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -67,17 +67,17 @@
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<button
|
<button
|
||||||
:disabled="hasSomeError && (status == 'publish' || status == 'private')"
|
: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"
|
type="button"
|
||||||
class="button"
|
class="button"
|
||||||
:class="{
|
:class="{
|
||||||
'is-success': status == 'publish' || status == 'private',
|
'is-success': status == 'publish' || status == 'private',
|
||||||
'is-secondary': status == 'draft'
|
'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') }}
|
{{ $i18n.get('label_update') }}
|
||||||
<span
|
<span
|
||||||
v-if="isOnSequenceEdit && !isCurrentItemOnSequenceEdit"
|
v-if="isOnSequenceEdit && !isCurrentItemOnSequenceEdit"
|
||||||
|
@ -87,21 +87,21 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="!$adminOptions.mobileAppMode"
|
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;"
|
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" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowup" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
|
:class="{ 'is-forced-last-option': status == 'draft' }"
|
||||||
|
aria-role="listitem"
|
||||||
@click="$emit(
|
@click="$emit(
|
||||||
'onSubmit',
|
'on-submit',
|
||||||
'draft',
|
'draft',
|
||||||
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
||||||
)"
|
)">
|
||||||
:class="{ 'is-forced-last-option': status == 'draft' }"
|
|
||||||
aria-role="listitem">
|
|
||||||
<span class="icon has-text-gray4">
|
<span class="icon has-text-gray4">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-draft" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-draft" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -109,13 +109,13 @@
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
v-if="currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption"
|
v-if="currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption"
|
||||||
|
:class="{ 'is-forced-last-option': status == 'private' }"
|
||||||
|
aria-role="listitem"
|
||||||
@click="$emit(
|
@click="$emit(
|
||||||
'onSubmit',
|
'on-submit',
|
||||||
'private',
|
'private',
|
||||||
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
||||||
)"
|
)">
|
||||||
:class="{ 'is-forced-last-option': status == 'private' }"
|
|
||||||
aria-role="listitem">
|
|
||||||
<span class="icon has-text-gray4">
|
<span class="icon has-text-gray4">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-private" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-private" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -123,12 +123,12 @@
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
v-if="currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption"
|
v-if="currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption"
|
||||||
|
aria-role="listitem"
|
||||||
@click="$emit(
|
@click="$emit(
|
||||||
'onSubmit',
|
'on-submit',
|
||||||
'publish',
|
'publish',
|
||||||
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
( (isOnSequenceEdit && !isCurrentItemOnSequenceEdit) ? 'next' : null)
|
||||||
)"
|
)">
|
||||||
aria-role="listitem">
|
|
||||||
<span class="icon has-text-gray4">
|
<span class="icon has-text-gray4">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-public" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-public" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -140,13 +140,13 @@
|
||||||
<button
|
<button
|
||||||
v-else
|
v-else
|
||||||
:disabled="hasSomeError && (status == 'publish' || status == 'private')"
|
:disabled="hasSomeError && (status == 'publish' || status == 'private')"
|
||||||
@click="$emit('onSubmit', status)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="button"
|
class="button"
|
||||||
:class="{
|
:class="{
|
||||||
'is-success': status == 'publish' || status == 'private',
|
'is-success': status == 'publish' || status == 'private',
|
||||||
'is-secondary': status == 'draft'
|
'is-secondary': status == 'draft'
|
||||||
}">
|
}"
|
||||||
|
@click="$emit('on-submit', status)">
|
||||||
{{ $i18n.get('label_update') }}
|
{{ $i18n.get('label_update') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@ -156,9 +156,9 @@
|
||||||
<button
|
<button
|
||||||
v-if="!currentUserCanPublish && isOnSequenceEdit && hasNextItemOnSequenceEdit"
|
v-if="!currentUserCanPublish && isOnSequenceEdit && hasNextItemOnSequenceEdit"
|
||||||
:disabled="(status == 'publish' || status == 'private') && hasSomeError"
|
:disabled="(status == 'publish' || status == 'private') && hasSomeError"
|
||||||
@click="$emit('onNextInSequence')"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-success">
|
class="button is-success"
|
||||||
|
@click="$emit('on-next-in-sequence')">
|
||||||
<span>{{ $i18n.get('label_next') }}</span>
|
<span>{{ $i18n.get('label_next') }}</span>
|
||||||
<span class="icon is-large">
|
<span class="icon is-large">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-next" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-next" />
|
||||||
|
@ -168,9 +168,9 @@
|
||||||
<!-- Sequence edition Finish -->
|
<!-- Sequence edition Finish -->
|
||||||
<button
|
<button
|
||||||
v-if="isOnSequenceEdit && isCurrentItemOnSequenceEdit"
|
v-if="isOnSequenceEdit && isCurrentItemOnSequenceEdit"
|
||||||
@click="$router.push($routerHelper.getCollectionPath(collectionId))"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="button sequence-button">
|
class="button sequence-button"
|
||||||
|
@click="$router.push($routerHelper.getCollectionPath(collectionId))">
|
||||||
<span class="icon is-large">
|
<span class="icon is-large">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-approved" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-approved" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -188,7 +188,7 @@ import ItemCreationStatusDialog from '../other/item-creation-status-dialog.vue';
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
status: String,
|
status: String,
|
||||||
collectionId: Number,
|
collectionId: [Number, String],
|
||||||
isOnSequenceEdit: Boolean,
|
isOnSequenceEdit: Boolean,
|
||||||
isCurrentItemOnSequenceEdit: Boolean,
|
isCurrentItemOnSequenceEdit: Boolean,
|
||||||
hasNextItemOnSequenceEdit: Boolean,
|
hasNextItemOnSequenceEdit: Boolean,
|
||||||
|
@ -199,14 +199,20 @@ export default {
|
||||||
currentUserCanPublish: Boolean,
|
currentUserCanPublish: Boolean,
|
||||||
isEditingItemMetadataInsideIframe: Boolean
|
isEditingItemMetadataInsideIframe: Boolean
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'on-submit',
|
||||||
|
'on-next-in-sequence',
|
||||||
|
'on-prev-in-sequence',
|
||||||
|
'on-discard',
|
||||||
|
],
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$parent.$on('toggleItemEditionFooterDropdown', () => {
|
this.$emitter.on('toggleItemEditionFooterDropdown', () => {
|
||||||
if (this.$refs && this.$refs['item-edition-footer-dropdown'])
|
if (this.$refs && this.$refs['item-edition-footer-dropdown'])
|
||||||
this.$refs['item-edition-footer-dropdown'].toggle();
|
this.$refs['item-edition-footer-dropdown'].toggle();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.$parent.$off('toggleItemEditionFooterDropdown');
|
this.$emitter.off('toggleItemEditionFooterDropdown');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openItemCreationStatusDialog() {
|
openItemCreationStatusDialog() {
|
||||||
|
@ -219,7 +225,7 @@ export default {
|
||||||
icon: 'item',
|
icon: 'item',
|
||||||
currentUserCanPublish: this.currentUserCanPublish,
|
currentUserCanPublish: this.currentUserCanPublish,
|
||||||
onConfirm: (selectedStatus) => {
|
onConfirm: (selectedStatus) => {
|
||||||
this.$emit('onSubmit', selectedStatus);
|
this.$emit('on-submit', selectedStatus);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trapFocus: true,
|
trapFocus: true,
|
||||||
|
@ -244,7 +250,7 @@ export default {
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .item-edition-footer-dropdown {
|
:deep(.item-edition-footer-dropdown) {
|
||||||
.dropdown-trigger .button>.icon.is-small {
|
.dropdown-trigger .button>.icon.is-small {
|
||||||
border-left: 1px solid rgba(255,255,255,0.6);
|
border-left: 1px solid rgba(255,255,255,0.6);
|
||||||
margin-left: 0.5em;
|
margin-left: 0.5em;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="!isLoading && !$adminOptions.hideItemEditionThumbnail"
|
v-if="!$adminOptions.hideItemEditionThumbnail"
|
||||||
class="section-box section-thumbnail">
|
class="section-box section-thumbnail">
|
||||||
<div class="thumbnail-field">
|
<div class="thumbnail-field">
|
||||||
<file-item
|
<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))"
|
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">
|
class="image">
|
||||||
<span
|
<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') }}
|
{{ $i18n.get('label_empty_thumbnail') }}
|
||||||
</span>
|
</span>
|
||||||
<img
|
<img
|
||||||
|
@ -57,10 +57,10 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
<div class="thumbnail-buttons-row">
|
<div class="thumbnail-buttons-row">
|
||||||
<a
|
<a
|
||||||
class="button is-rounded is-secondary"
|
|
||||||
id="button-edit-thumbnail"
|
id="button-edit-thumbnail"
|
||||||
|
class="button is-rounded is-secondary"
|
||||||
:aria-label="$i18n.get('label_button_edit_thumb')"
|
:aria-label="$i18n.get('label_button_edit_thumb')"
|
||||||
@click.prevent="($event) => $emit('openThumbnailMediaFrame', $event)">
|
@click.prevent="($event) => $emit('open-thumbnail-media-frame', $event)">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('edit'),
|
content: $i18n.get('edit'),
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
id="button-delete-thumbnail"
|
id="button-delete-thumbnail"
|
||||||
class="button is-rounded is-secondary"
|
class="button is-rounded is-secondary"
|
||||||
:aria-label="$i18n.get('label_button_delete_thumb')"
|
:aria-label="$i18n.get('label_button_delete_thumb')"
|
||||||
@click="$emit('onDeleteThumbnail')">
|
@click="$emit('on-delete-thumbnail')">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('delete'),
|
content: $i18n.get('delete'),
|
||||||
|
@ -107,9 +107,14 @@ export default {
|
||||||
collection: Object,
|
collection: Object,
|
||||||
form: Object
|
form: Object
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'open-thumbnail-media-frame',
|
||||||
|
'on-delete-thumbnail',
|
||||||
|
'on-update-thumbnail-alt'
|
||||||
|
],
|
||||||
methods: {
|
methods: {
|
||||||
updateThumbnailAlt: _.debounce(function($event) {
|
updateThumbnailAlt: _.debounce(function($event) {
|
||||||
this.$emit('onUpdateThumbnailAlt', $event.target.value);
|
this.$emit('on-update-thumbnail-alt', $event.target.value);
|
||||||
}, 750)
|
}, 750)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<form
|
<form
|
||||||
id="metadataSectionEditForm"
|
id="metadataSectionEditForm"
|
||||||
@submit.prevent="saveEdition(form)"
|
|
||||||
autofocus="true"
|
autofocus="true"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal>
|
aria-modal
|
||||||
|
@submit.prevent="saveEdition(form)">
|
||||||
<div
|
<div
|
||||||
v-if="form && Object.keys(form).length"
|
v-if="form && Object.keys(form).length"
|
||||||
class="tainacan-modal-content">
|
class="tainacan-modal-content">
|
||||||
|
@ -31,8 +31,7 @@
|
||||||
:class="formErrors['name'] != undefined ? 'is-danger' : ''">*</span>
|
:class="formErrors['name'] != undefined ? 'is-danger' : ''">*</span>
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata-sections', 'name')"
|
:title="$i18n.getHelperTitle('metadata-sections', 'name')"
|
||||||
:message="$i18n.getHelperMessage('metadata-sections', 'name')"
|
:message="$i18n.getHelperMessage('metadata-sections', 'name')" />
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
|
||||||
</label>
|
</label>
|
||||||
<b-input
|
<b-input
|
||||||
v-model="form.name"
|
v-model="form.name"
|
||||||
|
@ -57,14 +56,13 @@
|
||||||
{{ $i18n.get('label_description') }}
|
{{ $i18n.get('label_description') }}
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata-sections', 'description')"
|
:title="$i18n.getHelperTitle('metadata-sections', 'description')"
|
||||||
:message="$i18n.getHelperMessage('metadata-sections', 'description')"
|
:message="$i18n.getHelperMessage('metadata-sections', 'description')" />
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
|
||||||
</label>
|
</label>
|
||||||
<b-input
|
<b-input
|
||||||
|
v-model="form.description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
name="description"
|
name="description"
|
||||||
rows="3"
|
rows="3"
|
||||||
v-model="form.description"
|
|
||||||
@focus="clearErrors('description')" />
|
@focus="clearErrors('description')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
|
@ -75,16 +73,15 @@
|
||||||
:message="formErrors['description_bellow_name'] != undefined ? formErrors['description_bellow_name'] : ''">
|
:message="formErrors['description_bellow_name'] != undefined ? formErrors['description_bellow_name'] : ''">
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
size="is-small"
|
|
||||||
@input="clearErrors('description_bellow_name')"
|
|
||||||
v-model="form.description_bellow_name"
|
v-model="form.description_bellow_name"
|
||||||
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no"
|
||||||
name="description_bellow_name">
|
name="description_bellow_name"
|
||||||
|
@update:model-value="clearErrors('description_bellow_name')">
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata-sections', 'description_bellow_name')"
|
:title="$i18n.getHelperTitle('metadata-sections', 'description_bellow_name')"
|
||||||
:message="$i18n.getHelperMessage('metadata-sections', 'description_bellow_name')"
|
:message="$i18n.getHelperMessage('metadata-sections', 'description_bellow_name')" />
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
|
||||||
</b-switch>
|
</b-switch>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
|
@ -97,27 +94,26 @@
|
||||||
{{ $i18n.get('label_status') }}
|
{{ $i18n.get('label_status') }}
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata-sections', 'status')"
|
:title="$i18n.getHelperTitle('metadata-sections', 'status')"
|
||||||
:message="$i18n.getHelperMessage('metadata-sections', 'status')"
|
:message="$i18n.getHelperMessage('metadata-sections', 'status')" />
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
|
||||||
</label>
|
</label>
|
||||||
<div class="is-flex is-justify-content-space-between">
|
<div class="is-flex is-justify-content-space-between">
|
||||||
<b-radio
|
<b-radio
|
||||||
@focus="clearErrors('label_status')"
|
|
||||||
id="tainacan-select-status-publish"
|
id="tainacan-select-status-publish"
|
||||||
name="status"
|
|
||||||
v-model="form.status"
|
v-model="form.status"
|
||||||
native-value="publish">
|
name="status"
|
||||||
|
native-value="publish"
|
||||||
|
@focus="clearErrors('label_status')">
|
||||||
<span class="icon has-text-gray3">
|
<span class="icon has-text-gray3">
|
||||||
<i class="tainacan-icon tainacan-icon-public" />
|
<i class="tainacan-icon tainacan-icon-public" />
|
||||||
</span>
|
</span>
|
||||||
{{ $i18n.get('status_public') }}
|
{{ $i18n.get('status_public') }}
|
||||||
</b-radio>
|
</b-radio>
|
||||||
<b-radio
|
<b-radio
|
||||||
@focus="clearErrors('label_status')"
|
|
||||||
id="tainacan-select-status-private"
|
id="tainacan-select-status-private"
|
||||||
name="status"
|
|
||||||
v-model="form.status"
|
v-model="form.status"
|
||||||
native-value="private">
|
name="status"
|
||||||
|
native-value="private"
|
||||||
|
@focus="clearErrors('label_status')">
|
||||||
<span class="icon has-text-gray3">
|
<span class="icon has-text-gray3">
|
||||||
<i class="tainacan-icon tainacan-icon-private" />
|
<i class="tainacan-icon tainacan-icon-private" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -130,8 +126,8 @@
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="form.id !== 'default_section'"
|
v-if="form.id !== 'default_section'"
|
||||||
@click="hideConditionalSectionSettings = !hideConditionalSectionSettings;"
|
class="metadata-form-section"
|
||||||
class="metadata-form-section">
|
@click="hideConditionalSectionSettings = !hideConditionalSectionSettings;">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i
|
<i
|
||||||
class="tainacan-icon"
|
class="tainacan-icon"
|
||||||
|
@ -155,20 +151,21 @@
|
||||||
:message="formErrors['is_conditional_section'] != undefined ? formErrors['is_conditional_section'] : ''">
|
:message="formErrors['is_conditional_section'] != undefined ? formErrors['is_conditional_section'] : ''">
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
size="is-small"
|
|
||||||
@input="clearErrors('is_conditional_section')"
|
|
||||||
v-model="form.is_conditional_section"
|
v-model="form.is_conditional_section"
|
||||||
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no"
|
||||||
name="is_conditional_section">
|
name="is_conditional_section"
|
||||||
|
@update:model-value="clearErrors('is_conditional_section')">
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata-sections', 'is_conditional_section')"
|
:title="$i18n.getHelperTitle('metadata-sections', 'is_conditional_section')"
|
||||||
:message="$i18n.getHelperMessage('metadata-sections', 'is_conditional_section')"
|
:message="$i18n.getHelperMessage('metadata-sections', 'is_conditional_section')" />
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
|
||||||
</b-switch>
|
</b-switch>
|
||||||
</b-field>
|
</b-field>
|
||||||
<div v-if="isConditionalSection && !availableConditionalMetadata.length">
|
<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>
|
</div>
|
||||||
<transition name="filter-item">
|
<transition name="filter-item">
|
||||||
<b-field
|
<b-field
|
||||||
|
@ -180,13 +177,12 @@
|
||||||
{{ $i18n.getHelperTitle('metadata-sections', 'conditional_section_rules') }}
|
{{ $i18n.getHelperTitle('metadata-sections', 'conditional_section_rules') }}
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata-sections', 'conditional_section_rules')"
|
:title="$i18n.getHelperTitle('metadata-sections', 'conditional_section_rules')"
|
||||||
:message="$i18n.getHelperMessage('metadata-sections', 'conditional_section_rules')"
|
:message="$i18n.getHelperMessage('metadata-sections', 'conditional_section_rules')" />
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
|
||||||
</label>
|
</label>
|
||||||
<b-select
|
<b-select
|
||||||
v-model="selectedConditionalMetadatumId"
|
v-model="selectedConditionalMetadatumId"
|
||||||
:placeholder="$i18n.get('label_select_metadatum')"
|
:placeholder="$i18n.get('label_select_metadatum')"
|
||||||
@input="reloadConditionalValueComponent()">
|
@update:model-value="reloadConditionalValueComponent()">
|
||||||
<option
|
<option
|
||||||
v-for="conditionalMetadatum of availableConditionalMetadata"
|
v-for="conditionalMetadatum of availableConditionalMetadata"
|
||||||
:key="conditionalMetadatum.id"
|
:key="conditionalMetadatum.id"
|
||||||
|
@ -206,14 +202,14 @@
|
||||||
{{ selectedConditionalMetadatum.name }}
|
{{ selectedConditionalMetadatum.name }}
|
||||||
</label>
|
</label>
|
||||||
<component
|
<component
|
||||||
v-if="shouldUpdateConditionalValue"
|
|
||||||
:is="selectedConditionalMetadatum.metadata_type_object.component"
|
:is="selectedConditionalMetadatum.metadata_type_object.component"
|
||||||
|
v-if="shouldUpdateConditionalValue"
|
||||||
:forced-component-type="selectedConditionalMetadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
:forced-component-type="selectedConditionalMetadatum.metadata_type_object.component.includes('taxonomy') ? 'tainacan-taxonomy-tag-input' : ''"
|
||||||
:item-metadatum="{ metadatum: selectedConditionalMetadatum }"
|
:item-metadatum="{ metadatum: selectedConditionalMetadatum }"
|
||||||
:value="Array.isArray(selectedConditionalValue) ? selectedConditionalValue[0] : selectedConditionalValue"
|
:value="Array.isArray(selectedConditionalValue) ? selectedConditionalValue[0] : selectedConditionalValue"
|
||||||
:allow-new="false"
|
:allow-new="false"
|
||||||
:maxtags="1"
|
:maxtags="1"
|
||||||
@input="selectConditionalValue"
|
@update:value="($event) => selectConditionalValue($event)"
|
||||||
/>
|
/>
|
||||||
</b-field>
|
</b-field>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -235,11 +231,13 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
@click.prevent="cancelEdition()"
|
@click.prevent="cancelEdition()">
|
||||||
slot="trigger">{{ $i18n.get('cancel') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
<p class="help is-danger">
|
||||||
|
{{ formErrorMessage }}
|
||||||
|
</p>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<b-button
|
<b-button
|
||||||
:loading="isUpdating"
|
:loading="isUpdating"
|
||||||
|
@ -253,11 +251,16 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { nextTick, defineAsyncComponent } from 'vue';
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
import { formHooks } from "../../js/mixins";
|
import { formHooks } from "../../js/mixins";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MetadataSectionEditionForm',
|
name: 'MetadataSectionEditionForm',
|
||||||
|
components:{
|
||||||
|
TainacanSelectbox: defineAsyncComponent(() => import('../metadata-types/selectbox/TainacanSelectbox.vue')),
|
||||||
|
TainacanTaxonomy: defineAsyncComponent(() => import('../metadata-types/taxonomy/TainacanTaxonomy.vue')),
|
||||||
|
},
|
||||||
mixins: [ formHooks ],
|
mixins: [ formHooks ],
|
||||||
props: {
|
props: {
|
||||||
index: '',
|
index: '',
|
||||||
|
@ -265,6 +268,10 @@
|
||||||
collectionId: '',
|
collectionId: '',
|
||||||
isInsideImporterFlow: false,
|
isInsideImporterFlow: false,
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'on-edition-finished',
|
||||||
|
'on-edition-canceled'
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
|
@ -317,7 +324,7 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// Fills hook forms with it's real values
|
// Fills hook forms with it's real values
|
||||||
this.$nextTick()
|
nextTick()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.updateExtraFormData(this.form);
|
this.updateExtraFormData(this.form);
|
||||||
});
|
});
|
||||||
|
@ -348,7 +355,7 @@
|
||||||
this.isUpdating = false;
|
this.isUpdating = false;
|
||||||
this.closedByForm = true;
|
this.closedByForm = true;
|
||||||
|
|
||||||
this.$emit('onEditionFinished');
|
this.$emit('on-edition-finished');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
this.isUpdating = false;
|
this.isUpdating = false;
|
||||||
|
@ -367,7 +374,7 @@
|
||||||
},
|
},
|
||||||
cancelEdition() {
|
cancelEdition() {
|
||||||
this.closedByForm = true;
|
this.closedByForm = true;
|
||||||
this.$emit('onEditionCanceled');
|
this.$emit('on-edition-canceled');
|
||||||
},
|
},
|
||||||
selectConditionalValue(selected) {
|
selectConditionalValue(selected) {
|
||||||
const selectedValues = Array.isArray(selected) ? selected : [ selected ];
|
const selectedValues = Array.isArray(selected) ? selected : [ selected ];
|
||||||
|
@ -408,7 +415,7 @@
|
||||||
.field > .field:not(:last-child) {
|
.field > .field:not(:last-child) {
|
||||||
margin-bottom: 0em;
|
margin-bottom: 0em;
|
||||||
}
|
}
|
||||||
/deep/ .field {
|
:deep(.field) {
|
||||||
-webkit-column-break-inside: avoid;
|
-webkit-column-break-inside: avoid;
|
||||||
page-break-inside: avoid;
|
page-break-inside: avoid;
|
||||||
break-inside: avoid;
|
break-inside: avoid;
|
||||||
|
@ -427,7 +434,7 @@
|
||||||
.tainacan-form .field:not(:last-child) {
|
.tainacan-form .field:not(:last-child) {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
.tainacan-form /deep/ .control-label {
|
.tainacan-form :deep(.control-label) {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
.metadata-form-section {
|
.metadata-form-section {
|
||||||
|
@ -478,10 +485,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
:deep(.is-special-hidden-for-mobile) {
|
||||||
/deep/ .is-special-hidden-for-mobile,
|
&,
|
||||||
/deep/ .is-special-hidden-for-mobile:focus,
|
&:focus,
|
||||||
/deep/ .is-special-hidden-for-mobile:focus-visible {
|
&:focus-visible {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0 !important;
|
height: 0 !important;
|
||||||
|
@ -495,6 +502,7 @@
|
||||||
font-size: 0px !important;
|
font-size: 0px !important;
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.form-submit {
|
.form-submit {
|
||||||
background-color: var(--tainacan-gray1);
|
background-color: var(--tainacan-gray1);
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<form
|
<form
|
||||||
id="metadatumEditForm"
|
id="metadatumEditForm"
|
||||||
@submit.prevent="saveEdition(form)"
|
|
||||||
autofocus="true"
|
autofocus="true"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal>
|
aria-modal
|
||||||
|
@submit.prevent="saveEdition(form)">
|
||||||
<div
|
<div
|
||||||
v-if="form && Object.keys(form).length"
|
v-if="form && Object.keys(form).length"
|
||||||
class="tainacan-modal-content">
|
class="tainacan-modal-content">
|
||||||
|
@ -69,10 +69,10 @@
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||||
</label>
|
</label>
|
||||||
<b-input
|
<b-input
|
||||||
|
v-model="form.description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
name="description"
|
name="description"
|
||||||
rows="3"
|
rows="3"
|
||||||
v-model="form.description"
|
|
||||||
@focus="clearErrors('description')" />
|
@focus="clearErrors('description')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
|
@ -83,12 +83,12 @@
|
||||||
:message="formErrors['description_bellow_name'] != undefined ? formErrors['description_bellow_name'] : ''">
|
:message="formErrors['description_bellow_name'] != undefined ? formErrors['description_bellow_name'] : ''">
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
size="is-small"
|
|
||||||
@input="clearErrors('description_bellow_name')"
|
|
||||||
v-model="form.description_bellow_name"
|
v-model="form.description_bellow_name"
|
||||||
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no"
|
||||||
name="description_bellow_name">
|
name="description_bellow_name"
|
||||||
|
@update:model-value="clearErrors('description_bellow_name')">
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata', 'description_bellow_name')"
|
:title="$i18n.getHelperTitle('metadata', 'description_bellow_name')"
|
||||||
:message="$i18n.getHelperMessage('metadata', 'description_bellow_name')"
|
:message="$i18n.getHelperMessage('metadata', 'description_bellow_name')"
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<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"
|
:addons="false"
|
||||||
:type="formErrors['placeholder'] != undefined ? 'is-danger' : ''"
|
:type="formErrors['placeholder'] != undefined ? 'is-danger' : ''"
|
||||||
:message="formErrors['placeholder'] != undefined ? formErrors['placeholder'] : ''">
|
:message="formErrors['placeholder'] != undefined ? formErrors['placeholder'] : ''">
|
||||||
|
@ -128,22 +128,22 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="is-flex is-justify-content-space-between">
|
<div class="is-flex is-justify-content-space-between">
|
||||||
<b-radio
|
<b-radio
|
||||||
@focus="clearErrors('label_status')"
|
|
||||||
id="tainacan-select-status-publish"
|
id="tainacan-select-status-publish"
|
||||||
name="status"
|
|
||||||
v-model="form.status"
|
v-model="form.status"
|
||||||
native-value="publish">
|
name="status"
|
||||||
|
native-value="publish"
|
||||||
|
@focus="clearErrors('label_status')">
|
||||||
<span class="icon has-text-gray3">
|
<span class="icon has-text-gray3">
|
||||||
<i class="tainacan-icon tainacan-icon-public" />
|
<i class="tainacan-icon tainacan-icon-public" />
|
||||||
</span>
|
</span>
|
||||||
{{ $i18n.get('status_public') }}
|
{{ $i18n.get('status_public') }}
|
||||||
</b-radio>
|
</b-radio>
|
||||||
<b-radio
|
<b-radio
|
||||||
@focus="clearErrors('label_status')"
|
|
||||||
id="tainacan-select-status-private"
|
id="tainacan-select-status-private"
|
||||||
name="status"
|
|
||||||
v-model="form.status"
|
v-model="form.status"
|
||||||
native-value="private">
|
name="status"
|
||||||
|
native-value="private"
|
||||||
|
@focus="clearErrors('label_status')">
|
||||||
<span class="icon has-text-gray3">
|
<span class="icon has-text-gray3">
|
||||||
<i class="tainacan-icon tainacan-icon-private" />
|
<i class="tainacan-icon tainacan-icon-private" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -166,9 +166,9 @@
|
||||||
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
:extra-classes="isRepositoryLevel ? 'tainacan-repository-tooltip' : ''" />
|
||||||
</label>
|
</label>
|
||||||
<b-select
|
<b-select
|
||||||
expanded
|
|
||||||
v-model="form.display"
|
v-model="form.display"
|
||||||
@input="clearErrors('display')">
|
expanded
|
||||||
|
@update:model-value="clearErrors('display')">
|
||||||
<option value="yes">
|
<option value="yes">
|
||||||
{{ $i18n.get('label_display_default') }}
|
{{ $i18n.get('label_display_default') }}
|
||||||
</option>
|
</option>
|
||||||
|
@ -190,12 +190,12 @@
|
||||||
:type="formErrors['required'] != undefined ? 'is-danger' : ''"
|
:type="formErrors['required'] != undefined ? 'is-danger' : ''"
|
||||||
:message="formErrors['required'] != undefined ? formErrors['required'] : ''">
|
:message="formErrors['required'] != undefined ? formErrors['required'] : ''">
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
@input="clearErrors('required')"
|
|
||||||
v-model="form.required"
|
v-model="form.required"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no"
|
||||||
class="is-inline-block"
|
class="is-inline-block"
|
||||||
name="required">
|
name="required"
|
||||||
|
@update:model-value="clearErrors('required')">
|
||||||
{{ $i18n.get('label_required') }}
|
{{ $i18n.get('label_required') }}
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata', 'required')"
|
:title="$i18n.getHelperTitle('metadata', 'required')"
|
||||||
|
@ -209,12 +209,12 @@
|
||||||
:type="formErrors['collection_key'] != undefined ? 'is-danger' : ''"
|
:type="formErrors['collection_key'] != undefined ? 'is-danger' : ''"
|
||||||
:message="formErrors['collection_key'] != undefined ? formErrors['collection_key'] : ''">
|
:message="formErrors['collection_key'] != undefined ? formErrors['collection_key'] : ''">
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
@input="clearErrors('collection_key')"
|
|
||||||
v-model="form.collection_key"
|
v-model="form.collection_key"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no"
|
||||||
class="is-inline-block"
|
class="is-inline-block"
|
||||||
name="collection_key">
|
name="collection_key"
|
||||||
|
@update:model-value="clearErrors('collection_key')">
|
||||||
{{ $i18n.get('label_unique_value') }}
|
{{ $i18n.get('label_unique_value') }}
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata', 'collection_key')"
|
:title="$i18n.getHelperTitle('metadata', 'collection_key')"
|
||||||
|
@ -228,12 +228,12 @@
|
||||||
:type="formErrors['multiple'] != undefined ? 'is-danger' : ''"
|
:type="formErrors['multiple'] != undefined ? 'is-danger' : ''"
|
||||||
:message="formErrors['multiple'] != undefined ? formErrors['multiple'] : ''">
|
:message="formErrors['multiple'] != undefined ? formErrors['multiple'] : ''">
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
@input="clearErrors('multiple')"
|
|
||||||
v-model="form.multiple"
|
v-model="form.multiple"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no"
|
false-value="no"
|
||||||
class="is-inline-block"
|
class="is-inline-block"
|
||||||
name="multiple">
|
name="multiple"
|
||||||
|
@update:model-value="clearErrors('multiple')">
|
||||||
{{ $i18n.get('label_allow_multiple') }}
|
{{ $i18n.get('label_allow_multiple') }}
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata', 'multiple')"
|
:title="$i18n.getHelperTitle('metadata', 'multiple')"
|
||||||
|
@ -250,9 +250,9 @@
|
||||||
:label="$i18n.get('label_limit_max_values')">
|
:label="$i18n.get('label_limit_max_values')">
|
||||||
|
|
||||||
<b-switch
|
<b-switch
|
||||||
|
v-model="showCardinalityOptions"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
:disabled="form.multiple != 'yes'"
|
:disabled="form.multiple != 'yes'" />
|
||||||
v-model="showCardinalityOptions" />
|
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-field
|
<b-field
|
||||||
|
@ -272,17 +272,18 @@
|
||||||
name="cardinality"
|
name="cardinality"
|
||||||
step="1"
|
step="1"
|
||||||
min="2"
|
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>
|
||||||
|
|
||||||
<b-field v-if="!isRepositoryLevel && isInsideImporterFlow">
|
<b-field v-if="!isRepositoryLevel && isInsideImporterFlow">
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
class="is-inline-block"
|
|
||||||
v-model="form.repository_level"
|
v-model="form.repository_level"
|
||||||
@input="clearErrors('repository_level')"
|
class="is-inline-block"
|
||||||
name="repository_level"
|
name="repository_level"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no">
|
false-value="no"
|
||||||
|
@update:model-value="clearErrors('repository_level')">
|
||||||
{{ $i18n.get('label_repository_metadata') }}
|
{{ $i18n.get('label_repository_metadata') }}
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('metadata', 'repository_level')"
|
:title="$i18n.getHelperTitle('metadata', 'repository_level')"
|
||||||
|
@ -313,14 +314,14 @@
|
||||||
v-show="!hideMetadataTypeOptions"
|
v-show="!hideMetadataTypeOptions"
|
||||||
class="options-columns">
|
class="options-columns">
|
||||||
<component
|
<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"
|
:is="form.metadata_type_object.form_component"
|
||||||
:metadatum="form"
|
v-if="(form.metadata_type_object && form.metadata_type_object.form_component) || form.edit_form != ''"
|
||||||
v-model="form.metadata_type_options"/>
|
v-model:value="form.metadata_type_options"
|
||||||
|
:errors="formErrors['metadata_type_options']"
|
||||||
|
:metadatum="form" />
|
||||||
<div
|
<div
|
||||||
v-html="form.edit_form"
|
v-else
|
||||||
v-else/>
|
v-html="form.edit_form" />
|
||||||
|
|
||||||
<!-- Hook for extra Form options -->
|
<!-- Hook for extra Form options -->
|
||||||
<template v-if="hasEndLeftForm">
|
<template v-if="hasEndLeftForm">
|
||||||
|
@ -333,8 +334,8 @@
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@click="showAdvancedOptions = !showAdvancedOptions;"
|
class="metadata-form-section"
|
||||||
class="metadata-form-section">
|
@click="showAdvancedOptions = !showAdvancedOptions;">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i
|
<i
|
||||||
class="tainacan-icon"
|
class="tainacan-icon"
|
||||||
|
@ -374,11 +375,13 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
@click.prevent="cancelEdition()"
|
@click.prevent="cancelEdition()">
|
||||||
slot="trigger">{{ $i18n.get('cancel') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
<p class="help is-danger">
|
||||||
|
{{ formErrorMessage }}
|
||||||
|
</p>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<b-button
|
<b-button
|
||||||
:loading="isUpdating"
|
:loading="isUpdating"
|
||||||
|
@ -392,11 +395,33 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { nextTick } from 'vue';
|
||||||
import {mapActions} from 'vuex';
|
import {mapActions} from 'vuex';
|
||||||
import { formHooks } from "../../js/mixins";
|
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 {
|
export default {
|
||||||
name: 'MetadatumEditionForm',
|
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 ],
|
mixins: [ formHooks ],
|
||||||
props: {
|
props: {
|
||||||
index: '',
|
index: '',
|
||||||
|
@ -406,6 +431,11 @@
|
||||||
isParentMultiple: false,
|
isParentMultiple: false,
|
||||||
isInsideImporterFlow: false
|
isInsideImporterFlow: false
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'on-edition-finished',
|
||||||
|
'on-edition-canceled',
|
||||||
|
'on-error-found'
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
|
@ -421,7 +451,7 @@
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
showCardinalityOptions() {
|
showCardinalityOptions() {
|
||||||
this.form.cardinality = !this.showCardinalityOptions ? 1 : Number(this.form.cardinality);
|
this.form.cardinality = !this.showCardinalityOptions ? '' : Number(this.form.cardinality);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -438,7 +468,7 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// Fills hook forms with it's real values
|
// Fills hook forms with it's real values
|
||||||
this.$nextTick()
|
nextTick()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.updateExtraFormData(this.form);
|
this.updateExtraFormData(this.form);
|
||||||
});
|
});
|
||||||
|
@ -469,7 +499,7 @@
|
||||||
this.isUpdating = false;
|
this.isUpdating = false;
|
||||||
this.closedByForm = true;
|
this.closedByForm = true;
|
||||||
|
|
||||||
this.$emit('onEditionFinished');
|
this.$emit('on-edition-finished');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
this.isUpdating = false;
|
this.isUpdating = false;
|
||||||
|
@ -514,7 +544,7 @@
|
||||||
this.isUpdating = false;
|
this.isUpdating = false;
|
||||||
this.closedByForm = true;
|
this.closedByForm = true;
|
||||||
|
|
||||||
this.$emit('onEditionFinished');
|
this.$emit('on-edition-finished');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
this.isUpdating = false;
|
this.isUpdating = false;
|
||||||
|
@ -524,7 +554,7 @@
|
||||||
this.formErrors[attribute] = error[attribute];
|
this.formErrors[attribute] = error[attribute];
|
||||||
}
|
}
|
||||||
this.formErrorMessage = errors.error_message;
|
this.formErrorMessage = errors.error_message;
|
||||||
this.$emit('onErrorFound');
|
this.$emit('on-error-found');
|
||||||
|
|
||||||
this.form.formErrors = this.formErrors;
|
this.form.formErrors = this.formErrors;
|
||||||
this.form.formErrorMessage = this.formErrorMessage;
|
this.form.formErrorMessage = this.formErrorMessage;
|
||||||
|
@ -536,7 +566,7 @@
|
||||||
},
|
},
|
||||||
cancelEdition() {
|
cancelEdition() {
|
||||||
this.closedByForm = true;
|
this.closedByForm = true;
|
||||||
this.$emit('onEditionCanceled');
|
this.$emit('on-edition-canceled');
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -568,7 +598,7 @@
|
||||||
.field > .field:not(:last-child) {
|
.field > .field:not(:last-child) {
|
||||||
margin-bottom: 0em;
|
margin-bottom: 0em;
|
||||||
}
|
}
|
||||||
/deep/ .field {
|
:deep(.field) {
|
||||||
-webkit-column-break-inside: avoid;
|
-webkit-column-break-inside: avoid;
|
||||||
page-break-inside: avoid;
|
page-break-inside: avoid;
|
||||||
break-inside: avoid;
|
break-inside: avoid;
|
||||||
|
@ -587,7 +617,7 @@
|
||||||
.tainacan-form .field:not(:last-child) {
|
.tainacan-form .field:not(:last-child) {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
.tainacan-form /deep/ .control-label {
|
.tainacan-form :deep(.control-label) {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
.metadata-form-section {
|
.metadata-form-section {
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
<b-input
|
<b-input
|
||||||
id="tainacan-text-name"
|
id="tainacan-text-name"
|
||||||
v-model="form.name"
|
v-model="form.name"
|
||||||
@focus="clearErrors('name')"
|
|
||||||
@blur="updateSlug()"
|
|
||||||
:disabled="isUpdatingSlug"
|
:disabled="isUpdatingSlug"
|
||||||
:loading="isUpdatingSlug"/>
|
:loading="isUpdatingSlug"
|
||||||
|
@focus="clearErrors('name')"
|
||||||
|
@blur="updateSlug()" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<!-- Hook for extra Form options -->
|
<!-- Hook for extra Form options -->
|
||||||
|
@ -54,9 +54,9 @@
|
||||||
extra-classes="tainacan-repository-tooltip" />
|
extra-classes="tainacan-repository-tooltip" />
|
||||||
<b-input
|
<b-input
|
||||||
id="tainacan-text-description"
|
id="tainacan-text-description"
|
||||||
|
v-model="form.description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="3"
|
rows="3"
|
||||||
v-model="form.description"
|
|
||||||
@focus="clearErrors('description')" />
|
@focus="clearErrors('description')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
|
@ -66,8 +66,8 @@
|
||||||
{{ $i18n.get('label_taxonomy_allow_new_terms') }}
|
{{ $i18n.get('label_taxonomy_allow_new_terms') }}
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-allow-insert"
|
id="tainacan-checkbox-allow-insert"
|
||||||
size="is-small"
|
|
||||||
v-model="form.allowInsert"
|
v-model="form.allowInsert"
|
||||||
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no" />
|
false-value="no" />
|
||||||
<help-button
|
<help-button
|
||||||
|
@ -83,8 +83,8 @@
|
||||||
{{ $i18n.getHelperTitle('taxonomies', 'hierarchical') }}
|
{{ $i18n.getHelperTitle('taxonomies', 'hierarchical') }}
|
||||||
<b-switch
|
<b-switch
|
||||||
id="tainacan-checkbox-allow-insert"
|
id="tainacan-checkbox-allow-insert"
|
||||||
size="is-small"
|
|
||||||
v-model="form.hierarchical"
|
v-model="form.hierarchical"
|
||||||
|
size="is-small"
|
||||||
true-value="yes"
|
true-value="yes"
|
||||||
false-value="no" />
|
false-value="no" />
|
||||||
<help-button
|
<help-button
|
||||||
|
@ -105,11 +105,11 @@
|
||||||
:message="$i18n.getHelperMessage('taxonomies', 'slug')"
|
:message="$i18n.getHelperMessage('taxonomies', 'slug')"
|
||||||
extra-classes="tainacan-repository-tooltip" />
|
extra-classes="tainacan-repository-tooltip" />
|
||||||
<b-input
|
<b-input
|
||||||
@input="updateSlug()"
|
|
||||||
id="tainacan-text-slug"
|
id="tainacan-text-slug"
|
||||||
v-model="form.slug"
|
v-model="form.slug"
|
||||||
@focus="clearErrors('slug')"
|
:disabled="isUpdatingSlug"
|
||||||
:disabled="isUpdatingSlug"/>
|
@update:model-value="updateSlug()"
|
||||||
|
@focus="clearErrors('slug')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<!-- Activate for other post types -->
|
<!-- Activate for other post types -->
|
||||||
|
@ -129,10 +129,10 @@
|
||||||
:key="wpPostType.slug"
|
:key="wpPostType.slug"
|
||||||
class="field">
|
class="field">
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
|
v-model="form.enabledPostTypes"
|
||||||
:native-value="wpPostType.slug"
|
:native-value="wpPostType.slug"
|
||||||
:true-value="wpPostType.slug"
|
:true-value="wpPostType.slug"
|
||||||
false-value=""
|
false-value=""
|
||||||
v-model="form.enabledPostTypes"
|
|
||||||
name="enabled_post_types">
|
name="enabled_post_types">
|
||||||
{{ wpPostType.label }}
|
{{ wpPostType.label }}
|
||||||
</b-checkbox>
|
</b-checkbox>
|
||||||
|
@ -156,9 +156,9 @@
|
||||||
extra-classes="tainacan-repository-tooltip" />
|
extra-classes="tainacan-repository-tooltip" />
|
||||||
<div class="status-radios">
|
<div class="status-radios">
|
||||||
<b-radio
|
<b-radio
|
||||||
v-model="form.status"
|
|
||||||
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'draft')"
|
v-for="(statusOption, index) of $statusHelper.getStatuses().filter((status) => status.slug != 'draft')"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
v-model="form.status"
|
||||||
:native-value="statusOption.slug">
|
:native-value="statusOption.slug">
|
||||||
<span class="icon has-text-gray">
|
<span class="icon has-text-gray">
|
||||||
<i
|
<i
|
||||||
|
@ -179,8 +179,8 @@
|
||||||
:message="$i18n.get('info_taxonomy_terms_list')"
|
:message="$i18n.get('info_taxonomy_terms_list')"
|
||||||
extra-classes="tainacan-repository-tooltip" />
|
extra-classes="tainacan-repository-tooltip" />
|
||||||
<terms-list
|
<terms-list
|
||||||
:is-hierarchical="form.hierarchical !== 'no'"
|
|
||||||
:key="shouldReloadTermsList ? 'termslistreloaded' : 'termslist'"
|
:key="shouldReloadTermsList ? 'termslistreloaded' : 'termslist'"
|
||||||
|
:is-hierarchical="form.hierarchical !== 'no'"
|
||||||
:taxonomy-id="taxonomyId"
|
:taxonomy-id="taxonomyId"
|
||||||
:current-user-can-edit-taxonomy="taxonomy ? taxonomy.current_user_can_edit : false" />
|
:current-user-can-edit-taxonomy="taxonomy ? taxonomy.current_user_can_edit : false" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
@ -202,8 +202,8 @@
|
||||||
class="control">
|
class="control">
|
||||||
<button
|
<button
|
||||||
id="button-another-taxonomy-creation"
|
id="button-another-taxonomy-creation"
|
||||||
@click.prevent="goToCreateAnotherTaxonomy()"
|
class="button is-secondary"
|
||||||
class="button is-secondary">{{ $i18n.get('label_create_another_taxonomy') }}</button>
|
@click.prevent="goToCreateAnotherTaxonomy()">{{ $i18n.get('label_create_another_taxonomy') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="!$route.query.recent"
|
v-if="!$route.query.recent"
|
||||||
|
@ -236,15 +236,15 @@
|
||||||
<span>{{ $i18n.get('label_taxonomy_page_on_website') }}</span>
|
<span>{{ $i18n.get('label_taxonomy_page_on_website') }}</span>
|
||||||
</a>
|
</a>
|
||||||
<button
|
<button
|
||||||
:class="{ 'is-loading': isLoadingTaxonomy, 'is-success': !isLoadingTaxonomy }"
|
|
||||||
id="button-submit-taxonomy-creation"
|
id="button-submit-taxonomy-creation"
|
||||||
@click.prevent="onSubmit"
|
:class="{ 'is-loading': isLoadingTaxonomy, 'is-success': !isLoadingTaxonomy }"
|
||||||
class="button">{{ $i18n.get('save') }}</button>
|
class="button"
|
||||||
|
@click.prevent="onSubmit">{{ $i18n.get('save') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</form>
|
</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">
|
<section class="section">
|
||||||
<div class="content has-text-grey has-text-centered">
|
<div class="content has-text-grey has-text-centered">
|
||||||
<p>
|
<p>
|
||||||
|
@ -258,7 +258,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<b-loading
|
<b-loading
|
||||||
:active.sync="isLoadingTaxonomy"
|
v-model="isLoadingTaxonomy"
|
||||||
:can-cancel="false" />
|
:can-cancel="false" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -266,8 +266,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { wpAjax, formHooks } from "../../js/mixins";
|
import { nextTick } from 'vue';
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { permalinkGetter, formHooks } from "../../js/mixins";
|
||||||
|
import { mapActions } from 'vuex';
|
||||||
import TermsList from '../lists/terms-list.vue';
|
import TermsList from '../lists/terms-list.vue';
|
||||||
import CustomDialog from '../other/custom-dialog.vue';
|
import CustomDialog from '../other/custom-dialog.vue';
|
||||||
|
|
||||||
|
@ -276,7 +277,7 @@
|
||||||
components: {
|
components: {
|
||||||
TermsList
|
TermsList
|
||||||
},
|
},
|
||||||
mixins: [ wpAjax, formHooks ],
|
mixins: [ permalinkGetter, formHooks ],
|
||||||
beforeRouteLeave( to, from, next ) {
|
beforeRouteLeave( to, from, next ) {
|
||||||
let formNotSaved = false;
|
let formNotSaved = false;
|
||||||
|
|
||||||
|
@ -362,7 +363,7 @@
|
||||||
this.taxonomy = res.taxonomy;
|
this.taxonomy = res.taxonomy;
|
||||||
|
|
||||||
// Fills hook forms with it's real values
|
// Fills hook forms with it's real values
|
||||||
this.$nextTick()
|
nextTick()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.updateExtraFormData(this.taxonomy);
|
this.updateExtraFormData(this.taxonomy);
|
||||||
});
|
});
|
||||||
|
@ -388,9 +389,6 @@
|
||||||
'fetchTaxonomy',
|
'fetchTaxonomy',
|
||||||
'fetchOnlySlug'
|
'fetchOnlySlug'
|
||||||
]),
|
]),
|
||||||
...mapGetters('taxonomy',[
|
|
||||||
'getTaxonomy',
|
|
||||||
]),
|
|
||||||
onChangeTab(tab) {
|
onChangeTab(tab) {
|
||||||
this.tabIndex = tab;
|
this.tabIndex = tab;
|
||||||
if (this.tabIndex == 1) {
|
if (this.tabIndex == 1) {
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<form
|
<form
|
||||||
|
id="termEditForm"
|
||||||
autofocus
|
autofocus
|
||||||
role="dialog"
|
role="dialog"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
aria-modal
|
aria-modal
|
||||||
id="termEditForm"
|
|
||||||
class="tainacan-form tainacan-modal-content"
|
class="tainacan-form tainacan-modal-content"
|
||||||
@submit.prevent="saveEdition(form)">
|
@submit.prevent="saveEdition(form)">
|
||||||
<header
|
<header
|
||||||
class="tainacan-page-title tainacan-modal-title">
|
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
|
<a
|
||||||
v-if="form && form.url != undefined && form.url!= ''"
|
v-if="form && form.url != undefined && form.url!= ''"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
@ -24,8 +26,8 @@
|
||||||
|
|
||||||
<div class="modal-card-body">
|
<div class="modal-card-body">
|
||||||
<b-loading
|
<b-loading
|
||||||
:is-full-page="false"
|
v-model="isLoading"
|
||||||
:active.sync="isLoading" />
|
:is-full-page="false" />
|
||||||
|
|
||||||
<!-- Name -------------- -->
|
<!-- Name -------------- -->
|
||||||
<b-field
|
<b-field
|
||||||
|
@ -41,8 +43,8 @@
|
||||||
extra-classes="tainacan-repository-tooltip" />
|
extra-classes="tainacan-repository-tooltip" />
|
||||||
</label>
|
</label>
|
||||||
<b-input
|
<b-input
|
||||||
:placeholder="$i18n.get('label_term_without_name')"
|
|
||||||
v-model="form.name"
|
v-model="form.name"
|
||||||
|
:placeholder="$i18n.get('label_term_without_name')"
|
||||||
name="name"
|
name="name"
|
||||||
@focus="clearErrors({ name: 'name', repeated: 'repeated' })" />
|
@focus="clearErrors({ name: 'name', repeated: 'repeated' })" />
|
||||||
</b-field>
|
</b-field>
|
||||||
|
@ -74,8 +76,8 @@
|
||||||
</figure>
|
</figure>
|
||||||
<div class="thumbnail-buttons-row">
|
<div class="thumbnail-buttons-row">
|
||||||
<a
|
<a
|
||||||
class="button is-rounded is-secondary"
|
|
||||||
id="button-edit-header"
|
id="button-edit-header"
|
||||||
|
class="button is-rounded is-secondary"
|
||||||
:aria-label="$i18n.get('label_button_edit_header_image')"
|
:aria-label="$i18n.get('label_button_edit_header_image')"
|
||||||
@click="headerImageMediaFrame.openFrame($event)">
|
@click="headerImageMediaFrame.openFrame($event)">
|
||||||
<span
|
<span
|
||||||
|
@ -90,8 +92,8 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class="button is-rounded is-secondary"
|
|
||||||
id="button-delete-header"
|
id="button-delete-header"
|
||||||
|
class="button is-rounded is-secondary"
|
||||||
:aria-label="$i18n.get('label_button_delete_thumb')"
|
:aria-label="$i18n.get('label_button_delete_thumb')"
|
||||||
@click="deleteHeaderImage()">
|
@click="deleteHeaderImage()">
|
||||||
<span
|
<span
|
||||||
|
@ -124,9 +126,9 @@
|
||||||
extra-classes="tainacan-repository-tooltip" />
|
extra-classes="tainacan-repository-tooltip" />
|
||||||
</label>
|
</label>
|
||||||
<b-input
|
<b-input
|
||||||
|
v-model="form.description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
name="description"
|
name="description"
|
||||||
v-model="form.description"
|
|
||||||
@focus="clearErrors('description')" />
|
@focus="clearErrors('description')" />
|
||||||
</b-field>
|
</b-field>
|
||||||
</div>
|
</div>
|
||||||
|
@ -141,10 +143,10 @@
|
||||||
<label class="label is-inline">
|
<label class="label is-inline">
|
||||||
{{ $i18n.get('label_parent_term') }}
|
{{ $i18n.get('label_parent_term') }}
|
||||||
<b-switch
|
<b-switch
|
||||||
@input="onToggleSwitch()"
|
|
||||||
id="tainacan-checkbox-has-parent"
|
id="tainacan-checkbox-has-parent"
|
||||||
|
v-model="hasParent"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
v-model="hasParent" />
|
@update:model-value="onToggleSwitch()" />
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.get('label_parent_term')"
|
:title="$i18n.get('label_parent_term')"
|
||||||
:message="$i18n.get('info_help_parent_term')"
|
:message="$i18n.get('info_help_parent_term')"
|
||||||
|
@ -152,20 +154,20 @@
|
||||||
</label>
|
</label>
|
||||||
<b-autocomplete
|
<b-autocomplete
|
||||||
id="tainacan-add-parent-field"
|
id="tainacan-add-parent-field"
|
||||||
|
v-model="parentTermName"
|
||||||
:placeholder="$i18n.get('instruction_parent_term')"
|
:placeholder="$i18n.get('instruction_parent_term')"
|
||||||
:data="parentTerms"
|
:data="parentTerms"
|
||||||
field="name"
|
field="name"
|
||||||
clearable
|
clearable
|
||||||
v-model="parentTermName"
|
|
||||||
@select="onSelectParentTerm($event)"
|
|
||||||
:loading="isFetchingParentTerms"
|
:loading="isFetchingParentTerms"
|
||||||
@input="fetchParentTerms"
|
|
||||||
@focus="clearErrors('parent');"
|
|
||||||
:disabled="!hasParent"
|
:disabled="!hasParent"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
check-infinite-scroll
|
check-infinite-scroll
|
||||||
|
@select="onSelectParentTerm($event)"
|
||||||
|
@update:model-value="fetchParentTerms"
|
||||||
|
@focus="clearErrors('parent');"
|
||||||
@infinite-scroll="fetchMoreParentTerms">
|
@infinite-scroll="fetchMoreParentTerms">
|
||||||
<template slot-scope="props">
|
<template #default="props">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div
|
<div
|
||||||
v-if="props.option.header_image"
|
v-if="props.option.header_image"
|
||||||
|
@ -179,12 +181,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template slot="empty">{{ $i18n.get('info_no_parent_term_found') }}</template>
|
<template #empty>
|
||||||
|
{{ $i18n.get('info_no_parent_term_found') }}
|
||||||
|
</template>
|
||||||
</b-autocomplete>
|
</b-autocomplete>
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<p
|
<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') }}
|
{{ $i18n.get('info_warning_changing_parent_term') }}
|
||||||
</p>
|
</p>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -204,8 +208,7 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
@click.prevent="cancelEdition()"
|
@click.prevent="cancelEdition()">
|
||||||
slot="trigger">
|
|
||||||
{{ $i18n.get('cancel') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -222,6 +225,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { nextTick } from 'vue';
|
||||||
import { formHooks } from "../../js/mixins";
|
import { formHooks } from "../../js/mixins";
|
||||||
import { mapActions } from 'vuex';
|
import { mapActions } from 'vuex';
|
||||||
import wpMediaFrames from '../../js/wp-media-frames';
|
import wpMediaFrames from '../../js/wp-media-frames';
|
||||||
|
@ -237,6 +241,10 @@
|
||||||
metadatumId: [String, Number],
|
metadatumId: [String, Number],
|
||||||
itemId: [String, Number]
|
itemId: [String, Number]
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'on-edition-finished',
|
||||||
|
'close'
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formErrors: {},
|
formErrors: {},
|
||||||
|
@ -262,7 +270,7 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
// Fills hook forms with it's real values
|
// Fills hook forms with it's real values
|
||||||
this.$nextTick()
|
nextTick()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.updateExtraFormData(this.form);
|
this.updateExtraFormData(this.form);
|
||||||
document.getElementById('termEditForm').scrollIntoView({ behavior: 'smooth' });
|
document.getElementById('termEditForm').scrollIntoView({ behavior: 'smooth' });
|
||||||
|
@ -315,18 +323,18 @@
|
||||||
itemId: this.itemId
|
itemId: this.itemId
|
||||||
})
|
})
|
||||||
.then((term) => {
|
.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.form = {};
|
||||||
this.formErrors = {};
|
this.formErrors = {};
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)) {
|
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) => {
|
.then((term) => {
|
||||||
this.formErrors = {};
|
this.formErrors = {};
|
||||||
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.$parent.close();
|
this.$emit('close');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)) {
|
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;
|
this.isLoading = false;
|
||||||
|
@ -366,7 +374,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancelEdition() {
|
cancelEdition() {
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
},
|
},
|
||||||
deleteHeaderImage() {
|
deleteHeaderImage() {
|
||||||
this.form = Object.assign({},
|
this.form = Object.assign({},
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<b-autocomplete
|
<b-autocomplete
|
||||||
|
v-model="selected"
|
||||||
icon="magnify"
|
icon="magnify"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
v-model="selected"
|
|
||||||
:data="options"
|
:data="options"
|
||||||
expanded
|
expanded
|
||||||
:loading="isLoadingOptions"
|
:loading="isLoadingOptions"
|
||||||
@input="($event) => { resetPage(); search($event); }"
|
|
||||||
field="label"
|
field="label"
|
||||||
@select="onSelect"
|
|
||||||
clearable
|
clearable
|
||||||
:placeholder="(metadatumType === 'Tainacan\\Metadata_Types\\Relationship') ? $i18n.get('info_type_to_search_items') : $i18n.get('info_type_to_search_metadata')"
|
:placeholder="(metadatumType === 'Tainacan\\Metadata_Types\\Relationship') ? $i18n.get('info_type_to_search_items') : $i18n.get('info_type_to_search_metadata')"
|
||||||
check-infinite-scroll
|
check-infinite-scroll
|
||||||
|
@update:model-value="($event) => { resetPage(); search($event); }"
|
||||||
|
@select="onSelect"
|
||||||
@infinite-scroll="searchMore">
|
@infinite-scroll="searchMore">
|
||||||
<template slot-scope="props">
|
<template #default="props">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div
|
<div
|
||||||
class="media-left"
|
v-if="props.option.img"
|
||||||
v-if="props.option.img">
|
class="media-left">
|
||||||
<img
|
<img
|
||||||
:alt="$i18n.get('label_thumbnail')"
|
:alt="$i18n.get('label_thumbnail')"
|
||||||
width="24"
|
width="24"
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="!isLoadingOptions"
|
v-if="!isLoadingOptions"
|
||||||
slot="empty">
|
#empty>
|
||||||
{{ $i18n.get('info_no_options_found' ) }}
|
{{ $i18n.get('info_no_options_found' ) }}
|
||||||
</template>
|
</template>
|
||||||
</b-autocomplete>
|
</b-autocomplete>
|
||||||
|
@ -45,11 +45,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { tainacan as axios, isCancel } from '../../../js/axios'
|
import { tainacanApi, isCancel } from '../../../js/axios'
|
||||||
import { filterTypeMixin, dynamicFilterTypeMixin } from '../../../js/filter-types-mixin';
|
import { filterTypeMixin, dynamicFilterTypeMixin } from '../../../js/filter-types-mixin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
selected:'',
|
selected:'',
|
||||||
|
@ -62,8 +65,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'query'() {
|
'query': {
|
||||||
|
handler() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -168,7 +174,7 @@
|
||||||
|
|
||||||
let endpoint = '/items/' + metadata.value + '?fetch_only=title,thumbnail';
|
let endpoint = '/items/' + metadata.value + '?fetch_only=title,thumbnail';
|
||||||
|
|
||||||
axios.get(endpoint)
|
tainacanApi.get(endpoint)
|
||||||
.then( res => {
|
.then( res => {
|
||||||
let item = res.data;
|
let item = res.data;
|
||||||
this.label = item.title;
|
this.label = item.title;
|
|
@ -15,8 +15,8 @@
|
||||||
<input
|
<input
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
:value="option.value"
|
:value="option.value"
|
||||||
@input="resetPage()"
|
type="checkbox"
|
||||||
type="checkbox">
|
@input="resetPage()">
|
||||||
<span class="check" />
|
<span class="check" />
|
||||||
<span class="control-label">
|
<span class="control-label">
|
||||||
<span class="checkbox-label-text">{{ option.label }}</span>
|
<span class="checkbox-label-text">{{ option.label }}</span>
|
||||||
|
@ -26,8 +26,8 @@
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<button
|
<button
|
||||||
class="view-all-button link-style"
|
|
||||||
v-if="option.showViewAllButton && index == options.slice(0, filter.max_options).length - 1"
|
v-if="option.showViewAllButton && index == options.slice(0, filter.max_options).length - 1"
|
||||||
|
class="view-all-button link-style"
|
||||||
@click="openCheckboxModal(option.parent)">
|
@click="openCheckboxModal(option.parent)">
|
||||||
{{ $i18n.get('label_view_all') }}
|
{{ $i18n.get('label_view_all') }}
|
||||||
</button>
|
</button>
|
||||||
|
@ -44,19 +44,19 @@
|
||||||
:is-modal="false"
|
:is-modal="false"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:selected="selected"
|
:selected="selected"
|
||||||
|
:metadatum-id="metadatumId"
|
||||||
|
:collection-id="collectionId"
|
||||||
|
:metadatum-type="metadatumType"
|
||||||
|
:is-repository-level="isRepositoryLevel"
|
||||||
|
:query="query"
|
||||||
|
:current-collection-id="currentCollectionId"
|
||||||
@input="(newSelected) => {
|
@input="(newSelected) => {
|
||||||
const existingValue = selected.indexOf(newSelected);
|
const existingValue = selected.indexOf(newSelected);
|
||||||
if (existingValue >= 0)
|
if (existingValue >= 0)
|
||||||
selected.splice(existingValue, 1);
|
selected.splice(existingValue, 1);
|
||||||
else
|
else
|
||||||
selected.push(newSelected);
|
selected.push(newSelected);
|
||||||
}"
|
}" />
|
||||||
:metadatum-id="metadatumId"
|
|
||||||
:collection-id="collectionId"
|
|
||||||
:metadatum_type="metadatumType"
|
|
||||||
:is-repository-level="isRepositoryLevel"
|
|
||||||
:query="query"
|
|
||||||
:current-collection-id="currentCollectionId" />
|
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -72,6 +72,10 @@
|
||||||
props: {
|
props: {
|
||||||
filtersAsModal: Boolean
|
filtersAsModal: Boolean
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
'update-parent-collapse'
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
options: [],
|
options: [],
|
||||||
|
@ -79,19 +83,23 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selected(newVal, oldVal) {
|
selected: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
const isEqual = (Array.isArray(newVal) && Array.isArray(oldVal) && (newVal.length == oldVal.length)) && newVal.every((element, index) => {
|
const isEqual = (Array.isArray(newVal) && Array.isArray(oldVal) && (newVal.length == oldVal.length)) && newVal.every((element, index) => {
|
||||||
return element === oldVal[index];
|
return element === oldVal[index];
|
||||||
});
|
});
|
||||||
if (!isEqual)
|
if (!isEqual)
|
||||||
this.onSelect();
|
this.onSelect();
|
||||||
},
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
facetsFromItemSearch: {
|
facetsFromItemSearch: {
|
||||||
handler() {
|
handler() {
|
||||||
if (this.isUsingElasticSearch)
|
if (this.isUsingElasticSearch)
|
||||||
this.loadOptions();
|
this.loadOptions();
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
|
deep: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -99,10 +107,10 @@
|
||||||
this.loadOptions();
|
this.loadOptions();
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$eventBusSearch.$on('has-to-reload-facets', this.reloadOptions);
|
this.$eventBusSearchEmitter.on('hasToReloadFacets', this.reloadOptions);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.$eventBusSearch.$off('has-to-reload-facets', this.reloadOptions);
|
this.$eventBusSearchEmitter.off('hasToReloadFacets', this.reloadOptions);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reloadOptions(shouldReload) {
|
reloadOptions(shouldReload) {
|
||||||
|
@ -143,7 +151,7 @@
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
|
|
||||||
if (res && res.data && res.data.values)
|
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) => {
|
.catch( (error) => {
|
||||||
if (isCancel(error)) {
|
if (isCancel(error)) {
|
||||||
|
@ -180,12 +188,12 @@
|
||||||
props: {
|
props: {
|
||||||
//parent: parent,
|
//parent: parent,
|
||||||
filter: this.filter,
|
filter: this.filter,
|
||||||
//taxonomy_id: this.taxonomy_id,
|
//taxonomyId: this.taxonomyId,
|
||||||
selected: this.selected,
|
selected: this.selected,
|
||||||
metadatumId: this.metadatumId,
|
metadatumId: this.metadatumId,
|
||||||
//taxonomy: this.taxonomy,
|
//taxonomy: this.taxonomy,
|
||||||
collectionId: this.collectionId,
|
collectionId: this.collectionId,
|
||||||
metadatum_type: this.metadatumType,
|
metadatumType: this.metadatumType,
|
||||||
isRepositoryLevel: this.isRepositoryLevel,
|
isRepositoryLevel: this.isRepositoryLevel,
|
||||||
query: this.query
|
query: this.query
|
||||||
},
|
},
|
|
@ -1,11 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<b-datepicker
|
<b-datepicker
|
||||||
|
v-model="dateInit"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
:placeholder="$i18n.get('label_selectbox_init')"
|
:placeholder="$i18n.get('label_selectbox_init')"
|
||||||
v-model="dateInit"
|
|
||||||
@focus="isTouched = true"
|
|
||||||
@input="($event) => { resetPage(); validadeValues($event) }"
|
|
||||||
editable
|
editable
|
||||||
:trap-focus="false"
|
:trap-focus="false"
|
||||||
:date-formatter="(date) => dateFormatter(date)"
|
:date-formatter="(date) => dateFormatter(date)"
|
||||||
|
@ -20,18 +18,18 @@
|
||||||
$i18n.get('datepicker_short_thursday'),
|
$i18n.get('datepicker_short_thursday'),
|
||||||
$i18n.get('datepicker_short_friday'),
|
$i18n.get('datepicker_short_friday'),
|
||||||
$i18n.get('datepicker_short_saturday'),
|
$i18n.get('datepicker_short_saturday'),
|
||||||
]"/>
|
]"
|
||||||
|
@focus="isTouched = true"
|
||||||
|
@update:model-value="($event) => { resetPage(); validadeValues($event) }" />
|
||||||
<p
|
<p
|
||||||
style="font-size: 0.75em; margin-bottom: 0.125em;"
|
style="font-size: 0.75em; margin-bottom: 0.125em;"
|
||||||
class="has-text-centered is-marginless">
|
class="has-text-centered is-marginless">
|
||||||
{{ $i18n.get('label_until') }}
|
{{ $i18n.get('label_until') }}
|
||||||
</p>
|
</p>
|
||||||
<b-datepicker
|
<b-datepicker
|
||||||
|
v-model="dateEnd"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
:placeholder="$i18n.get('label_selectbox_init')"
|
:placeholder="$i18n.get('label_selectbox_init')"
|
||||||
v-model="dateEnd"
|
|
||||||
@input="validadeValues()"
|
|
||||||
@focus="isTouched = true"
|
|
||||||
editable
|
editable
|
||||||
:trap-focus="false"
|
:trap-focus="false"
|
||||||
:date-formatter="(date) => dateFormatter(date)"
|
:date-formatter="(date) => dateFormatter(date)"
|
||||||
|
@ -46,21 +44,25 @@
|
||||||
$i18n.get('datepicker_short_thursday'),
|
$i18n.get('datepicker_short_thursday'),
|
||||||
$i18n.get('datepicker_short_friday'),
|
$i18n.get('datepicker_short_friday'),
|
||||||
$i18n.get('datepicker_short_saturday'),
|
$i18n.get('datepicker_short_saturday'),
|
||||||
]"/>
|
]"
|
||||||
|
@update:model-value="validadeValues()"
|
||||||
|
@focus="isTouched = true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { wpAjax, dateInter } from "../../../js/mixins";
|
import { dateInter } from "../../../js/mixins";
|
||||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [
|
mixins: [
|
||||||
wpAjax,
|
|
||||||
dateInter,
|
dateInter,
|
||||||
filterTypeMixin
|
filterTypeMixin
|
||||||
],
|
],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
dateInit: undefined,
|
dateInit: undefined,
|
||||||
|
@ -76,8 +78,11 @@
|
||||||
if ( val && this.dateEnd === null)
|
if ( val && this.dateEnd === null)
|
||||||
this.dateEnd = new Date();
|
this.dateEnd = new Date();
|
||||||
},
|
},
|
||||||
'query'() {
|
'query': {
|
||||||
|
handler() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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">
|
<div class="date-filter-container">
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
:mobile-modal="true"
|
:mobile-modal="true"
|
||||||
@input="($event) => { resetPage(); onChangeComparator($event) }"
|
|
||||||
aria-role="list"
|
aria-role="list"
|
||||||
trap-focus>
|
trap-focus
|
||||||
|
@update:model-value="($event) => { resetPage(); onChangeComparator($event) }">
|
||||||
|
<template #trigger>
|
||||||
<button
|
<button
|
||||||
:aria-label="$i18n.get('label_comparator')"
|
:aria-label="$i18n.get('label_comparator')"
|
||||||
class="button is-white"
|
class="button is-white">
|
||||||
slot="trigger">
|
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i v-html="comparatorSymbol" />
|
<i v-html="comparatorSymbol" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
</template>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
role="button"
|
role="button"
|
||||||
:class="{ 'is-active': comparator == '=' }"
|
:class="{ 'is-active': comparator == '=' }"
|
||||||
|
@ -67,14 +68,13 @@
|
||||||
:aria-plus-label="$i18n.get('label_increase')"
|
:aria-plus-label="$i18n.get('label_increase')"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
step="1"
|
step="1"
|
||||||
@input="emitOnlyYear($event)"
|
@update:model-value="emitOnlyYear($event)"
|
||||||
v-model="yearsOnlyValue"/> -->
|
v-model="yearsOnlyValue"/> -->
|
||||||
<b-datepicker
|
<b-datepicker
|
||||||
|
v-model="value"
|
||||||
position="is-bottom-right"
|
position="is-bottom-right"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
:placeholder="$i18n.get('instruction_select_a_date')"
|
:placeholder="$i18n.get('instruction_select_a_date')"
|
||||||
v-model="value"
|
|
||||||
@input="($event) => { resetPage(); emit($event); }"
|
|
||||||
editable
|
editable
|
||||||
:trap-focus="false"
|
:trap-focus="false"
|
||||||
:date-formatter="(date) => dateFormatter(date)"
|
:date-formatter="(date) => dateFormatter(date)"
|
||||||
|
@ -103,7 +103,8 @@
|
||||||
$i18n.get('datepicker_month_october'),
|
$i18n.get('datepicker_month_october'),
|
||||||
$i18n.get('datepicker_month_november'),
|
$i18n.get('datepicker_month_november'),
|
||||||
$i18n.get('datepicker_month_december')
|
$i18n.get('datepicker_month_december')
|
||||||
]" />
|
]"
|
||||||
|
@update:model-value="($event) => { resetPage(); emit($event); }" />
|
||||||
<!-- filterTypeOptions FOR TYPE
|
<!-- filterTypeOptions FOR TYPE
|
||||||
v-else
|
v-else
|
||||||
:type="filterTypeOptions.type == 'month' ? 'month' : null"
|
:type="filterTypeOptions.type == 'month' ? 'month' : null"
|
||||||
|
@ -113,16 +114,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { wpAjax, dateInter } from "../../../js/mixins";
|
import { dateInter } from "../../../js/mixins";
|
||||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [
|
mixins: [
|
||||||
wpAjax,
|
|
||||||
dateInter,
|
dateInter,
|
||||||
filterTypeMixin
|
filterTypeMixin
|
||||||
],
|
],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
value: null,
|
value: null,
|
||||||
|
@ -146,9 +149,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'query'() {
|
'query': {
|
||||||
|
handler() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
},
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
|
@ -13,11 +13,7 @@ class Date extends Filter_Type {
|
||||||
$this->set_name( __('Date', 'tainacan') );
|
$this->set_name( __('Date', 'tainacan') );
|
||||||
$this->set_supported_types(['date']);
|
$this->set_supported_types(['date']);
|
||||||
$this->set_component('tainacan-filter-date');
|
$this->set_component('tainacan-filter-date');
|
||||||
// $this->set_form_component('tainacan-filter-form-date');
|
|
||||||
$this->set_use_max_options(false);
|
$this->set_use_max_options(false);
|
||||||
// $this->set_default_options([
|
|
||||||
// 'type' => 'day'
|
|
||||||
// ]);
|
|
||||||
$this->set_preview_template('
|
$this->set_preview_template('
|
||||||
<div>
|
<div>
|
||||||
<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 {
|
class Date_Helper {
|
||||||
|
|
|
@ -143,6 +143,7 @@ abstract class Filter_Type {
|
||||||
* @param $options
|
* @param $options
|
||||||
*/
|
*/
|
||||||
public function set_options( $options ) {
|
public function set_options( $options ) {
|
||||||
|
$options = $options ?? '';
|
||||||
$this->options = ( is_array( $options ) ) ? $options : (!is_array(unserialize( $options )) ? [] : unserialize( $options ));
|
$this->options = ( is_array( $options ) ) ? $options : (!is_array(unserialize( $options )) ? [] : unserialize( $options ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,18 +11,36 @@
|
||||||
v-if="!showEditStepOptions"
|
v-if="!showEditStepOptions"
|
||||||
class="is-flex">
|
class="is-flex">
|
||||||
<b-select
|
<b-select
|
||||||
name="step_options"
|
|
||||||
v-model="step"
|
v-model="step"
|
||||||
@input="onUpdateStep">
|
name="step_options"
|
||||||
<option value="0.001">0.001</option>
|
@update:model-value="onUpdateStep">
|
||||||
<option value="0.01">0.01</option>
|
<option value="0.001">
|
||||||
<option value="0.1">0.1</option>
|
0.001
|
||||||
<option value="1">1</option>
|
</option>
|
||||||
<option value="2">2</option>
|
<option value="0.01">
|
||||||
<option value="5">5</option>
|
0.01
|
||||||
<option value="10">10</option>
|
</option>
|
||||||
<option value="100">100</option>
|
<option value="0.1">
|
||||||
<option value="1000">1000</option>
|
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
|
<option
|
||||||
v-if="step && ![0.001,0.01,0.1,1,2,5,10,100,1000].find( (element) => element == step )"
|
v-if="step && ![0.001,0.01,0.1,1,2,5,10,100,1000].find( (element) => element == step )"
|
||||||
:value="step">
|
:value="step">
|
||||||
|
@ -48,14 +66,14 @@
|
||||||
v-if="showEditStepOptions"
|
v-if="showEditStepOptions"
|
||||||
class="is-flex">
|
class="is-flex">
|
||||||
<b-input
|
<b-input
|
||||||
name="max_options"
|
|
||||||
v-model="step"
|
v-model="step"
|
||||||
@input="onUpdateStep"
|
name="max_options"
|
||||||
type="number"
|
type="number"
|
||||||
step="1" />
|
step="1"
|
||||||
|
@update:model-value="onUpdateStep" />
|
||||||
<button
|
<button
|
||||||
@click.prevent="showEditStepOptions = false"
|
class="button is-white is-pulled-right"
|
||||||
class="button is-white is-pulled-right">
|
@click.prevent="showEditStepOptions = false">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('close'),
|
content: $i18n.get('close'),
|
||||||
|
@ -77,8 +95,11 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
value: [String, Number, Array]
|
modelValue: Object
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'update:model-value',
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
step: [Number, String],
|
step: [Number, String],
|
||||||
|
@ -86,11 +107,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.step = this.value && this.value.step ? this.value.step : 1;
|
this.step = this.modelValue && this.modelValue.step ? this.modelValue.step : 1;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onUpdateStep(value) {
|
onUpdateStep(modelValue) {
|
||||||
this.$emit('input', { step: value });
|
this.$emit('update:model-value', { step: modelValue });
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<b-numberinput
|
<b-numberinput
|
||||||
|
v-model="valueInit"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
:aria-minus-label="$i18n.get('label_decrease')"
|
:aria-minus-label="$i18n.get('label_decrease')"
|
||||||
:aria-plus-label="$i18n.get('label_increase')"
|
:aria-plus-label="$i18n.get('label_increase')"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
@input="($event) => { resetPage(); validadeValues($event) }"
|
|
||||||
:step="filterTypeOptions.step"
|
:step="filterTypeOptions.step"
|
||||||
v-model="valueInit"
|
@update:model-value="($event) => { resetPage(); validadeValues($event) }"
|
||||||
/>
|
/>
|
||||||
<p
|
<p
|
||||||
style="font-size: 0.75em; margin-bottom: 0.125em;"
|
style="font-size: 0.75em; margin-bottom: 0.125em;"
|
||||||
|
@ -15,13 +15,13 @@
|
||||||
{{ $i18n.get('label_until') }}
|
{{ $i18n.get('label_until') }}
|
||||||
</p>
|
</p>
|
||||||
<b-numberinput
|
<b-numberinput
|
||||||
|
v-model="valueEnd"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
:aria-minus-label="$i18n.get('label_decrease')"
|
:aria-minus-label="$i18n.get('label_decrease')"
|
||||||
:aria-plus-label="$i18n.get('label_increase')"
|
:aria-plus-label="$i18n.get('label_increase')"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
@input="($event) => { resetPage(); validadeValues($event) }"
|
|
||||||
:step="filterTypeOptions.step"
|
:step="filterTypeOptions.step"
|
||||||
v-model="valueEnd"/>
|
@update:model-value="($event) => { resetPage(); validadeValues($event) }" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -30,6 +30,9 @@
|
||||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||||
export default {
|
export default {
|
||||||
mixins: [ filterTypeMixin ],
|
mixins: [ filterTypeMixin ],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
valueInit: null,
|
valueInit: null,
|
||||||
|
@ -37,9 +40,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'query'() {
|
'query': {
|
||||||
|
handler() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
},
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
|
@ -11,7 +11,7 @@
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
v-model="showIntervalOnTag"
|
v-model="showIntervalOnTag"
|
||||||
@input="onUpdateShowIntervalOnTag()">
|
@update:model-value="onUpdateShowIntervalOnTag">
|
||||||
{{ $i18n.get('info_show_interval_on_tag') }}
|
{{ $i18n.get('info_show_interval_on_tag') }}
|
||||||
</b-checkbox>
|
</b-checkbox>
|
||||||
</b-field>
|
</b-field>
|
||||||
|
@ -26,38 +26,38 @@
|
||||||
</label>
|
</label>
|
||||||
<transition-group name="filter-item">
|
<transition-group name="filter-item">
|
||||||
<div
|
<div
|
||||||
class="options-input"
|
|
||||||
v-for="(interval, index) of intervals"
|
v-for="(interval, index) of intervals"
|
||||||
:key="0 + index">
|
:key="0 + index"
|
||||||
|
class="options-input">
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-input
|
<b-input
|
||||||
|
v-model="interval.label"
|
||||||
expanded
|
expanded
|
||||||
:placeholder="$i18n.get('label')"
|
:placeholder="$i18n.get('label')"
|
||||||
@input="onUpdate(interval)"
|
@update:model-value="onUpdate(interval)" />
|
||||||
v-model="interval.label" />
|
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-input
|
<b-input
|
||||||
|
v-model="interval.from"
|
||||||
expanded
|
expanded
|
||||||
type="number"
|
type="number"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
:placeholder="$i18n.get('info_initial_value')"
|
:placeholder="$i18n.get('info_initial_value')"
|
||||||
@input="onUpdate(interval, true)"
|
@update:model-value="onUpdate(interval, true)" />
|
||||||
v-model="interval.from" />
|
|
||||||
<b-input
|
<b-input
|
||||||
|
v-model="interval.to"
|
||||||
expanded
|
expanded
|
||||||
type="number"
|
type="number"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
:placeholder="$i18n.get('info_final_value')"
|
:placeholder="$i18n.get('info_final_value')"
|
||||||
@input="onUpdate(interval, true)"
|
@update:model-value="onUpdate(interval, true)" />
|
||||||
v-model="interval.to" />
|
|
||||||
</b-field>
|
</b-field>
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<a
|
<a
|
||||||
role="button"
|
role="button"
|
||||||
@click="addInterval(index)"
|
|
||||||
class="add-link"
|
class="add-link"
|
||||||
:title="$i18n.get('add_value')">
|
:title="$i18n.get('add_value')"
|
||||||
|
@click="addInterval(index)">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="tainacan-icon has-text-secondary tainacan-icon-add" />
|
<i class="tainacan-icon has-text-secondary tainacan-icon-add" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -69,9 +69,9 @@
|
||||||
class="control">
|
class="control">
|
||||||
<a
|
<a
|
||||||
role="button"
|
role="button"
|
||||||
@click="removeInterval(index)"
|
|
||||||
class="add-link"
|
class="add-link"
|
||||||
:title="$i18n.get('remove_value')">
|
:title="$i18n.get('remove_value')"
|
||||||
|
@click="removeInterval(index)">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="tainacan-icon has-text-secondary tainacan-icon-repprovedcircle" />
|
<i class="tainacan-icon has-text-secondary tainacan-icon-repprovedcircle" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -89,10 +89,13 @@
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
filter: Object,
|
filter: Object,
|
||||||
value: [String, Number, Array],
|
modelValue: Object,
|
||||||
id: '',
|
id: '',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'update:model-value',
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showIntervalOnTag: true,
|
showIntervalOnTag: true,
|
||||||
|
@ -102,14 +105,14 @@
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.intervals =
|
this.intervals =
|
||||||
this.value && this.value.intervals && this.value.intervals.length > 0 ?
|
this.modelValue && this.modelValue.intervals && this.modelValue.intervals.length > 0 ?
|
||||||
this.value.intervals :
|
this.modelValue.intervals :
|
||||||
[{
|
[{
|
||||||
label: '',
|
label: '',
|
||||||
to: null,
|
to: null,
|
||||||
from: 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: {
|
methods: {
|
||||||
onUpdate: _.debounce( function(interval, validade) {
|
onUpdate: _.debounce( function(interval, validade) {
|
||||||
|
@ -124,7 +127,7 @@
|
||||||
this.showErrorMessage()
|
this.showErrorMessage()
|
||||||
} else {
|
} else {
|
||||||
this.isValid = true;
|
this.isValid = true;
|
||||||
this.$emit('input', {
|
this.$emit('update:model-value', {
|
||||||
intervals: this.intervals,
|
intervals: this.intervals,
|
||||||
showIntervalOnTag: this.showIntervalOnTag
|
showIntervalOnTag: this.showIntervalOnTag
|
||||||
});
|
});
|
||||||
|
@ -132,7 +135,7 @@
|
||||||
}, 600),
|
}, 600),
|
||||||
onUpdateShowIntervalOnTag() {
|
onUpdateShowIntervalOnTag() {
|
||||||
if (this.isValid) {
|
if (this.isValid) {
|
||||||
this.$emit('input', {
|
this.$emit('update:model-value', {
|
||||||
intervals: this.intervals,
|
intervals: this.intervals,
|
||||||
showIntervalOnTag: this.showIntervalOnTag
|
showIntervalOnTag: this.showIntervalOnTag
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<b-select
|
<b-select
|
||||||
|
v-model="selectedInterval"
|
||||||
expanded
|
expanded
|
||||||
:placeholder="$i18n.get('instruction_select_a_interval')"
|
:placeholder="$i18n.get('instruction_select_a_interval')"
|
||||||
@input="($event) => { resetPage; changeInterval($event) }"
|
@update:model-value="($event) => { resetPage; changeInterval($event) }">
|
||||||
v-model="selectedInterval">
|
|
||||||
<option value="">
|
<option value="">
|
||||||
{{ $i18n.get('label_selectbox_init') }}...
|
{{ $i18n.get('label_selectbox_init') }}...
|
||||||
</option>
|
</option>
|
||||||
<option
|
<option
|
||||||
v-for="(interval, index) in filterTypeOptions.intervals"
|
v-for="(interval, index) in filterTypeOptions.intervals"
|
||||||
:value="index"
|
:key="index"
|
||||||
:key="index">
|
:value="index">
|
||||||
{{ interval.label }}
|
{{ interval.label }}
|
||||||
</option>
|
</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
|
@ -22,6 +22,9 @@
|
||||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||||
export default {
|
export default {
|
||||||
mixins: [ filterTypeMixin ],
|
mixins: [ filterTypeMixin ],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
valueInit: 0,
|
valueInit: 0,
|
||||||
|
@ -30,8 +33,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'query'() {
|
'query': {
|
||||||
|
handler() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
|
@ -11,18 +11,36 @@
|
||||||
v-if="!showEditStepOptions"
|
v-if="!showEditStepOptions"
|
||||||
class="is-flex">
|
class="is-flex">
|
||||||
<b-select
|
<b-select
|
||||||
name="step_options"
|
|
||||||
v-model="step"
|
v-model="step"
|
||||||
@input="onUpdateStep">
|
name="step_options"
|
||||||
<option value="0.001">0.001</option>
|
@update:model-value="onUpdateStep">
|
||||||
<option value="0.01">0.01</option>
|
<option value="0.001">
|
||||||
<option value="0.1">0.1</option>
|
0.001
|
||||||
<option value="1">1</option>
|
</option>
|
||||||
<option value="2">2</option>
|
<option value="0.01">
|
||||||
<option value="5">5</option>
|
0.01
|
||||||
<option value="10">10</option>
|
</option>
|
||||||
<option value="100">100</option>
|
<option value="0.1">
|
||||||
<option value="1000">1000</option>
|
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
|
<option
|
||||||
v-if="step && ![0.001,0.01,0.1,1,2,5,10,100,1000].find( (element) => element == step )"
|
v-if="step && ![0.001,0.01,0.1,1,2,5,10,100,1000].find( (element) => element == step )"
|
||||||
:value="step">
|
:value="step">
|
||||||
|
@ -48,14 +66,14 @@
|
||||||
v-if="showEditStepOptions"
|
v-if="showEditStepOptions"
|
||||||
class="is-flex">
|
class="is-flex">
|
||||||
<b-input
|
<b-input
|
||||||
name="max_options"
|
|
||||||
v-model="step"
|
v-model="step"
|
||||||
@input="onUpdateStep"
|
name="max_options"
|
||||||
type="number"
|
type="number"
|
||||||
step="1" />
|
step="1"
|
||||||
|
@update:model-value="onUpdateStep" />
|
||||||
<button
|
<button
|
||||||
@click.prevent="showEditStepOptions = false"
|
class="button is-white is-pulled-right"
|
||||||
class="button is-white is-pulled-right">
|
@click.prevent="showEditStepOptions = false">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('close'),
|
content: $i18n.get('close'),
|
||||||
|
@ -76,8 +94,11 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
value: [String, Number, Array]
|
modelValue: Object
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'update:model-value',
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
step: [Number, String],
|
step: [Number, String],
|
||||||
|
@ -85,11 +106,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.step = this.value && this.value.step ? this.value.step : 1;
|
this.step = this.modelValue && this.modelValue.step ? this.modelValue.step : 1;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onUpdateStep(value) {
|
onUpdateStep(modelValue) {
|
||||||
this.$emit('input', { step: value });
|
this.$emit('update:model-value', { step: modelValue });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
<div class="numeric-filter-container">
|
<div class="numeric-filter-container">
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
:mobile-modal="true"
|
:mobile-modal="true"
|
||||||
@input="($event) => { resetPage(); onChangeComparator($event) }"
|
|
||||||
aria-role="list"
|
aria-role="list"
|
||||||
trap-focus>
|
trap-focus
|
||||||
|
@update:model-value="($event) => { resetPage(); onChangeComparator($event) }">
|
||||||
|
<template #trigger>
|
||||||
<button
|
<button
|
||||||
:aria-label="$i18n.get('label_comparator')"
|
:aria-label="$i18n.get('label_comparator')"
|
||||||
class="button is-white"
|
class="button is-white">
|
||||||
slot="trigger">
|
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i v-html="comparatorSymbol" />
|
<i v-html="comparatorSymbol" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
</template>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
role="button"
|
role="button"
|
||||||
:class="{ 'is-active': comparator == '=' }"
|
:class="{ 'is-active': comparator == '=' }"
|
||||||
|
@ -61,13 +62,13 @@
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
|
|
||||||
<b-numberinput
|
<b-numberinput
|
||||||
|
v-model="value"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
:aria-minus-label="$i18n.get('label_decrease')"
|
:aria-minus-label="$i18n.get('label_decrease')"
|
||||||
:aria-plus-label="$i18n.get('label_increase')"
|
:aria-plus-label="$i18n.get('label_increase')"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
:step="Number(filterTypeOptions.step)"
|
:step="Number(filterTypeOptions.step)"
|
||||||
@input="($event) => { resetPage($event); emit($event); }"
|
@update:model-value="($event) => { resetPage($event); emit($event); }" />
|
||||||
v-model="value"/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -78,6 +79,9 @@
|
||||||
mixins: [
|
mixins: [
|
||||||
filterTypeMixin
|
filterTypeMixin
|
||||||
],
|
],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
value: null,
|
value: null,
|
||||||
|
@ -99,8 +103,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'query'() {
|
'query': {
|
||||||
|
handler() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
|
@ -4,12 +4,14 @@
|
||||||
class="block">
|
class="block">
|
||||||
<b-select
|
<b-select
|
||||||
v-if="!isLoadingOptions"
|
v-if="!isLoadingOptions"
|
||||||
:value="selected"
|
:model-value="selected"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
@input="($event) => { resetPage(); onSelect($event) }"
|
|
||||||
:placeholder="$i18n.get('label_selectbox_init')"
|
:placeholder="$i18n.get('label_selectbox_init')"
|
||||||
expanded>
|
expanded
|
||||||
<option value="">{{ $i18n.get('label_selectbox_init') }}...</option>
|
@update:model-value="($event) => { resetPage(); onSelect($event) }">
|
||||||
|
<option value="">
|
||||||
|
{{ $i18n.get('label_selectbox_init') }}...
|
||||||
|
</option>
|
||||||
<option
|
<option
|
||||||
v-for="(option, index) in options"
|
v-for="(option, index) in options"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -30,6 +32,10 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
'update-parent-collapse'
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
options: [],
|
options: [],
|
||||||
|
@ -42,7 +48,8 @@
|
||||||
if (this.isUsingElasticSearch)
|
if (this.isUsingElasticSearch)
|
||||||
this.loadOptions();
|
this.loadOptions();
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -50,10 +57,10 @@
|
||||||
this.loadOptions();
|
this.loadOptions();
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$eventBusSearch.$on('has-to-reload-facets', this.reloadOptions);
|
this.$eventBusSearchEmitter.on('hasToReloadFacets', this.reloadOptions);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.$eventBusSearch.$off('has-to-reload-facets', this.reloadOptions);
|
this.$eventBusSearchEmitter.off('hasToReloadFacets', this.reloadOptions);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reloadOptions(shouldReload) {
|
reloadOptions(shouldReload) {
|
||||||
|
@ -76,7 +83,7 @@
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
|
|
||||||
if (res && res.data && res.data.values)
|
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 => {
|
.catch( error => {
|
||||||
if (isCancel(error))
|
if (isCancel(error))
|
|
@ -10,18 +10,18 @@
|
||||||
:remove-on-keys="[]"
|
:remove-on-keys="[]"
|
||||||
field="label"
|
field="label"
|
||||||
attached
|
attached
|
||||||
@input="($event) => { resetPage(); onSelect($event) }"
|
|
||||||
@typing="search"
|
|
||||||
:aria-close-label="$i18n.get('remove_value')"
|
:aria-close-label="$i18n.get('remove_value')"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
:placeholder="getInputPlaceholder"
|
:placeholder="getInputPlaceholder"
|
||||||
check-infinite-scroll
|
check-infinite-scroll
|
||||||
|
@update:model-value="($event) => { resetPage(); onSelect($event) }"
|
||||||
|
@typing="search"
|
||||||
@infinite-scroll="searchMore">
|
@infinite-scroll="searchMore">
|
||||||
<template slot-scope="props">
|
<template #default="props">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div
|
<div
|
||||||
class="media-left"
|
v-if="props.option.img"
|
||||||
v-if="props.option.img">
|
class="media-left">
|
||||||
<img
|
<img
|
||||||
:alt="$i18n.get('label_thumbnail')"
|
:alt="$i18n.get('label_thumbnail')"
|
||||||
width="24"
|
width="24"
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="!isLoadingOptions"
|
v-if="!isLoadingOptions"
|
||||||
slot="empty">
|
#empty>
|
||||||
{{ $i18n.get('info_no_options_found' ) }}
|
{{ $i18n.get('info_no_options_found' ) }}
|
||||||
</template>
|
</template>
|
||||||
</b-taginput>
|
</b-taginput>
|
||||||
|
@ -50,6 +50,9 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
mixins: [filterTypeMixin, dynamicFilterTypeMixin],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
results:'',
|
results:'',
|
||||||
|
@ -73,8 +76,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'query'() {
|
'query': {
|
||||||
|
handler() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
|
@ -1,19 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<b-field
|
<b-field
|
||||||
class="filter-item-forms"
|
|
||||||
:ref="isMobileScreen ? ('filter-field-id-' + filter.id) : null"
|
:ref="isMobileScreen ? ('filter-field-id-' + filter.id) : null"
|
||||||
@touchstart.native="setFilterFocus(filter.id)"
|
class="filter-item-forms"
|
||||||
@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'}"
|
||||||
: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
|
<b-collapse
|
||||||
v-if="displayFilter"
|
v-if="displayFilter"
|
||||||
|
v-model="singleCollapseOpen"
|
||||||
class="show"
|
class="show"
|
||||||
:open.sync="singleCollapseOpen"
|
|
||||||
animation="filter-item">
|
animation="filter-item">
|
||||||
|
<template #trigger="props">
|
||||||
<button
|
<button
|
||||||
:for="'filter-input-id-' + filter.id"
|
:id="'filter-label-id-' + filter.id"
|
||||||
:aria-controls="'filter-input-id-' + filter.id"
|
|
||||||
:aria-expanded="singleCollapseOpen"
|
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
shown: 500,
|
shown: 500,
|
||||||
|
@ -25,21 +24,22 @@
|
||||||
placement: 'top-start',
|
placement: 'top-start',
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : '']
|
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"
|
:aria-label="filter.name"
|
||||||
class="label"
|
class="label">
|
||||||
slot="trigger"
|
|
||||||
slot-scope="props">
|
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i
|
<i
|
||||||
:class="{
|
:class="{
|
||||||
'tainacan-icon-arrowdown' : props.open,
|
'tainacan-icon-arrowdown' : props && props.open,
|
||||||
'tainacan-icon-arrowright' : !props.open
|
'tainacan-icon-arrowright' : props && !props.open
|
||||||
}"
|
}"
|
||||||
class="tainacan-icon tainacan-icon-1-25em" />
|
class="tainacan-icon tainacan-icon-1-25em" />
|
||||||
</span>
|
</span>
|
||||||
<span class="collapse-label">{{ filter.name }}</span>
|
<span class="collapse-label">{{ filter.name }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
</template>
|
||||||
<div :id="'filter-input-id-' + filter.id">
|
<div :id="'filter-input-id-' + filter.id">
|
||||||
<component
|
<component
|
||||||
:is="filter.filter_type_object ? filter.filter_type_object.component : null"
|
:is="filter.filter_type_object ? filter.filter_type_object.component : null"
|
||||||
|
@ -49,9 +49,9 @@
|
||||||
:is-repository-level="isRepositoryLevel"
|
:is-repository-level="isRepositoryLevel"
|
||||||
:is-loading-items="isLoadingItems"
|
:is-loading-items="isLoadingItems"
|
||||||
:current-collection-id="$eventBusSearch.collectionId"
|
:current-collection-id="$eventBusSearch.collectionId"
|
||||||
|
:filters-as-modal="filtersAsModal"
|
||||||
@input="onInput"
|
@input="onInput"
|
||||||
@updateParentCollapse="onFilterUpdateParentCollapse"
|
@update-parent-collapse="onFilterUpdateParentCollapse" />
|
||||||
:filters-as-modal="filtersAsModal" />
|
|
||||||
</div>
|
</div>
|
||||||
</b-collapse>
|
</b-collapse>
|
||||||
<div
|
<div
|
||||||
|
@ -60,8 +60,6 @@
|
||||||
<div class="collapse-trigger">
|
<div class="collapse-trigger">
|
||||||
<button
|
<button
|
||||||
|
|
||||||
:for="'filter-input-id-' + filter.id"
|
|
||||||
:aria-controls="'filter-input-id-' + filter.id"
|
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
shown: 500,
|
shown: 500,
|
||||||
|
@ -73,8 +71,10 @@
|
||||||
placement: 'top-start',
|
placement: 'top-start',
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : '']
|
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : '']
|
||||||
}"
|
}"
|
||||||
@click="displayFilter = true"
|
:for="'filter-input-id-' + filter.id"
|
||||||
class="label">
|
:aria-controls="'filter-input-id-' + filter.id"
|
||||||
|
class="label"
|
||||||
|
@click="displayFilter = true">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-arrowright tainacan-icon-1-25em" />
|
<i class="tainacan-icon tainacan-icon-arrowright tainacan-icon-1-25em" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -86,32 +86,22 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TainacanFilterNumeric from './numeric/Numeric.vue';
|
import { defineAsyncComponent } from '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';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TainacanFilterItem',
|
name: 'TainacanFilterItem',
|
||||||
components: {
|
components: {
|
||||||
TainacanFilterNumeric,
|
TainacanFilterNumeric: defineAsyncComponent(() => import('./numeric/TainacanFilterNumeric.vue')),
|
||||||
TainacanFilterDate,
|
TainacanFilterDate: defineAsyncComponent(() => import('./date/TainacanFilterDate.vue')),
|
||||||
TainacanFilterSelectbox,
|
TainacanFilterSelectbox: defineAsyncComponent(() => import('./selectbox/TainacanFilterSelectbox.vue')),
|
||||||
TainacanFilterAutocomplete,
|
TainacanFilterAutocomplete: defineAsyncComponent(() => import('./autocomplete/TainacanFilterAutocomplete.vue')),
|
||||||
TainacanFilterCheckbox,
|
TainacanFilterCheckbox: defineAsyncComponent(() => import('./checkbox/TainacanFilterCheckbox.vue')),
|
||||||
TainacanFilterTaginput,
|
TainacanFilterTaginput: defineAsyncComponent(() => import('./taginput/TainacanFilterTaginput.vue')),
|
||||||
TainacanFilterTaxonomyCheckbox,
|
TainacanFilterTaxonomyCheckbox: defineAsyncComponent(() => import('./taxonomy/TainacanFilterCheckbox.vue')),
|
||||||
TainacanFilterTaxonomyTaginput,
|
TainacanFilterTaxonomyTaginput: defineAsyncComponent(() => import('./taxonomy/TainacanFilterTaginput.vue')),
|
||||||
TainacanFilterDateInterval,
|
TainacanFilterDateInterval: defineAsyncComponent(() => import('./date-interval/TainacanFilterDateInterval.vue')),
|
||||||
TainacanFilterNumericInterval,
|
TainacanFilterNumericInterval: defineAsyncComponent(() => import('./numeric-interval/TainacanFilterNumericInterval.vue')),
|
||||||
TainacanFilterNumericListInterval
|
TainacanFilterNumericListInterval: defineAsyncComponent(() => import('./numeric-list-interval/TainacanFilterNumericListInterval.vue'))
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
filter: Object,
|
filter: Object,
|
||||||
|
@ -150,7 +140,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onInput(inputEvent) {
|
onInput(inputEvent) {
|
||||||
this.$eventBusSearch.$emit('input', inputEvent);
|
this.$eventBusSearchEmitter.emit('input', inputEvent);
|
||||||
},
|
},
|
||||||
onFilterUpdateParentCollapse(open) {
|
onFilterUpdateParentCollapse(open) {
|
||||||
const componentsThatShouldCollapseIfEmpty = ['tainacan-filter-taxonomy-checkbox', 'tainacan-filter-selectbox', 'tainacan-filter-checkbox'];
|
const componentsThatShouldCollapseIfEmpty = ['tainacan-filter-taxonomy-checkbox', 'tainacan-filter-selectbox', 'tainacan-filter-checkbox'];
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
class="b-checkbox checkbox is-small">
|
class="b-checkbox checkbox is-small">
|
||||||
<input
|
<input
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
@input="resetPage"
|
|
||||||
:value="option.value"
|
:value="option.value"
|
||||||
type="checkbox">
|
type="checkbox"
|
||||||
|
@input="resetPage">
|
||||||
<span class="check" />
|
<span class="check" />
|
||||||
<span class="control-label">
|
<span class="control-label">
|
||||||
<span class="checkbox-label-text">{{ option.label }}</span>
|
<span class="checkbox-label-text">{{ option.label }}</span>
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<button
|
<button
|
||||||
class="view-all-button link-style"
|
|
||||||
v-if="option.showViewAllButton"
|
v-if="option.showViewAllButton"
|
||||||
|
class="view-all-button link-style"
|
||||||
@click="openCheckboxModal(option.parent)">
|
@click="openCheckboxModal(option.parent)">
|
||||||
{{ $i18n.get('label_view_all') }}
|
{{ $i18n.get('label_view_all') }}
|
||||||
</button>
|
</button>
|
||||||
|
@ -44,28 +44,28 @@
|
||||||
<checkbox-radio-filter-input
|
<checkbox-radio-filter-input
|
||||||
:is-modal="false"
|
:is-modal="false"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:taxonomy_id="taxonomyId"
|
:taxonomy-id="taxonomyId"
|
||||||
:selected="selected"
|
:selected="selected"
|
||||||
|
:metadatum-id="metadatumId"
|
||||||
|
:taxonomy="taxonomy"
|
||||||
|
:collection-id="collectionId"
|
||||||
|
:is-taxonomy="true"
|
||||||
|
:query="query"
|
||||||
|
:current-collection-id="currentCollectionId"
|
||||||
@input="(newSelected) => {
|
@input="(newSelected) => {
|
||||||
const existingValue = selected.indexOf(newSelected);
|
const existingValue = selected.indexOf(newSelected);
|
||||||
if (existingValue >= 0)
|
if (existingValue >= 0)
|
||||||
selected.splice(existingValue, 1);
|
selected.splice(existingValue, 1);
|
||||||
else
|
else
|
||||||
selected.push(newSelected);
|
selected.push(newSelected);
|
||||||
}"
|
}" />
|
||||||
:metadatum-id="metadatumId"
|
|
||||||
:taxonomy="taxonomy"
|
|
||||||
:collection-id="collectionId"
|
|
||||||
:is-taxonomy="true"
|
|
||||||
:query="query"
|
|
||||||
:current-collection-id="currentCollectionId" />
|
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import qs from 'qs';
|
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 { mapGetters } from 'vuex';
|
||||||
import CheckboxRadioFilterInput from '../../../components/other/checkbox-radio-filter-input.vue';
|
import CheckboxRadioFilterInput from '../../../components/other/checkbox-radio-filter-input.vue';
|
||||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||||
|
@ -75,9 +75,12 @@
|
||||||
mixins: [ filterTypeMixin ],
|
mixins: [ filterTypeMixin ],
|
||||||
props: {
|
props: {
|
||||||
isRepositoryLevel: Boolean,
|
isRepositoryLevel: Boolean,
|
||||||
currentCollectionId: String,
|
|
||||||
filtersAsModal: Boolean
|
filtersAsModal: Boolean
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
'update-parent-collapse'
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
isLoadingOptions: true,
|
isLoadingOptions: true,
|
||||||
|
@ -89,24 +92,28 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
facetsFromItemSearch() {
|
...mapGetters('search', {
|
||||||
return this.getFacets();
|
'facetsFromItemSearch': 'getFacets'
|
||||||
}
|
}),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selected(newVal, oldVal) {
|
selected: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
const isEqual = (Array.isArray(newVal) && Array.isArray(oldVal) && (newVal.length == oldVal.length)) && newVal.every((element, index) => {
|
const isEqual = (Array.isArray(newVal) && Array.isArray(oldVal) && (newVal.length == oldVal.length)) && newVal.every((element, index) => {
|
||||||
return element === oldVal[index];
|
return element === oldVal[index];
|
||||||
});
|
});
|
||||||
if (!isEqual)
|
if (!isEqual)
|
||||||
this.onSelect();
|
this.onSelect();
|
||||||
},
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
facetsFromItemSearch: {
|
facetsFromItemSearch: {
|
||||||
handler() {
|
handler() {
|
||||||
if (this.isUsingElasticSearch)
|
if (this.isUsingElasticSearch)
|
||||||
this.loadOptions();
|
this.loadOptions();
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
|
deep:true
|
||||||
},
|
},
|
||||||
isLoadingItems: {
|
isLoadingItems: {
|
||||||
handler() {
|
handler() {
|
||||||
|
@ -125,24 +132,21 @@
|
||||||
this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id;
|
this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id;
|
||||||
this.taxonomy = this.filter.metadatum.metadata_type_object.options.taxonomy;
|
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(){
|
mounted(){
|
||||||
if (!this.isUsingElasticSearch)
|
if (!this.isUsingElasticSearch)
|
||||||
this.loadOptions();
|
this.loadOptions();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
|
|
||||||
// Cancels previous Request
|
// Cancels previous Request
|
||||||
if (this.getOptionsValuesCancel != undefined)
|
if (this.getOptionsValuesCancel != undefined)
|
||||||
this.getOptionsValuesCancel.cancel('Facet search Canceled.');
|
this.getOptionsValuesCancel.cancel('Facet search Canceled.');
|
||||||
|
|
||||||
this.$eventBusSearch.$off('has-to-reload-facets', this.reloadOptions);
|
this.$eventBusSearchEmitter.off('hasToReloadFacets', this.reloadOptions);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapGetters('search', [
|
|
||||||
'getFacets'
|
|
||||||
]),
|
|
||||||
reloadOptions(shouldReload) {
|
reloadOptions(shouldReload) {
|
||||||
if ( !this.isUsingElasticSearch && shouldReload )
|
if ( !this.isUsingElasticSearch && shouldReload )
|
||||||
this.loadOptions();
|
this.loadOptions();
|
||||||
|
@ -175,7 +179,7 @@
|
||||||
promise = new Object({
|
promise = new Object({
|
||||||
request:
|
request:
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
axios.get(route, { cancelToken: source.token})
|
tainacanApi.get(route, { cancelToken: source.token})
|
||||||
.then( res => {
|
.then( res => {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
})
|
})
|
||||||
|
@ -191,7 +195,7 @@
|
||||||
this.prepareOptionsForTaxonomy(res.data.values ? res.data.values : res.data);
|
this.prepareOptionsForTaxonomy(res.data.values ? res.data.values : res.data);
|
||||||
|
|
||||||
if (res && res.data && res.data.values)
|
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 => {
|
.catch( error => {
|
||||||
if (isCancel(error)) {
|
if (isCancel(error)) {
|
||||||
|
@ -210,10 +214,10 @@
|
||||||
if (facet == this.filter.id) {
|
if (facet == this.filter.id) {
|
||||||
if (Array.isArray(this.facetsFromItemSearch[facet])) {
|
if (Array.isArray(this.facetsFromItemSearch[facet])) {
|
||||||
this.prepareOptionsForTaxonomy(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 {
|
} else {
|
||||||
this.prepareOptionsForTaxonomy(Object.values(this.facetsFromItemSearch[facet]));
|
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: {
|
props: {
|
||||||
parent: parent,
|
parent: parent,
|
||||||
filter: this.filter,
|
filter: this.filter,
|
||||||
taxonomy_id: this.taxonomyId,
|
taxonomyId: this.taxonomyId,
|
||||||
selected: this.selected,
|
selected: this.selected,
|
||||||
metadatumId: this.metadatumId,
|
metadatumId: this.metadatumId,
|
||||||
taxonomy: this.taxonomy,
|
taxonomy: this.taxonomy,
|
|
@ -13,12 +13,12 @@
|
||||||
:aria-close-label="$i18n.get('remove_value')"
|
:aria-close-label="$i18n.get('remove_value')"
|
||||||
:aria-labelledby="'filter-label-id-' + filter.id"
|
:aria-labelledby="'filter-label-id-' + filter.id"
|
||||||
:class="{'has-selected': selected != undefined && selected != []}"
|
:class="{'has-selected': selected != undefined && selected != []}"
|
||||||
@typing="search"
|
|
||||||
@input="($event) => { resetPage(); onSelect($event) }"
|
|
||||||
:placeholder="$i18n.get('info_type_to_add_terms')"
|
:placeholder="$i18n.get('info_type_to_add_terms')"
|
||||||
check-infinite-scroll
|
check-infinite-scroll
|
||||||
|
@typing="search"
|
||||||
|
@update:model-value="($event) => { resetPage(); onSelect($event) }"
|
||||||
@infinite-scroll="searchMore">
|
@infinite-scroll="searchMore">
|
||||||
<template slot-scope="props">
|
<template #default="props">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div class="media-content">
|
<div class="media-content">
|
||||||
<span class="ellipsed-text">{{ props.option.label }}</span>
|
<span class="ellipsed-text">{{ props.option.label }}</span>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template
|
||||||
v-if="!isLoadingOptions"
|
v-if="!isLoadingOptions"
|
||||||
slot="empty">
|
#empty>
|
||||||
{{ $i18n.get('info_no_options_found' ) }}
|
{{ $i18n.get('info_no_options_found' ) }}
|
||||||
</template>
|
</template>
|
||||||
</b-taginput>
|
</b-taginput>
|
||||||
|
@ -39,11 +39,14 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
import { tainacan as axios } from '../../../js/axios';
|
import { tainacanApi } from '../../../js/axios';
|
||||||
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
import { filterTypeMixin } from '../../../js/filter-types-mixin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ filterTypeMixin ],
|
mixins: [ filterTypeMixin ],
|
||||||
|
emits: [
|
||||||
|
'input',
|
||||||
|
],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
isLoadingOptions: false,
|
isLoadingOptions: false,
|
||||||
|
@ -64,8 +67,11 @@
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
},
|
},
|
||||||
'query'() {
|
'query': {
|
||||||
|
handler() {
|
||||||
this.updateSelectedValues();
|
this.updateSelectedValues();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -126,7 +132,7 @@
|
||||||
|
|
||||||
const valuesToIgnore = JSON.parse(JSON.stringify(this.selected));
|
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) {
|
for (let term of res.data.values) {
|
||||||
|
|
||||||
if (valuesToIgnore != undefined && valuesToIgnore.length > 0) {
|
if (valuesToIgnore != undefined && valuesToIgnore.length > 0) {
|
|
@ -6,15 +6,21 @@
|
||||||
<tr>
|
<tr>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_activity_title') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_activity_title') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Created by -->
|
<!-- Created by -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_created_by') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_created_by') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Activity date -->
|
<!-- Activity date -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_activity_date') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_activity_date') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!--<!– Approbation –>-->
|
<!--<!– Approbation –>-->
|
||||||
<!--<th>-->
|
<!--<th>-->
|
||||||
|
@ -24,14 +30,14 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr
|
<tr
|
||||||
:key="index"
|
v-for="(activity, index) of activities"
|
||||||
v-for="(activity, index) of activities">
|
:key="index">
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
<td
|
<td
|
||||||
class="column-default-width column-main-content"
|
class="column-default-width column-main-content"
|
||||||
@click="openActivityDetailsModal(activity)"
|
|
||||||
:label="$i18n.get('label_activity_title')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
@ -49,9 +55,9 @@
|
||||||
<!-- User -->
|
<!-- User -->
|
||||||
<td
|
<td
|
||||||
class="table-creation column-small-width"
|
class="table-creation column-small-width"
|
||||||
@click="openActivityDetailsModal(activity)"
|
|
||||||
:label="$i18n.get('label_created_by')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
@ -68,9 +74,9 @@
|
||||||
<!-- Activity Date -->
|
<!-- Activity Date -->
|
||||||
<td
|
<td
|
||||||
class="table-creation column-small-width"
|
class="table-creation column-small-width"
|
||||||
@click="openActivityDetailsModal(activity)"
|
|
||||||
:label="$i18n.get('label_activity_date')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
style="position: relative;"
|
style="position: relative;"
|
||||||
class="table-container">
|
class="table-container">
|
||||||
<b-loading
|
<b-loading
|
||||||
:is-full-page="false"
|
v-model="isLoading"
|
||||||
:active.sync="isLoading" />
|
:is-full-page="false" />
|
||||||
<div
|
<div
|
||||||
v-if="attachments.length > 0"
|
v-if="attachments.length > 0"
|
||||||
class="table-wrapper">
|
class="table-wrapper">
|
||||||
|
@ -28,14 +28,14 @@
|
||||||
v-if="isEditable && form.document != attachment.id"
|
v-if="isEditable && form.document != attachment.id"
|
||||||
class="file-item-control">
|
class="file-item-control">
|
||||||
<a
|
<a
|
||||||
@click="onDeleteAttachment(attachment)"
|
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('delete'),
|
content: $i18n.get('delete'),
|
||||||
autoHide: true,
|
autoHide: true,
|
||||||
placement: 'bottom',
|
placement: 'bottom',
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip']
|
popperClass: ['tainacan-tooltip', 'tooltip']
|
||||||
}"
|
}"
|
||||||
class="icon">
|
class="icon"
|
||||||
|
@click="onDeleteAttachment(attachment)">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-delete" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-delete" />
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -59,8 +59,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="pagination-area"
|
v-if="attachments.length > 0"
|
||||||
v-if="attachments.length > 0">
|
class="pagination-area">
|
||||||
<div class="shown-items">
|
<div class="shown-items">
|
||||||
{{
|
{{
|
||||||
$i18n.getWithVariables('info_showing_%s', [ collection && collection.item_attachment_label ? collection.item_attachment_label : $i18n.get('label_attachments') ]) + ' ' +
|
$i18n.getWithVariables('info_showing_%s', [ collection && collection.item_attachment_label ? collection.item_attachment_label : $i18n.get('label_attachments') ]) + ' ' +
|
||||||
|
@ -72,16 +72,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<b-pagination
|
<b-pagination
|
||||||
@change="onPageChange"
|
v-model="attachmentsPage"
|
||||||
:total="totalAttachments"
|
:total="totalAttachments"
|
||||||
:current.sync="attachmentsPage"
|
|
||||||
order="is-centered"
|
order="is-centered"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
:per-page="attachmentsPerPage"
|
:per-page="attachmentsPerPage"
|
||||||
:aria-next-label="$i18n.get('label_next_page')"
|
:aria-next-label="$i18n.get('label_next_page')"
|
||||||
:aria-previous-label="$i18n.get('label_previous_page')"
|
:aria-previous-label="$i18n.get('label_previous_page')"
|
||||||
:aria-page-label="$i18n.get('label_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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -103,6 +103,9 @@
|
||||||
shouldLoadAttachments: Boolean,
|
shouldLoadAttachments: Boolean,
|
||||||
isEditable: Boolean,
|
isEditable: Boolean,
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'on-delete-attachment',
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
attachmentsPage: 1,
|
attachmentsPage: 1,
|
||||||
|
@ -111,12 +114,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
attachments() {
|
...mapGetters('item', {
|
||||||
return this.getAttachments();
|
'attachments': 'getAttachments',
|
||||||
},
|
'totalAttachments': 'getTotalAttachments'
|
||||||
totalAttachments() {
|
})
|
||||||
return this.getTotalAttachments();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
shouldLoadAttachments() {
|
shouldLoadAttachments() {
|
||||||
|
@ -131,10 +132,6 @@
|
||||||
...mapActions('item', [
|
...mapActions('item', [
|
||||||
'fetchAttachments',
|
'fetchAttachments',
|
||||||
]),
|
]),
|
||||||
...mapGetters('item', [
|
|
||||||
'getAttachments',
|
|
||||||
'getTotalAttachments'
|
|
||||||
]),
|
|
||||||
onChangeAttachmentsPerPage(value) {
|
onChangeAttachmentsPerPage(value) {
|
||||||
|
|
||||||
if (value != this.attachmentsPerPage) {
|
if (value != this.attachmentsPerPage) {
|
||||||
|
@ -167,9 +164,8 @@
|
||||||
// excludeDocumentId: this.form.document,
|
// excludeDocumentId: this.form.document,
|
||||||
// excludeThumbnailId: this.item.thumbnail_id
|
// excludeThumbnailId: this.item.thumbnail_id
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then(() => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.totalAttachments = response.total;
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
@ -177,7 +173,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onDeleteAttachment(attachment) {
|
onDeleteAttachment(attachment) {
|
||||||
this.$emit('onDeleteAttachment', attachment);
|
this.$emit('on-delete-attachment', attachment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,21 @@
|
||||||
<tr>
|
<tr>
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_name') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_name') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_description') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_description') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Capability date -->
|
<!-- Capability date -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_user_roles') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_user_roles') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Actions -->
|
<!-- Actions -->
|
||||||
<th class="actions-header">
|
<th class="actions-header">
|
||||||
|
@ -24,8 +30,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody v-if="!isLoading">
|
<tbody v-if="!isLoading">
|
||||||
<template v-for="(capability, index) of capabilities">
|
<tr
|
||||||
<tr :key="index">
|
v-for="(capability, index) of capabilities"
|
||||||
|
:key="index">
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
<td
|
<td
|
||||||
class="column-default-width column-main-content"
|
class="column-default-width column-main-content"
|
||||||
|
@ -67,8 +74,8 @@
|
||||||
<complete-roles-list
|
<complete-roles-list
|
||||||
v-if="capability.roles"
|
v-if="capability.roles"
|
||||||
:complete-roles-list="getCompleteRolesList(capability.roles, capability.roles_inherited)">
|
:complete-roles-list="getCompleteRolesList(capability.roles, capability.roles_inherited)">
|
||||||
|
<template #props>
|
||||||
<td
|
<td
|
||||||
slot-scope="props"
|
|
||||||
class="table-creation column-small-width"
|
class="table-creation column-small-width"
|
||||||
:label="$i18n.get('label_associated_roles')"
|
:label="$i18n.get('label_associated_roles')"
|
||||||
:aria-label="$i18n.get('label_associated_roles') + ': ' + props['complete-roles-list']">
|
:aria-label="$i18n.get('label_associated_roles') + ': ' + props['complete-roles-list']">
|
||||||
|
@ -85,6 +92,7 @@
|
||||||
}"
|
}"
|
||||||
v-html="props['complete-roles-list']" />
|
v-html="props['complete-roles-list']" />
|
||||||
</td>
|
</td>
|
||||||
|
</template>
|
||||||
</complete-roles-list>
|
</complete-roles-list>
|
||||||
<!-- Actions -->
|
<!-- Actions -->
|
||||||
<td
|
<td
|
||||||
|
@ -109,7 +117,6 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -121,8 +128,9 @@
|
||||||
|
|
||||||
// Auxiliary component for avoinding multiple calls to getCompleteRolesList
|
// Auxiliary component for avoinding multiple calls to getCompleteRolesList
|
||||||
const CompleteRolesList = {
|
const CompleteRolesList = {
|
||||||
|
inheritAttrs: false,
|
||||||
render() {
|
render() {
|
||||||
return this.$scopedSlots.default(this.$attrs)
|
return !!this.$slots.default && typeof this.$slots.default == 'function' ? this.$slots.default(this.$attrs) : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
@ -132,7 +140,7 @@
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
capabilities: Array
|
capabilities: Object
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openCapabilitiyEditModal(capabilityKey) {
|
openCapabilitiyEditModal(capabilityKey) {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
|
||||||
<b-loading :active.sync="isLoadingMetadataSections"/>
|
<b-loading v-model="isLoadingMetadataSections" />
|
||||||
|
|
||||||
<div class="tainacan-form sub-header">
|
<div class="tainacan-form sub-header">
|
||||||
<template v-if="activeMetadataSectionsList">
|
<template v-if="activeMetadataSectionsList">
|
||||||
<button
|
<button
|
||||||
|
v-if="activeMetadataSectionsList.length > 0"
|
||||||
aria-controls="filters-items-list"
|
aria-controls="filters-items-list"
|
||||||
:aria-expanded="!collapseAll"
|
:aria-expanded="!collapseAll"
|
||||||
v-if="activeMetadataSectionsList.length > 0"
|
|
||||||
class="link-style collapse-all"
|
class="link-style collapse-all"
|
||||||
@click="collapseAll = !collapseAll">
|
@click="collapseAll = !collapseAll">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -27,15 +27,16 @@
|
||||||
class="show metadata-options-dropdown"
|
class="show metadata-options-dropdown"
|
||||||
aria-role="list"
|
aria-role="list"
|
||||||
trap-focus>
|
trap-focus>
|
||||||
|
<template #trigger>
|
||||||
<button
|
<button
|
||||||
:aria-label="$i18n.get('label_filter_by_metadata_type')"
|
:aria-label="$i18n.get('label_filter_by_metadata_type')"
|
||||||
class="button is-white"
|
class="button is-white">
|
||||||
slot="trigger">
|
|
||||||
<span>{{ $i18n.get('label_filter_by_metadata_type') }}</span>
|
<span>{{ $i18n.get('label_filter_by_metadata_type') }}</span>
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
</template>
|
||||||
<div class="metadata-options-container">
|
<div class="metadata-options-container">
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
v-for="(metadataType, index) in metadataTypeFilterOptions"
|
v-for="(metadataType, index) in metadataTypeFilterOptions"
|
||||||
|
@ -54,8 +55,8 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field class="header-item">
|
<b-field class="header-item">
|
||||||
<b-input
|
<b-input
|
||||||
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
|
|
||||||
v-model="metadataNameFilterString"
|
v-model="metadataNameFilterString"
|
||||||
|
:placeholder="$i18n.get('instruction_type_search_metadata_filter')"
|
||||||
icon="magnify"
|
icon="magnify"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
icon-right="close-circle"
|
icon-right="close-circle"
|
||||||
|
@ -79,21 +80,30 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- The Metadata Sections list -->
|
<!-- The Metadata Sections list -->
|
||||||
<draggable
|
<sortable
|
||||||
v-model="activeMetadataSectionsList"
|
:list="activeMetadataSectionsList"
|
||||||
|
item-key="id"
|
||||||
class="active-metadata-sections-area"
|
class="active-metadata-sections-area"
|
||||||
@change="handleSectionChange($event)"
|
:options="{
|
||||||
:group="{ name:'metadata-sections', pull: false, put: [ 'metadata-sections' ] }"
|
group: {
|
||||||
:sort="(openedMetadataSectionId == '' || openedMetadataSectionId == undefined) && (openedMetadatumId == '' || openedMetadatumId == undefined)"
|
name:'metadata-sections',
|
||||||
:handle="'.handle'"
|
pull: false,
|
||||||
ghost-class="sortable-ghost"
|
put: [ 'metadata-sections' ]
|
||||||
chosen-class="sortable-chosen"
|
},
|
||||||
filter=".not-sortable-item"
|
sort: (openedMetadataSectionId == '' || openedMetadataSectionId == undefined) && (openedMetadatumId == '' || openedMetadatumId == undefined),
|
||||||
:prevent-on-filter="false"
|
direction: 'vertical',
|
||||||
:animation="250">
|
handle: '.handle',
|
||||||
<div
|
ghostClass: 'sortable-ghost',
|
||||||
v-for="(metadataSection, sectionIndex) in activeMetadataSectionsList"
|
chosenClass: 'sortable-chosen',
|
||||||
:key="metadataSection.id">
|
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
|
<div
|
||||||
class="active-metadata-sections-item"
|
class="active-metadata-sections-item"
|
||||||
:class="{
|
:class="{
|
||||||
|
@ -133,13 +143,13 @@
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
:style="{ opacity: !(metadataSection.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || openedMetadataSectionId != '' || isUpdatingMetadataSectionsOrder || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied) ? '1.0' : '0.0' }"
|
|
||||||
v-tooltip="{
|
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'),
|
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,
|
autoHide: true,
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||||
placement: 'auto-start'
|
placement: 'auto-start'
|
||||||
}"
|
}"
|
||||||
|
:style="{ opacity: !(metadataSection.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || openedMetadataSectionId != '' || isUpdatingMetadataSectionsOrder || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied) ? '1.0' : '0.0' }"
|
||||||
class="icon grip-icon">
|
class="icon grip-icon">
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
@ -172,27 +182,27 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="metadataSection.status === 'private'"
|
v-if="metadataSection.status === 'private'"
|
||||||
class="icon"
|
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('status_private'),
|
content: $i18n.get('status_private'),
|
||||||
autoHide: true,
|
autoHide: true,
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||||
placement: 'auto-start'
|
placement: 'auto-start'
|
||||||
}">
|
}"
|
||||||
|
class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-private" />
|
<i class="tainacan-icon tainacan-icon-private" />
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="loading-spinner"
|
v-if="metadataSection.id == undefined"
|
||||||
v-if="metadataSection.id == undefined"/>
|
class="loading-spinner" />
|
||||||
<span
|
<span
|
||||||
class="controls"
|
v-if="metadataSection.id !== undefined"
|
||||||
v-if="metadataSection.id !== undefined">
|
class="controls">
|
||||||
<b-switch
|
<b-switch
|
||||||
:disabled="isUpdatingMetadataSectionsOrder"
|
:disabled="isUpdatingMetadataSectionsOrder"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
:value="metadataSection.enabled"
|
:model-value="metadataSection.enabled"
|
||||||
@input="onChangeEnableSection($event, sectionIndex)"/>
|
@update:model-value="onChangeEnableSection($event, sectionIndex)" />
|
||||||
<a
|
<a
|
||||||
v-if="metadataSection.current_user_can_edit"
|
v-if="metadataSection.current_user_can_edit"
|
||||||
:style="{ visibility:
|
:style="{ visibility:
|
||||||
|
@ -213,7 +223,7 @@
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
v-if="metadataSection.current_user_can_delete"
|
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' }"
|
:style="{ visibility: metadataSection.collection_id != collectionId || metadataSection.id === 'default_section' || metadataSection.metadata_object_list.length ? 'hidden' : 'visible' }"
|
||||||
@click.prevent="removeMetadataSection(metadataSection)">
|
@click.prevent="removeMetadataSection(metadataSection)">
|
||||||
<span
|
<span
|
||||||
|
@ -245,27 +255,41 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<b-loading :active.sync="isUpdatingMetadatum"/>
|
<b-loading v-model="isUpdatingMetadatum" />
|
||||||
|
|
||||||
<!-- The Metadata list, inside each metadata section -->
|
<!-- The Metadata list, inside each metadata section -->
|
||||||
<template v-if="metadataSection.metadata_object_list && Array.isArray(metadataSection.metadata_object_list)">
|
<template v-if="metadataSection.metadata_object_list && Array.isArray(metadataSection.metadata_object_list)">
|
||||||
<draggable
|
<sortable
|
||||||
v-model="metadataSection.metadata_object_list"
|
:list="metadataSection.metadata_object_list"
|
||||||
|
item-key="id"
|
||||||
class="active-metadata-area"
|
class="active-metadata-area"
|
||||||
@change="handleChange($event, sectionIndex)"
|
:options="{
|
||||||
:group="{ name:'metadata', pull: [ 'metadata' ], put: [ 'metadata' ] }"
|
group: {
|
||||||
:sort="(openedMetadatumId == '' || openedMetadatumId == undefined)"
|
name:'metadata',
|
||||||
:handle="'.handle'"
|
pull: [ 'metadata' ],
|
||||||
ghost-class="sortable-ghost"
|
put: [ 'metadata' ]
|
||||||
chosen-class="sortable-chosen"
|
},
|
||||||
filter=".not-sortable-item"
|
sort: (openedMetadatumId == '' || openedMetadatumId == undefined) && (openedMetadataSectionId == '' || openedMetadataSectionId == undefined),
|
||||||
:prevent-on-filter="false"
|
handle: '.handle',
|
||||||
:animation="250">
|
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
|
<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"
|
:key="metadatum.id"
|
||||||
v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)">
|
:data-metadatum-id="metadatum.id"
|
||||||
<div
|
:data-collection-id="metadatum.collection_id"
|
||||||
|
:data-original-section-index="sectionIndex"
|
||||||
class="active-metadatum-item"
|
class="active-metadatum-item"
|
||||||
:class="{
|
:class="{
|
||||||
'is-compact-item': !isCollapseOpen(metadatum.id),
|
'is-compact-item': !isCollapseOpen(metadatum.id),
|
||||||
|
@ -282,8 +306,8 @@
|
||||||
<button
|
<button
|
||||||
:disabled="index == 0"
|
:disabled="index == 0"
|
||||||
class="link-button"
|
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">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-previous tainacan-icon-rotate-90" />
|
<i class="tainacan-icon tainacan-icon-previous tainacan-icon-rotate-90" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -291,21 +315,21 @@
|
||||||
<button
|
<button
|
||||||
:disabled="index == metadataSection.metadata_object_list.filter((meta) => meta != undefined && meta.parent == 0).length - 1"
|
:disabled="index == metadataSection.metadata_object_list.filter((meta) => meta != undefined && meta.parent == 0).length - 1"
|
||||||
class="link-button"
|
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">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-next tainacan-icon-rotate-90" />
|
<i class="tainacan-icon tainacan-icon-next tainacan-icon-rotate-90" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
:style="{ opacity: !(metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied) ? '1.0' : '0.0' }"
|
|
||||||
v-tooltip="{
|
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'),
|
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,
|
autoHide: true,
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||||
placement: 'auto-start'
|
placement: 'auto-start'
|
||||||
}"
|
}"
|
||||||
|
:style="{ opacity: !(metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied) ? '1.0' : '0.0' }"
|
||||||
class="icon grip-icon">
|
class="icon grip-icon">
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
@ -326,9 +350,9 @@
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||||
placement: 'auto-start'
|
placement: 'auto-start'
|
||||||
}"
|
}"
|
||||||
@click="$set(collapses, metadatum.id, !isCollapseOpen(metadatum.id))"
|
|
||||||
class="gray-icon icon"
|
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')" />
|
<i :class="'tainacan-icon tainacan-icon-1-25em tainacan-icon-' + (isCollapseOpen(metadatum.id) ? 'arrowdown' : 'arrowright')" />
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -352,13 +376,13 @@
|
||||||
({{ metadatum.metadata_type_object.name }})
|
({{ metadatum.metadata_type_object.name }})
|
||||||
<span
|
<span
|
||||||
v-if="metadatum.status === 'private'"
|
v-if="metadatum.status === 'private'"
|
||||||
class="icon"
|
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('status_private'),
|
content: $i18n.get('status_private'),
|
||||||
autoHide: true,
|
autoHide: true,
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip'],
|
popperClass: ['tainacan-tooltip', 'tooltip'],
|
||||||
placement: 'auto-start'
|
placement: 'auto-start'
|
||||||
}">
|
}"
|
||||||
|
class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-private" />
|
<i class="tainacan-icon tainacan-icon-private" />
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
|
@ -386,17 +410,17 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="loading-spinner"
|
v-if="metadatum.id == undefined || isUpdatingMetadatum"
|
||||||
v-if="metadatum.id == undefined || isUpdatingMetadatum"/>
|
class="loading-spinner" />
|
||||||
<span
|
<span
|
||||||
class="controls"
|
v-if="metadatum.id !== undefined"
|
||||||
v-if="metadatum.id !== undefined">
|
class="controls">
|
||||||
<b-switch
|
<b-switch
|
||||||
:style="{ visibility: !metadataSection.enabled ? 'hidden' : 'visible' }"
|
:style="{ visibility: !metadataSection.enabled ? 'hidden' : 'visible' }"
|
||||||
:disabled="isUpdatingMetadataOrder || !metadataSection.enabled"
|
:disabled="isUpdatingMetadataOrder || !metadataSection.enabled"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
:value="metadatum.enabled"
|
:model-value="metadatum.enabled"
|
||||||
@input="onChangeEnable($event, index, sectionIndex)"/>
|
@update:model-value="onChangeEnable($event, index, sectionIndex)" />
|
||||||
<a
|
<a
|
||||||
v-if="metadatum.current_user_can_edit"
|
v-if="metadatum.current_user_can_edit"
|
||||||
:style="{ visibility:
|
:style="{ visibility:
|
||||||
|
@ -449,49 +473,50 @@
|
||||||
:is-parent-multiple="metadatum.multiple == 'yes'"
|
:is-parent-multiple="metadatum.multiple == 'yes'"
|
||||||
:is-repository-level="false"
|
:is-repository-level="false"
|
||||||
:collapse-all="collapseAll"
|
:collapse-all="collapseAll"
|
||||||
:section-id="metadataSection.id" />
|
:section-id="metadataSection.id + ''" />
|
||||||
|
|
||||||
<!-- Metadata edition form, for each metadata -->
|
<!-- Metadata edition form, for each metadata -->
|
||||||
<b-modal
|
<b-modal
|
||||||
@close="onEditionCanceled()"
|
:model-value="openedMetadatumId == metadatum.id"
|
||||||
:active="openedMetadatumId == metadatum.id"
|
|
||||||
trap-focus
|
trap-focus
|
||||||
aria-modal
|
aria-modal
|
||||||
aria-role="dialog"
|
aria-role="dialog"
|
||||||
custom-class="tainacan-modal"
|
custom-class="tainacan-modal"
|
||||||
:close-button-aria-label="$i18n.get('close')">
|
:close-button-aria-label="$i18n.get('close')"
|
||||||
|
@close="onEditionCanceled()">
|
||||||
<metadatum-edition-form
|
<metadatum-edition-form
|
||||||
:collection-id="collectionId"
|
:collection-id="collectionId"
|
||||||
:original-metadatum="metadatum"
|
:original-metadatum="metadatum"
|
||||||
:is-repository-level="false"
|
:is-repository-level="false"
|
||||||
@onEditionFinished="onEditionFinished()"
|
:index="index"
|
||||||
@onEditionCanceled="onEditionCanceled()"
|
@on-edition-finished="onEditionFinished()"
|
||||||
:index="index" />
|
@on-edition-canceled="onEditionCanceled()" />
|
||||||
</b-modal>
|
</b-modal>
|
||||||
|
|
||||||
</div>
|
</template>
|
||||||
</draggable><!-- End of .active-metadata-area -->
|
</sortable><!-- End of .active-metadata-area -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Metadata Section edition form, for each metadata section -->
|
<!-- Metadata Section edition form, for each metadata section -->
|
||||||
<b-modal
|
<b-modal
|
||||||
@close="onSectionEditionCanceled()"
|
:model-value="openedMetadataSectionId == metadataSection.id"
|
||||||
:active="openedMetadataSectionId == metadataSection.id"
|
|
||||||
trap-focus
|
trap-focus
|
||||||
aria-modal
|
aria-modal
|
||||||
aria-role="dialog"
|
aria-role="dialog"
|
||||||
custom-class="tainacan-modal"
|
custom-class="tainacan-modal"
|
||||||
:close-button-aria-label="$i18n.get('close')">
|
:close-button-aria-label="$i18n.get('close')"
|
||||||
|
@close="onSectionEditionCanceled()">
|
||||||
<metadata-section-edition-form
|
<metadata-section-edition-form
|
||||||
:collection-id="collectionId"
|
:collection-id="collectionId"
|
||||||
:original-metadata-section="metadataSection"
|
:original-metadata-section="metadataSection"
|
||||||
@onEditionFinished="onSectionEditionFinished()"
|
:index="sectionIndex"
|
||||||
@onEditionCanceled="onSectionEditionCanceled()"
|
@on-edition-finished="onSectionEditionFinished()"
|
||||||
:index="sectionIndex" />
|
@on-edition-canceled="onSectionEditionCanceled()" />
|
||||||
</b-modal>
|
</b-modal>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</draggable> <!-- End of .active-metadata-sections-area -->
|
</template>
|
||||||
|
</sortable> <!-- End of .active-metadata-sections-area -->
|
||||||
</div> <!-- End of .columns -->
|
</div> <!-- End of .columns -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -503,17 +528,23 @@ import ChildMetadataList from '../../components/metadata-types/compound/child-me
|
||||||
import CustomDialog from '../../components/other/custom-dialog.vue';
|
import CustomDialog from '../../components/other/custom-dialog.vue';
|
||||||
import { mapGetters, mapActions } from 'vuex';
|
import { mapGetters, mapActions } from 'vuex';
|
||||||
|
|
||||||
|
import { Sortable } from "sortablejs-vue3";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CollectionMetadataList',
|
name: 'CollectionMetadataList',
|
||||||
components: {
|
components: {
|
||||||
MetadatumEditionForm,
|
MetadatumEditionForm,
|
||||||
MetadataSectionEditionForm,
|
MetadataSectionEditionForm,
|
||||||
ChildMetadataList,
|
ChildMetadataList,
|
||||||
MetadatumDetails
|
MetadatumDetails,
|
||||||
|
Sortable
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
metadataTypeFilterOptions: Array
|
metadataTypeFilterOptions: Array
|
||||||
},
|
},
|
||||||
|
emits: [
|
||||||
|
'on-update-highlighted-metadatum',
|
||||||
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
collectionId: '',
|
collectionId: '',
|
||||||
|
@ -521,7 +552,7 @@ export default {
|
||||||
isUpdatingMetadataOrder: false,
|
isUpdatingMetadataOrder: false,
|
||||||
openedMetadatumId: '',
|
openedMetadatumId: '',
|
||||||
openedMetadataSectionId: '',
|
openedMetadataSectionId: '',
|
||||||
hightlightedMetadatum: '',
|
highlightedMetadatum: '',
|
||||||
collapses: {},
|
collapses: {},
|
||||||
collapseAll: false,
|
collapseAll: false,
|
||||||
metadataNameFilterString: '',
|
metadataNameFilterString: '',
|
||||||
|
@ -532,7 +563,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
hasSomeMetadataTypeFilterApplied() {
|
hasSomeMetadataTypeFilterApplied() {
|
||||||
return this.metadataTypeFilterOptions.length && this.metadataTypeFilterOptions.some((metadatumType) => metadatumType.enabled);
|
return this.metadataTypeFilterOptions.length > 0 && this.metadataTypeFilterOptions.some((metadatumType) => metadatumType.enabled);
|
||||||
},
|
},
|
||||||
activeMetadataSectionsList: {
|
activeMetadataSectionsList: {
|
||||||
get() {
|
get() {
|
||||||
|
@ -541,7 +572,7 @@ export default {
|
||||||
set(value) {
|
set(value) {
|
||||||
this.updateMetadataSections(value);
|
this.updateMetadataSections(value);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route.query': {
|
'$route.query': {
|
||||||
|
@ -566,20 +597,21 @@ export default {
|
||||||
this.editMetadataSection(newQuery.sectionEdit);
|
this.editMetadataSection(newQuery.sectionEdit);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
|
deep: true
|
||||||
},
|
},
|
||||||
collapseAll(isCollapsed) {
|
collapseAll(isCollapsed) {
|
||||||
this.activeMetadataSectionsList.forEach((metadataSection) => {
|
this.activeMetadataSectionsList.forEach((metadataSection) => {
|
||||||
if ( metadataSection.metadata_object_list && Array.isArray(metadataSection.metadata_object_list) )
|
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() {
|
mounted() {
|
||||||
this.cleanMetadataSections();
|
this.cleanMetadataSections();
|
||||||
|
|
||||||
this.$eventBusMetadataList.$on('addMetadatumViaButton', this.addMetadatumViaButton);
|
this.$emitter.on('addMetadatumViaButton', this.addMetadatumViaButton);
|
||||||
this.$eventBusMetadataList.$on('addMetadataSectionViaButton', this.addMetadataSectionViaButton);
|
this.$emitter.on('addMetadataSectionViaButton', this.addMetadataSectionViaButton);
|
||||||
|
|
||||||
this.collectionId = this.$route.params.collectionId;
|
this.collectionId = this.$route.params.collectionId;
|
||||||
this.isLoadingMetadataSections = true;
|
this.isLoadingMetadataSections = true;
|
||||||
|
@ -592,13 +624,13 @@ export default {
|
||||||
this.isLoadingMetadataSections = false;
|
this.isLoadingMetadataSections = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
// Cancels previous Request
|
// Cancels previous Request
|
||||||
if (this.metadataSearchCancel != undefined)
|
if (this.metadataSearchCancel != undefined)
|
||||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||||
|
|
||||||
this.$eventBusMetadataList.$off('addMetadatumViaButton', this.addMetadatumViaButton);
|
this.$emitter.off('addMetadatumViaButton', this.addMetadatumViaButton);
|
||||||
this.$eventBusMetadataList.$off('addMetadataSectionViaButton', this.addMetadataSectionViaButton);
|
this.$emitter.off('addMetadataSectionViaButton', this.addMetadataSectionViaButton);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('metadata', [
|
...mapActions('metadata', [
|
||||||
|
@ -615,41 +647,89 @@ export default {
|
||||||
'moveMetadataSectionUp',
|
'moveMetadataSectionUp',
|
||||||
'moveMetadataSectionDown',
|
'moveMetadataSectionDown',
|
||||||
'moveMetadatumUp',
|
'moveMetadatumUp',
|
||||||
'moveMetadatumDown'
|
'moveMetadatumDown',
|
||||||
|
'moveMetadatum'
|
||||||
]),
|
]),
|
||||||
...mapGetters('metadata',[
|
...mapGetters('metadata',[
|
||||||
'getMetadataSections'
|
'getMetadataSections',
|
||||||
|
'getMetadatumTypes'
|
||||||
]),
|
]),
|
||||||
handleSectionChange(event) {
|
handleSectionChange($event) {
|
||||||
if (event.added)
|
switch ( $event.type ) {
|
||||||
this.addNewMetadataSection(event.added.newIndex);
|
case 'add':
|
||||||
else if (event.removed)
|
this.addNewMetadataSection($event.newIndex);
|
||||||
this.removeMetadataSection(event.removed.element);
|
break;
|
||||||
else if (event.moved)
|
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();
|
this.updateMetadataSectionsOrder();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleChange(event, sectionIndex) {
|
handleChange($event, sectionIndex) {
|
||||||
if (event.added) {
|
switch ( $event.type ) {
|
||||||
if (!event.added.element.id)
|
case 'add':
|
||||||
this.addNewMetadatum(event.added.element, event.added.newIndex, sectionIndex);
|
|
||||||
else {
|
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({
|
this.updateMetadatum({
|
||||||
collectionId: this.collectionId,
|
collectionId: this.collectionId,
|
||||||
metadatumId: event.added.element.id,
|
metadatumId: $event.item.dataset['metadatumId'],
|
||||||
isRepositoryLevel: event.added.element.collection_id === 'default',
|
isRepositoryLevel: $event.item.dataset['collectionId'] === 'default',
|
||||||
index: event.added.newIndex,
|
index: $event.newIndex,
|
||||||
options: {},
|
options: {},
|
||||||
includeOptionsAsHtml: true,
|
includeOptionsAsHtml: true,
|
||||||
sectionId: this.activeMetadataSectionsList[sectionIndex].id
|
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);
|
this.updateMetadataOrder(sectionIndex);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
updateMetadataOrder(sectionIndex) {
|
updateMetadataOrder(sectionIndex) {
|
||||||
let metadataOrder = [];
|
let metadataOrder = [];
|
||||||
|
|
||||||
for (let metadatum of this.activeMetadataSectionsList[sectionIndex].metadata_object_list)
|
for (let metadatum of this.activeMetadataSectionsList[sectionIndex].metadata_object_list)
|
||||||
if (metadatum != undefined)
|
if (metadatum != undefined)
|
||||||
metadataOrder.push({
|
metadataOrder.push({
|
||||||
|
@ -661,10 +741,14 @@ export default {
|
||||||
this.updateCollectionMetadataOrder({ collectionId: this.collectionId, metadataOrder: metadataOrder, metadataSectionId: this.activeMetadataSectionsList[sectionIndex].id })
|
this.updateCollectionMetadataOrder({ collectionId: this.collectionId, metadataOrder: metadataOrder, metadataSectionId: this.activeMetadataSectionsList[sectionIndex].id })
|
||||||
.then(() => this.isUpdatingMetadataOrder = false)
|
.then(() => this.isUpdatingMetadataOrder = false)
|
||||||
.catch(() => this.isUpdatingMetadataOrder = false);
|
.catch(() => this.isUpdatingMetadataOrder = false);
|
||||||
|
|
||||||
},
|
},
|
||||||
updateMetadataSectionsOrder() {
|
updateMetadataSectionsOrder(metadataSectionsList) {
|
||||||
|
if (metadataSectionsList == undefined)
|
||||||
|
metadataSectionsList = this.activeMetadataSectionsList;
|
||||||
|
|
||||||
let metadataSectionsOrder = [];
|
let metadataSectionsOrder = [];
|
||||||
for (let metadataSection of this.activeMetadataSectionsList)
|
for (let metadataSection of metadataSectionsList)
|
||||||
if (metadataSection != undefined) {
|
if (metadataSection != undefined) {
|
||||||
metadataSectionsOrder.push({
|
metadataSectionsOrder.push({
|
||||||
'id': metadataSection.id,
|
'id': metadataSection.id,
|
||||||
|
@ -693,12 +777,13 @@ export default {
|
||||||
onChangeEnableSection($event, index) {
|
onChangeEnableSection($event, index) {
|
||||||
let metadataSectionsOrder = [];
|
let metadataSectionsOrder = [];
|
||||||
for (let metadataSection of this.activeMetadataSectionsList)
|
for (let metadataSection of this.activeMetadataSectionsList)
|
||||||
if (metadataSection != undefined)
|
if (metadataSection != undefined) {
|
||||||
metadataSectionsOrder.push({
|
metadataSectionsOrder.push({
|
||||||
'id': metadataSection.id,
|
'id': metadataSection.id,
|
||||||
'enabled': metadataSection.enabled,
|
'enabled': metadataSection.enabled,
|
||||||
'metadata_order': metadataSection.metadata_object_list.map((aMetadatum) => { return { 'id': aMetadatum.id, 'enabled': aMetadatum.enabled } })
|
'metadata_order': metadataSection.metadata_object_list.map((aMetadatum) => { return { 'id': aMetadatum.id, 'enabled': aMetadatum.enabled } })
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
metadataSectionsOrder[index].enabled = $event;
|
metadataSectionsOrder[index].enabled = $event;
|
||||||
this.isUpdatingMetadataSectionsOrder = true;
|
this.isUpdatingMetadataSectionsOrder = true;
|
||||||
|
@ -708,10 +793,9 @@ export default {
|
||||||
},
|
},
|
||||||
addMetadatumViaButton(metadatumType) {
|
addMetadatumViaButton(metadatumType) {
|
||||||
this.addNewMetadatum(metadatumType, this.activeMetadataSectionsList[0].metadata_object_list.length, 0);
|
this.addNewMetadatum(metadatumType, this.activeMetadataSectionsList[0].metadata_object_list.length, 0);
|
||||||
|
|
||||||
// Higlights the clicked metadatum
|
// Higlights the clicked metadatum
|
||||||
this.hightlightedMetadatum = metadatumType.name;
|
this.highlightedMetadatum = metadatumType.name;
|
||||||
this.$emit('onUpdatehightlightedMetadatum', this.hightlightedMetadatum);
|
this.$emit('on-update-highlighted-metadatum', this.highlightedMetadatum);
|
||||||
},
|
},
|
||||||
addMetadataSectionViaButton() {
|
addMetadataSectionViaButton() {
|
||||||
let lastIndex = this.activeMetadataSectionsList.length;
|
let lastIndex = this.activeMetadataSectionsList.length;
|
||||||
|
@ -730,13 +814,11 @@ export default {
|
||||||
sectionId: this.activeMetadataSectionsList[sectionIndex].id
|
sectionId: this.activeMetadataSectionsList[sectionIndex].id
|
||||||
})
|
})
|
||||||
.then((metadatum) => {
|
.then((metadatum) => {
|
||||||
|
|
||||||
this.updateMetadataOrder(sectionIndex);
|
this.updateMetadataOrder(sectionIndex);
|
||||||
|
|
||||||
this.toggleMetadatumEdition(metadatum)
|
this.toggleMetadatumEdition(metadatum)
|
||||||
this.hightlightedMetadatum = '';
|
this.highlightedMetadatum = '';
|
||||||
this.isUpdatingMetadatum = false;
|
this.isUpdatingMetadatum = false;
|
||||||
this.$emit('onUpdatehightlightedMetadatum', this.hightlightedMetadatum);
|
this.$emit('on-update-highlighted-metadatum', this.highlightedMetadatum);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.isUpdatingMetadatum = false;
|
this.isUpdatingMetadatum = false;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
class="new-collection-menu">
|
class="new-collection-menu">
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getNewCollectionPath()"
|
:to="$routerHelper.getNewCollectionPath()"
|
||||||
class="first-card">
|
class="first-card">
|
||||||
<div class="list-metadata">
|
<div class="list-metadata">
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_items')">
|
:aria-label="$i18n.get('label_collection_items')">
|
||||||
<span
|
<span
|
||||||
|
@ -38,7 +36,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_metadata')">
|
:aria-label="$i18n.get('label_collection_metadata')">
|
||||||
<span
|
<span
|
||||||
|
@ -56,7 +53,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_filters')">
|
:aria-label="$i18n.get('label_collection_filters')">
|
||||||
<span
|
<span
|
||||||
|
@ -76,7 +72,6 @@
|
||||||
<ul v-if="collections.length > 0 && !isLoading">
|
<ul v-if="collections.length > 0 && !isLoading">
|
||||||
<li v-if="!$adminOptions.hideHomeCollectionCreateNewButton && $userCaps.hasCapability('tnc_rep_edit_collections')">
|
<li v-if="!$adminOptions.hideHomeCollectionCreateNewButton && $userCaps.hasCapability('tnc_rep_edit_collections')">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getNewCollectionPath()"
|
:to="$routerHelper.getNewCollectionPath()"
|
||||||
class="tainacan-card new-card">
|
class="tainacan-card new-card">
|
||||||
<div class="list-metadata">
|
<div class="list-metadata">
|
||||||
|
@ -88,7 +83,6 @@
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_items')">
|
:aria-label="$i18n.get('label_collection_items')">
|
||||||
<span
|
<span
|
||||||
|
@ -105,7 +99,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_metadata')">
|
:aria-label="$i18n.get('label_collection_metadata')">
|
||||||
<span
|
<span
|
||||||
|
@ -122,7 +115,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
:to="{ path: $routerHelper.getNewCollectionPath() }"
|
||||||
:aria-label="$i18n.get('label_collection_filters')">
|
:aria-label="$i18n.get('label_collection_filters')">
|
||||||
<span
|
<span
|
||||||
|
@ -141,14 +133,13 @@
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
:key="index"
|
|
||||||
v-for="(collection, index) of collections"
|
v-for="(collection, index) of collections"
|
||||||
|
:key="index"
|
||||||
class="tainacan-card"
|
class="tainacan-card"
|
||||||
:class="{ 'always-visible-collections': $adminOptions.homeCollectionsPerPage }">
|
:class="{ 'always-visible-collections': $adminOptions.homeCollectionsPerPage }">
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
<li>
|
<li>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionItemsPath(collection.id, '') }"
|
:to="{ path: $routerHelper.getCollectionItemsPath(collection.id, '') }"
|
||||||
:aria-label="$i18n.get('label_collection_items')">
|
:aria-label="$i18n.get('label_collection_items')">
|
||||||
<span
|
<span
|
||||||
|
@ -165,7 +156,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.current_user_can_edit_items && $adminOptions.showHomeCollectionCreateItemButton">
|
<li v-if="collection.current_user_can_edit_items && $adminOptions.showHomeCollectionCreateItemButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getNewItemPath(collection.id) }"
|
:to="{ path: $routerHelper.getNewItemPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('add_one_item')">
|
:aria-label="$i18n.get('add_one_item')">
|
||||||
<span
|
<span
|
||||||
|
@ -182,7 +172,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.current_user_can_edit && !$adminOptions.hideHomeCollectionSettingsButton">
|
<li v-if="collection.current_user_can_edit && !$adminOptions.hideHomeCollectionSettingsButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionEditPath(collection.id) }"
|
:to="{ path: $routerHelper.getCollectionEditPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('label_settings')">
|
:aria-label="$i18n.get('label_settings')">
|
||||||
<span
|
<span
|
||||||
|
@ -199,7 +188,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.current_user_can_edit_metadata && !$adminOptions.hideHomeCollectionMetadataButton">
|
<li v-if="collection.current_user_can_edit_metadata && !$adminOptions.hideHomeCollectionMetadataButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionMetadataPath(collection.id) }"
|
:to="{ path: $routerHelper.getCollectionMetadataPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('label_collection_metadata')">
|
:aria-label="$i18n.get('label_collection_metadata')">
|
||||||
<span
|
<span
|
||||||
|
@ -216,7 +204,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="collection.current_user_can_edit_filters && !$adminOptions.hideHomeCollectionFiltersButton">
|
<li v-if="collection.current_user_can_edit_filters && !$adminOptions.hideHomeCollectionFiltersButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionFiltersPath(collection.id) }"
|
:to="{ path: $routerHelper.getCollectionFiltersPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('label_collection_filters')">
|
:aria-label="$i18n.get('label_collection_filters')">
|
||||||
<span
|
<span
|
||||||
|
@ -233,7 +220,6 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="$userCaps.hasCapability('tnc_rep_read_logs') && !$adminOptions.hideHomeCollectionActivitiesButton">
|
<li v-if="$userCaps.hasCapability('tnc_rep_read_logs') && !$adminOptions.hideHomeCollectionActivitiesButton">
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="{ path: $routerHelper.getCollectionActivitiesPath(collection.id) }"
|
:to="{ path: $routerHelper.getCollectionActivitiesPath(collection.id) }"
|
||||||
:aria-label="$i18n.get('label_collection_activities')">
|
:aria-label="$i18n.get('label_collection_activities')">
|
||||||
<span
|
<span
|
||||||
|
@ -266,12 +252,11 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<router-link
|
<router-link
|
||||||
tag="a"
|
|
||||||
:to="$routerHelper.getCollectionPath(collection.id)"
|
:to="$routerHelper.getCollectionPath(collection.id)"
|
||||||
class="card-body">
|
class="card-body">
|
||||||
<img
|
<img
|
||||||
:alt="$i18n.get('label_thumbnail')"
|
|
||||||
v-if="collection.thumbnail != undefined"
|
v-if="collection.thumbnail != undefined"
|
||||||
|
:alt="$i18n.get('label_thumbnail')"
|
||||||
:src="$thumbHelper.getSrc(collection['thumbnail'], 'tainacan-medium')">
|
:src="$thumbHelper.getSrc(collection['thumbnail'], 'tainacan-medium')">
|
||||||
|
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
|
|
|
@ -8,32 +8,31 @@
|
||||||
<div class="field select-all is-pulled-left">
|
<div class="field select-all is-pulled-left">
|
||||||
<span>
|
<span>
|
||||||
<b-checkbox
|
<b-checkbox
|
||||||
@click.native="selectAllCollectionsOnPage()"
|
:model-value="allCollectionsOnPageSelected"
|
||||||
:native-value="allCollectionsOnPageSelected">
|
@update:model-value="selectAllCollectionsOnPage()">
|
||||||
{{ $i18n.get('label_select_all_collections_page') }}
|
{{ $i18n.get('label_select_all_collections_page') }}
|
||||||
</b-checkbox>
|
</b-checkbox>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field is-pulled-right">
|
<div class="field is-pulled-right">
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
|
id="bulk-actions-dropdown"
|
||||||
position="is-bottom-left"
|
position="is-bottom-left"
|
||||||
:disabled="!isSelectingCollections"
|
:disabled="!isSelectingCollections"
|
||||||
id="bulk-actions-dropdown"
|
|
||||||
aria-role="list"
|
aria-role="list"
|
||||||
trap-focus>
|
trap-focus>
|
||||||
<button
|
<template #trigger>
|
||||||
class="button is-white"
|
<button class="button is-white">
|
||||||
slot="trigger">
|
|
||||||
<span>{{ $i18n.get('label_bulk_actions') }}</span>
|
<span>{{ $i18n.get('label_bulk_actions') }}</span>
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-arrowdown" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
</template>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
id="item-delete-selected-items"
|
id="item-delete-selected-items"
|
||||||
@click="deleteSelectedCollections()"
|
aria-role="listitem"
|
||||||
aria-role="listitem">
|
@click="deleteSelectedCollections()">
|
||||||
{{ $i18n.get('label_delete_selected_collections') }}
|
{{ $i18n.get('label_delete_selected_collections') }}
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<!-- <b-dropdown-item
|
<!-- <b-dropdown-item
|
||||||
|
@ -52,37 +51,37 @@
|
||||||
|
|
||||||
<!-- Backdrop for escaping context menu -->
|
<!-- Backdrop for escaping context menu -->
|
||||||
<div
|
<div
|
||||||
|
class="context-menu-backdrop"
|
||||||
@click.left="clearContextMenu()"
|
@click.left="clearContextMenu()"
|
||||||
@click.right="clearContextMenu()"
|
@click.right="clearContextMenu()" />
|
||||||
class="context-menu-backdrop" />
|
|
||||||
|
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
inline
|
inline
|
||||||
:style="{ top: cursorPosY + 'px', left: cursorPosX + 'px' }"
|
:style="{ top: cursorPosY + 'px', left: cursorPosX + 'px' }"
|
||||||
trap-focus>
|
trap-focus>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
@click="openCollection()"
|
v-if="!isOnTrash"
|
||||||
v-if="!isOnTrash">
|
@click="openCollection()">
|
||||||
{{ $i18n.getFrom('collections', 'view_item') }}
|
{{ $i18n.getFrom('collections', 'view_item') }}
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item
|
<b-dropdown-item
|
||||||
@click="openCollectionOnNewTab()"
|
v-if="!isOnTrash"
|
||||||
v-if="!isOnTrash">
|
@click="openCollectionOnNewTab()">
|
||||||
{{ $i18n.get('label_open_collection_new_tab') }}
|
{{ $i18n.get('label_open_collection_new_tab') }}
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<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') }}
|
{{ !selectedCollections[contextMenuIndex] ? $i18n.get('label_select_collection') : $i18n.get('label_unselect_collection') }}
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<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') }}
|
{{ $i18n.getFrom('collections', 'edit_item') }}
|
||||||
</b-dropdown-item>
|
</b-dropdown-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') }}
|
{{ $i18n.get('label_delete_collection') }}
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
|
@ -101,31 +100,45 @@
|
||||||
</th>
|
</th>
|
||||||
<!-- Thumbnail -->
|
<!-- Thumbnail -->
|
||||||
<th class="thumbnail-cell">
|
<th class="thumbnail-cell">
|
||||||
<div class="th-wrap">{{ $i18n.get('label_thumbnail') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_thumbnail') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_name') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_name') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_description') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_description') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Modification Date -->
|
<!-- Modification Date -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_modification_date') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_modification_date') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Creation Date -->
|
<!-- Creation Date -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_creation_date') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_creation_date') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Created By -->
|
<!-- Created By -->
|
||||||
<th>
|
<th>
|
||||||
<div class="th-wrap">{{ $i18n.get('label_created_by') }}</div>
|
<div class="th-wrap">
|
||||||
|
{{ $i18n.get('label_created_by') }}
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<!-- Total Items -->
|
<!-- Total Items -->
|
||||||
<th v-if="!isOnTrash">
|
<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>
|
||||||
<th
|
<th
|
||||||
v-if="collections.findIndex((collection) => collection.current_user_can_edit || collection.current_user_can_delete) >= 0"
|
v-if="collections.findIndex((collection) => collection.current_user_can_edit || collection.current_user_can_delete) >= 0"
|
||||||
|
@ -137,9 +150,9 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr
|
<tr
|
||||||
:class="{ 'selected-row': selectedCollections[index] }"
|
v-for="(collection, index) of collections"
|
||||||
:key="index"
|
:key="index"
|
||||||
v-for="(collection, index) of collections">
|
:class="{ 'selected-row': selectedCollections[index] }">
|
||||||
<!-- Checking list -->
|
<!-- Checking list -->
|
||||||
<td
|
<td
|
||||||
v-if="$userCaps.hasCapability('tnc_rep_delete_collections')"
|
v-if="$userCaps.hasCapability('tnc_rep_delete_collections')"
|
||||||
|
@ -153,14 +166,14 @@
|
||||||
class="status-cell">
|
class="status-cell">
|
||||||
<span
|
<span
|
||||||
v-if="$statusHelper.hasIcon(collection.status)"
|
v-if="$statusHelper.hasIcon(collection.status)"
|
||||||
class="icon has-text-gray"
|
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('status_' + collection.status),
|
content: $i18n.get('status_' + collection.status),
|
||||||
autoHide: true,
|
autoHide: true,
|
||||||
html: true,
|
html: true,
|
||||||
popperClass: ['tainacan-tooltip', 'tooltip', 'tainacan-repository-tooltip'],
|
popperClass: ['tainacan-tooltip', 'tooltip', 'tainacan-repository-tooltip'],
|
||||||
placement: 'auto-start'
|
placement: 'auto-start'
|
||||||
}">
|
}"
|
||||||
|
class="icon has-text-gray">
|
||||||
<i
|
<i
|
||||||
class="tainacan-icon tainacan-icon-1em"
|
class="tainacan-icon tainacan-icon-1em"
|
||||||
:class="$statusHelper.getIcon(collection.status)"
|
:class="$statusHelper.getIcon(collection.status)"
|
||||||
|
@ -170,10 +183,10 @@
|
||||||
<!-- Thumbnail -->
|
<!-- Thumbnail -->
|
||||||
<td
|
<td
|
||||||
class="thumbnail-cell column-default-width"
|
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')"
|
: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>
|
<span>
|
||||||
<img
|
<img
|
||||||
:alt="$i18n.get('label_thumbnail')"
|
:alt="$i18n.get('label_thumbnail')"
|
||||||
|
@ -184,10 +197,10 @@
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
<td
|
<td
|
||||||
class="column-default-width column-main-content"
|
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')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
@ -205,10 +218,10 @@
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
<td
|
<td
|
||||||
class="column-large-width"
|
class="column-large-width"
|
||||||
@click.left="onClickCollection($event, collection.id, index)"
|
|
||||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
|
||||||
:label="$i18n.get('label_description')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
@ -225,11 +238,11 @@
|
||||||
</td>
|
</td>
|
||||||
<!-- Modification Date -->
|
<!-- Modification Date -->
|
||||||
<td
|
<td
|
||||||
@click.left="onClickCollection($event, collection.id, index)"
|
|
||||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
|
||||||
class="table-modification column-default-width"
|
class="table-modification column-default-width"
|
||||||
:label="$i18n.get('label_modification_date')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
@ -246,11 +259,11 @@
|
||||||
</td>
|
</td>
|
||||||
<!-- Creation Date -->
|
<!-- Creation Date -->
|
||||||
<td
|
<td
|
||||||
@click.left="onClickCollection($event, collection.id, index)"
|
|
||||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
|
||||||
class="table-creation column-default-width"
|
class="table-creation column-default-width"
|
||||||
:label="$i18n.get('label_creation_date')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
@ -267,11 +280,11 @@
|
||||||
</td>
|
</td>
|
||||||
<!-- Created by -->
|
<!-- Created by -->
|
||||||
<td
|
<td
|
||||||
@click.left="onClickCollection($event, collection.id, index)"
|
|
||||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
|
||||||
class="table-creation column-default-width"
|
class="table-creation column-default-width"
|
||||||
:label="$i18n.get('label_created_by')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
@ -288,12 +301,12 @@
|
||||||
</td>
|
</td>
|
||||||
<!-- Total items -->
|
<!-- Total items -->
|
||||||
<td
|
<td
|
||||||
@click.left="onClickCollection($event, collection.id, index)"
|
v-if="collection.total_items != undefined"
|
||||||
@click.right="onRightClickCollection($event, collection.id, index)"
|
|
||||||
class="column-small-width column-align-right"
|
class="column-small-width column-align-right"
|
||||||
:label="$i18n.get('label_total_items')"
|
: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
|
<p
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
delay: {
|
delay: {
|
||||||
|
@ -311,14 +324,14 @@
|
||||||
<!-- Actions -->
|
<!-- Actions -->
|
||||||
<td
|
<td
|
||||||
v-if="collection.current_user_can_edit || collection.current_user_can_delete"
|
v-if="collection.current_user_can_edit || collection.current_user_can_delete"
|
||||||
@click="onClickCollection($event, collection.id, index)"
|
|
||||||
class="column-default-width"
|
class="column-default-width"
|
||||||
:class="{ 'actions-cell': collection.current_user_can_edit || collection.current_user_can_delete }"
|
: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">
|
<div class="actions-container">
|
||||||
<a
|
<a
|
||||||
id="button-edit"
|
|
||||||
v-if="collection.current_user_can_edit"
|
v-if="collection.current_user_can_edit"
|
||||||
|
id="button-edit"
|
||||||
:aria-label="$i18n.getFrom('collections','edit_item')"
|
:aria-label="$i18n.getFrom('collections','edit_item')"
|
||||||
@click.prevent.stop="goToCollectionEditPage(collection.id)">
|
@click.prevent.stop="goToCollectionEditPage(collection.id)">
|
||||||
<span
|
<span
|
||||||
|
@ -334,8 +347,8 @@
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
id="button-delete"
|
|
||||||
v-if="collection.current_user_can_delete"
|
v-if="collection.current_user_can_delete"
|
||||||
|
id="button-delete"
|
||||||
:aria-label="$i18n.get('label_button_delete')"
|
:aria-label="$i18n.get('label_button_delete')"
|
||||||
@click.prevent.stop="deleteOneCollection(collection.id)">
|
@click.prevent.stop="deleteOneCollection(collection.id)">
|
||||||
<span
|
<span
|
||||||
|
@ -354,9 +367,9 @@
|
||||||
<a
|
<a
|
||||||
id="button-open-external"
|
id="button-open-external"
|
||||||
:aria-label="$i18n.getFrom('collections','view_item')"
|
:aria-label="$i18n.getFrom('collections','view_item')"
|
||||||
@click.stop=""
|
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:href="collection.url">
|
:href="collection.url"
|
||||||
|
@click.stop="">
|
||||||
<span
|
<span
|
||||||
v-tooltip="{
|
v-tooltip="{
|
||||||
content: $i18n.get('label_view_collection_on_website'),
|
content: $i18n.get('label_view_collection_on_website'),
|
||||||
|
@ -412,12 +425,16 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
collections() {
|
collections: {
|
||||||
|
handler() {
|
||||||
this.selectedCollections = [];
|
this.selectedCollections = [];
|
||||||
for (let i = 0; i < this.collections.length; i++)
|
for (let i = 0; i < this.collections.length; i++)
|
||||||
this.selectedCollections.push(false);
|
this.selectedCollections.push(false);
|
||||||
},
|
},
|
||||||
selectedCollections() {
|
deep: true
|
||||||
|
},
|
||||||
|
selectedCollections: {
|
||||||
|
handler() {
|
||||||
let allSelected = true;
|
let allSelected = true;
|
||||||
let isSelecting = false;
|
let isSelecting = false;
|
||||||
for (let i = 0; i < this.selectedCollections.length; i++) {
|
for (let i = 0; i < this.selectedCollections.length; i++) {
|
||||||
|
@ -429,6 +446,8 @@ export default {
|
||||||
}
|
}
|
||||||
this.allCollectionsOnPageSelected = allSelected;
|
this.allCollectionsOnPageSelected = allSelected;
|
||||||
this.isSelectingCollections = isSelecting;
|
this.isSelectingCollections = isSelecting;
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -539,17 +558,16 @@ export default {
|
||||||
this.clearContextMenu();
|
this.clearContextMenu();
|
||||||
},
|
},
|
||||||
selectCollection() {
|
selectCollection() {
|
||||||
if (this.contextMenuIndex != null) {
|
if (this.contextMenuIndex != null)
|
||||||
this.$set(this.selectedCollections, this.contextMenuIndex, !this.selectedCollections[this.contextMenuIndex]);
|
Object.assign( this.selectedCollections, { [this.contextMenuIndex]: !this.selectedCollections[this.contextMenuIndex] });
|
||||||
}
|
|
||||||
this.clearContextMenu();
|
this.clearContextMenu();
|
||||||
},
|
},
|
||||||
onClickCollection($event, collectionId, index) {
|
onClickCollection($event, collectionId, index) {
|
||||||
if ($event.ctrlKey) {
|
if ($event.ctrlKey)
|
||||||
this.$set(this.selectedCollections, index, !this.selectedCollections[index]);
|
Object.assign( this.selectedCollections, { [index]: !this.selectedCollections[index] });
|
||||||
} else {
|
else
|
||||||
this.$router.push(this.$routerHelper.getCollectionPath(collectionId));
|
this.$router.push(this.$routerHelper.getCollectionPath(collectionId));
|
||||||
}
|
|
||||||
},
|
},
|
||||||
goToCollectionEditPage(collectionId) {
|
goToCollectionEditPage(collectionId) {
|
||||||
this.$router.push(this.$routerHelper.getCollectionEditPath(collectionId));
|
this.$router.push(this.$routerHelper.getCollectionEditPath(collectionId));
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,22 +1,24 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="metadata-mappers-area">
|
<div class="metadata-mappers-area">
|
||||||
<b-loading
|
<b-loading
|
||||||
|
v-model="isLoadingMetadatumMappers"
|
||||||
:can-cancel="false"
|
:can-cancel="false"
|
||||||
:is-full-page="false"
|
:is-full-page="false" />
|
||||||
:active.sync="isLoadingMetadatumMappers"/>
|
|
||||||
<b-loading
|
<b-loading
|
||||||
|
v-model="isLoadingMetadata"
|
||||||
:can-cancel="false"
|
:can-cancel="false"
|
||||||
:is-full-page="false"
|
:is-full-page="false" />
|
||||||
:active.sync="isLoadingMetadata"/>
|
|
||||||
|
|
||||||
<b-field>
|
<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
|
<b-select
|
||||||
id="mappers-options-dropdown"
|
id="mappers-options-dropdown"
|
||||||
size="is-small"
|
size="is-small"
|
||||||
:placeholder="$i18n.get('instruction_select_a_mapper')"
|
:placeholder="$i18n.get('instruction_select_a_mapper')"
|
||||||
:value="mapper"
|
:model-value="mapper"
|
||||||
@input="onSelectMetadataMapper($event)">
|
@update:model-value="onSelectMetadataMapper($event)">
|
||||||
<option
|
<option
|
||||||
v-for="metadatumMapper in metadatumMappers"
|
v-for="metadatumMapper in metadatumMappers"
|
||||||
:key="metadatumMapper.slug"
|
:key="metadatumMapper.slug"
|
||||||
|
@ -42,8 +44,8 @@
|
||||||
|
|
||||||
<!-- Mapping list -->
|
<!-- Mapping list -->
|
||||||
<form
|
<form
|
||||||
class="tainacan-form"
|
v-else
|
||||||
v-else>
|
class="tainacan-form">
|
||||||
|
|
||||||
<div class="mapping-control">
|
<div class="mapping-control">
|
||||||
<div
|
<div
|
||||||
|
@ -61,8 +63,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
<p>{{ $i18n.get('label_from_source_mapper') }}</p>
|
||||||
<hr>
|
<hr>
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
|
@ -78,9 +80,9 @@
|
||||||
class="source-metadatum">
|
class="source-metadatum">
|
||||||
|
|
||||||
<b-select
|
<b-select
|
||||||
:name="'mappers-metadatum-select-' + mapperMetadatum.slug"
|
|
||||||
v-model="mapperMetadatum.selected"
|
v-model="mapperMetadatum.selected"
|
||||||
@input="onSelectMetadatumForMapperMetadata">
|
:name="'mappers-metadatum-select-' + mapperMetadatum.slug"
|
||||||
|
@update:model-value="onSelectMetadatumForMapperMetadata">
|
||||||
<option
|
<option
|
||||||
value="">
|
value="">
|
||||||
{{ $i18n.get('instruction_select_a_metadatum') }}
|
{{ $i18n.get('instruction_select_a_metadatum') }}
|
||||||
|
@ -144,22 +146,22 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
@click.prevent="onUpdateMetadataMapperMetadataClick"
|
|
||||||
:class="{ 'is-loading': isMapperMetadataLoading }"
|
: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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<b-modal
|
<b-modal
|
||||||
@close="onCancelNewMetadataMapperMetadata"
|
v-model="isMapperMetadataCreating"
|
||||||
:active.sync="isMapperMetadataCreating"
|
|
||||||
trap-focus
|
trap-focus
|
||||||
aria-modal
|
aria-modal
|
||||||
aria-role="dialog"
|
aria-role="dialog"
|
||||||
custom-class="tainacan-modal"
|
custom-class="tainacan-modal"
|
||||||
:close-button-aria-label="$i18n.get('close')">
|
:close-button-aria-label="$i18n.get('close')"
|
||||||
|
@close="onCancelNewMetadataMapperMetadata">
|
||||||
<div
|
<div
|
||||||
autofocus
|
autofocus
|
||||||
role="dialog"
|
role="dialog"
|
||||||
|
@ -178,10 +180,10 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-input
|
<b-input
|
||||||
|
v-model="newMetadataUri"
|
||||||
placeholder="URI"
|
placeholder="URI"
|
||||||
type="url"
|
type="url"
|
||||||
required
|
required />
|
||||||
v-model="newMetadataUri"/>
|
|
||||||
</b-field>
|
</b-field>
|
||||||
<div class="field is-grouped form-submit">
|
<div class="field is-grouped form-submit">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
@ -193,9 +195,9 @@
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
:class="{ 'is-loading': isMapperMetadataLoading, 'is-success': !isMapperMetadataLoading }"
|
:class="{ 'is-loading': isMapperMetadataLoading, 'is-success': !isMapperMetadataLoading }"
|
||||||
@click.prevent="onSaveNewMetadataMapperMetadata"
|
|
||||||
:disabled="isNewMetadataMapperMetadataDisabled || isMapperMetadataLoading"
|
:disabled="isNewMetadataMapperMetadataDisabled || isMapperMetadataLoading"
|
||||||
class="button">{{ $i18n.get('save') }}
|
class="button"
|
||||||
|
@click.prevent="onSaveNewMetadataMapperMetadata">{{ $i18n.get('save') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -228,14 +230,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
metadatumMappers() {
|
...mapGetters('metadata', {
|
||||||
return this.getMetadatumMappers();
|
'metadatumMappers': 'getMetadatumMappers',
|
||||||
},
|
'activeMetadatumList': 'getMetadata'
|
||||||
|
}),
|
||||||
isNewMetadataMapperMetadataDisabled() {
|
isNewMetadataMapperMetadataDisabled() {
|
||||||
return !this.newMetadataLabel || !this.newMetadataUri;
|
return !this.newMetadataLabel || !this.newMetadataUri;
|
||||||
},
|
|
||||||
activeMetadatumList() {
|
|
||||||
return this.getMetadata();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -275,10 +275,6 @@ export default {
|
||||||
'fetchMetadatumMappers',
|
'fetchMetadatumMappers',
|
||||||
'updateMetadataMapperMetadata',
|
'updateMetadataMapperMetadata',
|
||||||
]),
|
]),
|
||||||
...mapGetters('metadata',[
|
|
||||||
'getMetadatumMappers',
|
|
||||||
'getMetadata'
|
|
||||||
]),
|
|
||||||
loadMetadataMappers() {
|
loadMetadataMappers() {
|
||||||
this.isLoadingMetadatumMappers = true;
|
this.isLoadingMetadatumMappers = true;
|
||||||
this.fetchMetadatumMappers()
|
this.fetchMetadatumMappers()
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue