Merge branch 'release/0.18' into dependabot/npm_and_yarn/lodash-4.17.21

This commit is contained in:
Vinícius Nunes Medeiros 2021-05-17 09:30:14 -03:00 committed by GitHub
commit 0085746a99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
115 changed files with 1948 additions and 1464 deletions

113
package-lock.json generated
View File

@ -1666,9 +1666,9 @@
} }
}, },
"apexcharts": { "apexcharts": {
"version": "3.24.0", "version": "3.26.1",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.24.0.tgz", "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.26.1.tgz",
"integrity": "sha512-iT6czJCIVrmAtrcO90MZTQCvC+xi6R6Acf0jNH/d40FVTtCfcqECuKIh5iAMyOTtgUb7+fQ8rbadH2bm1kbL9Q==", "integrity": "sha512-Z/pfGTsL4YUm1tHd6a0d0G2hX4XUmhEI0b/5BxVK69dEB/XXvVMX9hKCkcIx+kPyVqVFCuo91ZjCdqjMcmSVBA==",
"requires": { "requires": {
"svg.draggable.js": "^2.2.2", "svg.draggable.js": "^2.2.2",
"svg.easing.js": "^2.0.0", "svg.easing.js": "^2.0.0",
@ -3723,6 +3723,12 @@
"esprima": "^4.0.0" "esprima": "^4.0.0"
} }
}, },
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"ms": { "ms": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@ -5465,9 +5471,9 @@
"dev": true "dev": true
}, },
"hosted-git-info": { "hosted-git-info": {
"version": "2.8.8", "version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
}, },
"hpack.js": { "hpack.js": {
"version": "2.1.6", "version": "2.1.6",
@ -5844,6 +5850,12 @@
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true "dev": true
}, },
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"string-width": { "string-width": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
@ -6451,6 +6463,12 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}, },
"lodash.difference": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz",
"integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=",
"dev": true
},
"loglevel": { "loglevel": {
"version": "1.6.8", "version": "1.6.8",
"resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.8.tgz", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.8.tgz",
@ -6824,6 +6842,15 @@
"resolved": "https://registry.npmjs.org/moment/-/moment-2.25.3.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.25.3.tgz",
"integrity": "sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg==" "integrity": "sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg=="
}, },
"moment-locales-webpack-plugin": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/moment-locales-webpack-plugin/-/moment-locales-webpack-plugin-1.2.0.tgz",
"integrity": "sha512-QAi5v0OlPUP7GXviKMtxnpBAo8WmTHrUNN7iciAhNOEAd9evCOvuN0g1N7ThIg3q11GLCkjY1zQ2saRcf/43nQ==",
"dev": true,
"requires": {
"lodash.difference": "^4.5.0"
}
},
"move-concurrently": { "move-concurrently": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
@ -8268,9 +8295,9 @@
"dev": true "dev": true
}, },
"querystringify": { "querystringify": {
"version": "2.1.1", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
"integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
"dev": true "dev": true
}, },
"randombytes": { "randombytes": {
@ -8440,8 +8467,7 @@
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.13.5", "version": "0.13.5",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
"integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA=="
"dev": true
}, },
"regenerator-transform": { "regenerator-transform": {
"version": "0.14.4", "version": "0.14.4",
@ -10110,6 +10136,12 @@
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true "dev": true
}, },
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"string-width": { "string-width": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
@ -10690,9 +10722,9 @@
} }
}, },
"url-parse": { "url-parse": {
"version": "1.4.7", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
"integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"querystringify": "^2.1.1", "querystringify": "^2.1.1",
@ -10731,13 +10763,29 @@
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
}, },
"v-tooltip": { "v-tooltip": {
"version": "2.0.3", "version": "2.1.3",
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.3.tgz", "resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.1.3.tgz",
"integrity": "sha512-KZZY3s+dcijzZmV2qoDH4rYmjMZ9YKGBVoUznZKQX0e3c2GjpJm3Sldzz8HHH2Ud87JqhZPB4+4gyKZ6m98cKQ==", "integrity": "sha512-xXngyxLQTOx/yUEy50thb8te7Qo4XU6h4LZB6cvEfVd9mnysUxLEoYwGWDdqR+l69liKsy3IPkdYff3J1gAJ5w==",
"requires": { "requires": {
"lodash": "^4.17.15", "@babel/runtime": "^7.13.10",
"popper.js": "^1.16.0", "lodash": "^4.17.21",
"vue-resize": "^0.4.5" "popper.js": "^1.16.1",
"vue-resize": "^1.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.14.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz",
"integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}
} }
}, },
"v8-compile-cache": { "v8-compile-cache": {
@ -10783,9 +10831,9 @@
"integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==" "integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ=="
}, },
"vue-apexcharts": { "vue-apexcharts": {
"version": "1.6.0", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/vue-apexcharts/-/vue-apexcharts-1.6.0.tgz", "resolved": "https://registry.npmjs.org/vue-apexcharts/-/vue-apexcharts-1.6.1.tgz",
"integrity": "sha512-sT6tuVTLBwfH3TA7azecDNS/W70bmz14ZJI7aE7QIqcG9I6OywyH7x3hcOeY1v1DxttI8Svc5RuYj4Dd+A5F4g==" "integrity": "sha512-ILn3/55IvZQUgsc7+jKDjPfHfGUlcUQi/lDrLjRe5g7gfjj99o8otXoHwMeib3CBHYdQXNG9foe1vzv7RdUzXA=="
}, },
"vue-awesome-swiper": { "vue-awesome-swiper": {
"version": "4.1.1", "version": "4.1.1",
@ -10869,9 +10917,22 @@
"integrity": "sha512-viecHQiHVLez7HlYUQsv1wJb2MT/RDSzkDp6m3In41vPrk6OsBmT2qRE8LZqYIA4daIwrnx/Xm8h4fjOpuE3hw==" "integrity": "sha512-viecHQiHVLez7HlYUQsv1wJb2MT/RDSzkDp6m3In41vPrk6OsBmT2qRE8LZqYIA4daIwrnx/Xm8h4fjOpuE3hw=="
}, },
"vue-resize": { "vue-resize": {
"version": "0.4.5", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-0.4.5.tgz", "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-1.0.1.tgz",
"integrity": "sha512-bhP7MlgJQ8TIkZJXAfDf78uJO+mEI3CaLABLjv0WNzr4CcGRGPIAItyWYnP6LsPA4Oq0WE+suidNs6dgpO4RHg==" "integrity": "sha512-z5M7lJs0QluJnaoMFTIeGx6dIkYxOwHThlZDeQnWZBizKblb99GSejPnK37ZbNE/rVwDcYcHY+Io+AxdpY952w==",
"requires": {
"@babel/runtime": "^7.13.10"
},
"dependencies": {
"@babel/runtime": {
"version": "7.14.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz",
"integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
}
}
}, },
"vue-router": { "vue-router": {
"version": "3.1.6", "version": "3.1.6",

View File

@ -8,7 +8,7 @@
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --display-error-details --progress --hide-modules" "build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --display-error-details --progress --hide-modules"
}, },
"dependencies": { "dependencies": {
"apexcharts": "^3.24.0", "apexcharts": "^3.26.1",
"countup.js": "^2.0.7", "countup.js": "^2.0.7",
"axios": "^0.21.1", "axios": "^0.21.1",
"blurhash": "^1.1.3", "blurhash": "^1.1.3",
@ -24,9 +24,9 @@
"react-dom": "^16.13.1", "react-dom": "^16.13.1",
"swiper": "^5.2.0", "swiper": "^5.2.0",
"t": "^0.5.1", "t": "^0.5.1",
"v-tooltip": "^2.0.3", "v-tooltip": "^2.1.3",
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-apexcharts": "^1.6.0", "vue-apexcharts": "^1.6.1",
"vue-awesome-swiper": "^4.1.1", "vue-awesome-swiper": "^4.1.1",
"vue-blurhash": "^0.1.4", "vue-blurhash": "^0.1.4",
"vue-countup-v2": "^4.0.0", "vue-countup-v2": "^4.0.0",
@ -49,6 +49,7 @@
"eslint-loader": "^2.2.1", "eslint-loader": "^2.2.1",
"eslint-plugin-vue": "^5.2.3", "eslint-plugin-vue": "^5.2.3",
"file-loader": "^2.0.0", "file-loader": "^2.0.0",
"moment-locales-webpack-plugin": "^1.2.0",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"sass-loader": "^7.3.1", "sass-loader": "^7.3.1",
"style-loader": "^0.23.1", "style-loader": "^0.23.1",

View File

@ -687,17 +687,37 @@ a.pswp__share--download:hover {
.tainacan-media-component__swiper-main .swiper-slide-content { .tainacan-media-component__swiper-main .swiper-slide-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: block;
align-items: center; text-align: center; }
justify-content: center; .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed {
flex-direction: column; }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-embed-container {
width: 100%; width: 100%;
height: auto; } height: auto; }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-has-aspect-ratio {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 2) / 1);
/* Default to 2:1 aspect ratio. */
margin-left: auto;
margin-right: auto; }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-21-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 21) / 9); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-18-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 18) / 9); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-16-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 16) / 9); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-4-3 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 4) / 3); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-1-1 {
max-width: var(--tainacan-media-main-carousel-height, 60vh); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-3-4 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 3) / 4); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-9-16 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 9) / 16); }
.tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-1-2 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 1) / 2); }
.tainacan-media-component__swiper-main .swiper-slide-content iframe { .tainacan-media-component__swiper-main .swiper-slide-content iframe {
max-height: var(--tainacan-media-main-carousel-height, 60vh); max-height: var(--tainacan-media-main-carousel-height, 60vh);
width: 100%;
max-width: 100%; max-width: 100%;
margin-left: auto;
margin-right: auto;
border: none; border: none;
display: block; display: block;
background-image: url("../images/preloader.gif"); background-image: url("../images/preloader.gif");
@ -724,6 +744,9 @@ a.pswp__share--download:hover {
.tainacan-media-component__swiper-main .swiper-slide-content img { .tainacan-media-component__swiper-main .swiper-slide-content img {
width: auto; width: auto;
max-height: var(--tainacan-media-main-carousel-height, 60vh); } max-height: var(--tainacan-media-main-carousel-height, 60vh); }
.tainacan-media-component__swiper-main .swiper-slide-content .twitter-tweet {
margin-left: auto;
margin-right: auto; }
.tainacan-media-component__swiper-thumbs { .tainacan-media-component__swiper-thumbs {
width: 100%; width: 100%;
@ -833,27 +856,53 @@ a.pswp__share--download:hover {
justify-content: center; } justify-content: center; }
.tainacan-photoswipe-layer .pswp__container .attachment-without-image { .tainacan-photoswipe-layer .pswp__container .attachment-without-image {
width: 100%; width: 100%;
height: 100%; height: calc(100% - 44px);
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
justify-content: center; } text-align: center;
.tainacan-photoswipe-layer .pswp__container .attachment-without-image.tainacan-embed-container:not(.tainacan-embed-without-iframe) {
padding: 0px; }
.tainacan-photoswipe-layer .pswp__container .attachment-without-image .tainacan-embed-container .twitter-tweet {
width: 100vw !important; }
.tainacan-photoswipe-layer .pswp__container iframe {
padding: 44px; padding: 44px;
min-height: 90vh; margin-top: 22px; }
max-height: 90vh; .tainacan-photoswipe-layer .pswp__container .attachment-without-image > iframe:not(.wp-embedded-content) {
height: 100%; width: 90vw;
width: 100%; height: 90vh;
max-width: 100%; border: none;
margin: 0 auto; margin: 44px;
display: block;
background-image: url("../images/preloader.gif");
background-repeat: no-repeat;
background-position: center; }
.tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap > iframe#iframePDF {
width: 90vw;
height: 90vh;
border: none; border: none;
margin: 44px auto;
display: block; display: block;
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 .tainacan-content-embed {
width: 100%;
height: auto; }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-has-aspect-ratio {
max-width: calc((90vh * 2) / 1);
/* Default to 2:1 aspect ratio. */
margin-left: auto;
margin-right: auto; }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-21-9 {
max-width: calc((90vh * 21) / 9); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-18-9 {
max-width: calc((90vh * 18) / 9); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-16-9 {
max-width: calc((90vh * 16) / 9); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-4-3 {
max-width: calc((90vh * 4) / 3); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-1 {
max-width: 90vh; }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-9-16 {
max-width: calc((90vh * 9) / 16); }
.tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-2 {
max-width: calc((90vh * 1) / 2); }
.tainacan-photoswipe-layer .pswp__container a:first-of-type, .tainacan-photoswipe-layer .pswp__container a:first-of-type,
.tainacan-photoswipe-layer .pswp__container p:first-of-type, .tainacan-photoswipe-layer .pswp__container p:first-of-type,
.tainacan-photoswipe-layer .pswp__container article:first-of-type { .tainacan-photoswipe-layer .pswp__container article:first-of-type {

File diff suppressed because one or more lines are too long

View File

@ -1,44 +1,64 @@
.tainacan-embed-container { /* TAINACAN EMBEDS
position: relative; * This file copies most of Gutenberg's logic for responsive blocks,
height: 0; * but uses different classes to avoid future conflicts.
overflow: hidden; * Check their original css: /packages/block-library/src/embed/style.scss
*/
/*
* The embed container is in a `figure` element, and many themes zero this out.
* This rule explicitly sets it, to ensure at least some bottom-margin in the flow.
*/
:not(.wp-block-embed__wrapper)>.tainacan-content-embed {
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
clear: both;
}
/* Don't allow iframe to overflow it's container. */
:not(.wp-block-embed__wrapper)>.tainacan-content-embed iframe {
max-width: 100%; max-width: 100%;
height: auto;
} }
.tainacan-embed-container:not(.tainacan-embed-without-iframe) { :not(.wp-block-embed__wrapper)>.tainacan-content-embed .tainacan-content-embed__wrapper {
padding-bottom: 56.25%; position: relative;
padding-top: 30px;
width: 100%;
margin: auto;
} }
.tainacan-embed-container .twitter-tweet {
margin: 0 auto; /* Add responsiveness to embeds with aspect ratios. */
:not(.wp-block-embed__wrapper)>.tainacan-has-aspect-ratio .tainacan-content-embed__wrapper::before {
content: "";
display: block;
padding-top: 50%; /* Default to 2:1 aspect ratio. */
} }
.tainacan-embed-container iframe.wp-embedded-content { :not(.wp-block-embed__wrapper)>.tainacan-has-aspect-ratio iframe {
display: flex !important; position: absolute;
align-items: center; top: 0;
justify-content: center; right: 0;
margin: auto !important; bottom: 0;
width: auto !important; left: 0;
top: 50%; height: 100%;
bottom: 50%; width: 100%;
} }
@media screen and (max-width: 1024px) { :not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-21-9 .tainacan-content-embed__wrapper::before {
.tainacan-embed-container iframe.wp-embedded-content { padding-top: 42.85%; /* 9 / 21 * 100 */
position: relative;
}
} }
.tainacan-embed-container #tainacan-attachment-iframe { /* PDF */ :not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-18-9 .tainacan-content-embed__wrapper::before {
width: 100%; padding-top: 50%; /* 9 / 18 * 100 */
} }
.tainacan-embed-container iframe, :not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-16-9 .tainacan-content-embed__wrapper::before {
.tainacan-embed-container object, padding-top: 56.25%; /* 9 / 16 * 100 */
.tainacan-embed-container embed {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
} }
:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-4-3 .tainacan-content-embed__wrapper::before {
padding-top: 75%; /* 3 / 4 * 100 */
}
:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-1-1 .tainacan-content-embed__wrapper::before {
padding-top: 100%; /* 1 / 1 * 100 */
}
:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-9-16 .tainacan-content-embed__wrapper::before {
padding-top: 177.77%; /* 16 / 9 * 100 */
}
:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-3-4 .tainacan-content-embed__wrapper::before {
padding-top: 133.33%; /* 4 / 3 * 100 */
}
:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-1-2 .tainacan-content-embed__wrapper::before {
padding-top: 200%; /* 2 / 1 * 100 */
}

View File

@ -158,6 +158,10 @@
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item label, .wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item label,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-radio-control__option label { .wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-radio-control__option label {
max-width: 80%; } } max-width: 80%; } }
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option .components-radio-control__input,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-radio-control__option .components-radio-control__input {
min-width: 20px;
min-height: 20px; }
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option .components-radio-control__input::before, .wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option .components-radio-control__input::before,
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-radio-control__option .components-radio-control__input::before { .wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-radio-control__option .components-radio-control__input::before {
border-width: 0px; } border-width: 0px; }

View File

@ -1,6 +1,6 @@
{ {
"version": 3, "version": 3,
"mappings": "AAIA,KAAM;EACF,sBAAsB,CAAC,QAAU;EACjC,sBAAsB,CAAC,QAAU;EACjC,sBAAsB,CAAC,QAAU;EACjC,sBAAsB,CAAC,QAAU;EACjC,sBAAsB,CAAC,QAAU;EACjC,sBAAsB,CAAC,QAAU;EACjC,wBAAwB,CAAC,QAAY;;AAIzC,kDAAmD;EAC/C,WAAW,EAAE,iBAAiB;EAC9B,aAAa,EAAE,YAAY;EAC3B,UAAU,EAAE,oCAAmC;EAE/C,iFAA+B;IAC3B,aAAa,EAAE,CAAC;EAEpB,oFAAkC;IAC9B,OAAO,EAAE,IAAI;IACb,cAAc,EAAE,GAAG;IACnB,eAAe,EAAE,MAAM;IACvB,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,GAAG;IACd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,CAAC;IAEV,sFAAE;MACE,SAAS,EAAE,cAAc;MACzB,MAAM,EAAE,IAAI;MACZ,K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pB;yJAA2E;MACvE,YAAY,EAAE,GAAG;EAGzB,gDAAwB;IACpB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,QAAQ;IACrB,eAAe,EAAE,MAAM;IAEvB,kDAAE;MACE,KAAK,EAAE,oCAAmC;MAC1C,YAAY,EAAE,IAAI;MAClB,UAAU,EAAE,GAAG;EAGvB,2CAAmB;IACf,UAAU,EAAE,iBAAiB;IAC7B,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,QAAQ;IACrB,eAAe,EAAE,aAAa;IAC9B,OAAO,EAAE,gBAAgB;IACzB,MAAM,EAAE,OAAO;IAEf,6CAAE;MACE,OAAO,EAAE,MAAM;MACf,KAAK,EAAE,oCAAmC",
"sources": ["../../views/gutenberg-blocks/gutenberg-blocks-style.scss","../../views/gutenberg-blocks/gutenberg-blocks-variables.scss"], "sources": ["../../views/gutenberg-blocks/gutenberg-blocks-style.scss","../../views/gutenberg-blocks/gutenberg-blocks-variables.scss"],
"names": [], "names": [],
"file": "tainacan-gutenberg-block-common-styles.css" "file": "tainacan-gutenberg-block-common-styles.css"

View File

@ -57,6 +57,16 @@
#tainacan-reports-app .postbox .box-header .box-header__item { #tainacan-reports-app .postbox .box-header .box-header__item {
margin-bottom: 10px; margin-bottom: 10px;
line-height: 2rem; } line-height: 2rem; }
#tainacan-reports-app .empty-postbox-placeholder {
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
min-height: 380px;
flex-direction: column;
opacity: 0.75; }
#tainacan-reports-app .empty-postbox-placeholder p {
color: var(--tainacan-block-gray4, #555758); }
#tainacan-reports-app .graph-mode-switch { #tainacan-reports-app .graph-mode-switch {
display: inline-block; } display: inline-block; }
#tainacan-reports-app .graph-mode-switch button { #tainacan-reports-app .graph-mode-switch button {

View File

@ -1,6 +1,6 @@
{ {
"version": 3, "version": 3,
"mappings": "AAAA,qBAAsB;EAClB,OAAO,EAAE,iBAAiB;EAC1B,MAAM,EAAE,CAAC;EAGT,4CAAuB;IACnB,OAAO,EA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,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",
"sources": ["../../views/reports/tainacan-reports.scss"], "sources": ["../../views/reports/tainacan-reports.scss"],
"names": [], "names": [],
"file": "tainacan-reports.css" "file": "tainacan-reports.css"

View File

@ -7,7 +7,7 @@
url("../fonts/TainacanIcons.woff") format("woff"), url("../fonts/TainacanIcons.woff") format("woff"),
url("../fonts/TainacanIcons.ttf") format("truetype"), url("../fonts/TainacanIcons.ttf") format("truetype"),
url("../fonts/TainacanIcons.svg") format("svg"); url("../fonts/TainacanIcons.svg") format("svg");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }

View File

@ -636,7 +636,7 @@ class REST_Reports_Controller extends REST_Controller {
) m ) m
ON (p.id = m.meta_key) ON (p.id = m.meta_key)
WHERE p.id IN($string_meta_ids) WHERE p.id IN($string_meta_ids)
" ", []
); );
$res = $wpdb->get_results($sql_statement); $res = $wpdb->get_results($sql_statement);
//return ['t' => $res, 's' => $sql_statement]; //return ['t' => $res, 's' => $sql_statement];
@ -649,7 +649,7 @@ class REST_Reports_Controller extends REST_Controller {
"SELECT COUNT(DISTINCT($wpdb->postmeta.meta_value)) "SELECT COUNT(DISTINCT($wpdb->postmeta.meta_value))
FROM $wpdb->postmeta FROM $wpdb->postmeta
WHERE meta_key = '_option_taxonomy_id' WHERE meta_key = '_option_taxonomy_id'
" ", []
); );
$res = intval($wpdb->get_var( $sql_statement )); $res = intval($wpdb->get_var( $sql_statement ));
@ -717,7 +717,7 @@ class REST_Reports_Controller extends REST_Controller {
FROM $wpdb->posts p $collection_from FROM $wpdb->posts p $collection_from
WHERE p.post_type='tainacan-log' AND p.post_date BETWEEN '$start' AND '$end' WHERE p.post_type='tainacan-log' AND p.post_date BETWEEN '$start' AND '$end'
GROUP BY DATE(p.post_date) GROUP BY DATE(p.post_date)
ORDER BY DATE(p.post_date)" ORDER BY DATE(p.post_date)", []
); );
return $wpdb->get_results($sql_statement); return $wpdb->get_results($sql_statement);
} }
@ -735,7 +735,7 @@ class REST_Reports_Controller extends REST_Controller {
FROM $wpdb->posts p $collection_from FROM $wpdb->posts p $collection_from
WHERE p.post_type='tainacan-log' AND p.post_date BETWEEN '$start' AND '$end' WHERE p.post_type='tainacan-log' AND p.post_date BETWEEN '$start' AND '$end'
GROUP BY p.post_author, DATE(p.post_date) GROUP BY p.post_author, DATE(p.post_date)
ORDER BY DATE(p.post_date)" ORDER BY DATE(p.post_date)", []
); );
$data =$wpdb->get_results($sql_statement); $data =$wpdb->get_results($sql_statement);
$arr = array(); $arr = array();
@ -781,7 +781,7 @@ class REST_Reports_Controller extends REST_Controller {
$collection_from $collection_from
WHERE p.post_type='tainacan-log' WHERE p.post_type='tainacan-log'
GROUP BY p.post_author, pm.meta_value GROUP BY p.post_author, pm.meta_value
ORDER BY total DESC" ORDER BY total DESC", []
); );
$results = $wpdb->get_results($sql_statement); $results = $wpdb->get_results($sql_statement);
$response = []; $response = [];

View File

@ -12,6 +12,19 @@ class Embed {
return self::$instance; return self::$instance;
} }
private static $aspect_ratios = array(
// Common video resolutions.
array("ratio" => '2.33', "className" => 'tainacan-embed-aspect-21-9'),
array("ratio" => '2.00', "className" => 'tainacan-embed-aspect-18-9'),
array("ratio" => '1.78', "className" => 'tainacan-embed-aspect-16-9'),
array("ratio" => '1.33', "className" => 'tainacan-embed-aspect-4-3'),
// Vertical video and instagram square video support.
array("ratio" => '1.00', "className" => 'tainacan-embed-aspect-1-1' ),
array("ratio" => '0.75', "className" => 'tainacan-embed-aspect-3-4'),
array("ratio" => '0.56', "className" => 'tainacan-embed-aspect-9-16'),
array("ratio" => '0.50', "className" => 'tainacan-embed-aspect-1-2' )
);
protected function __construct() { protected function __construct() {
@ -24,7 +37,7 @@ class Embed {
/** /**
* Add responsiveness to embeds * Add responsiveness to embeds
*/ */
add_filter('embed_oembed_html', [$this, 'responsive_embed'], 10, 3); add_filter( 'embed_oembed_html', [$this, 'responsive_embed'], 10, 3);
add_action( 'admin_enqueue_scripts', array( &$this, 'add_css' ) ); add_action( 'admin_enqueue_scripts', array( &$this, 'add_css' ) );
add_action( 'wp_enqueue_scripts', array( &$this, 'add_css' ) ); add_action( 'wp_enqueue_scripts', array( &$this, 'add_css' ) );
@ -74,7 +87,7 @@ class Embed {
); );
$args = array_merge($attr, $defaults); $args = array_merge($attr, $defaults);
$dimensions = ''; $dimensions = '';
if ( ! empty( $args['width'] ) && ! empty( $args['height'] ) ) { if ( ! empty( $args['width'] ) && ! empty( $args['height'] ) ) {
$dimensions .= sprintf( "width='%s' ", $args['width'] ); $dimensions .= sprintf( "width='%s' ", $args['width'] );
@ -109,7 +122,6 @@ class Embed {
} }
/** /**
* Responsiveness * Responsiveness
*/ */
@ -117,6 +129,69 @@ class Embed {
global $TAINACAN_BASE_URL; global $TAINACAN_BASE_URL;
wp_enqueue_style( 'tainacan-embeds', $TAINACAN_BASE_URL . '/assets/css/tainacan-embeds.css', [], TAINACAN_VERSION ); wp_enqueue_style( 'tainacan-embeds', $TAINACAN_BASE_URL . '/assets/css/tainacan-embeds.css', [], TAINACAN_VERSION );
} }
/**
* Get responsive class based on aspect ratio
* This code is heavily inspired by Gutenberg plugin's "getClassNames" function.
* Check their source code for more details: /packages/block-library/src/embed/util.js
*
* @param {string} html The preview HTML that possibly contains an iframe with width and height set.
* @param {string} existingClassNames Any existing class names.
* @return {string} Deduped class names.
*/
public function add_responsive_wrapper( $html, $existingClassNames = '' ) {
$height = false;
$width = false;
$dom = new \DOMDocument();
$dom->loadHTML($html);
// If we have a fixed aspect iframe, and it's a responsive embed content.
if ($dom) {
$externalContentElement = $dom->getElementsByTagName('iframe');
if (!$externalContentElement)
$externalContentElement = $dom->getElementsByTagName('embed');
if (!$externalContentElement)
$externalContentElement = $dom->getElementsByTagName('object');
if ($externalContentElement) {
foreach($externalContentElement as $element) {
foreach($element->attributes as $attribute) {
if ($attribute->nodeName == 'width')
$width = $attribute->nodeValue;
if ($attribute->nodeName == 'height')
$height = $attribute->nodeValue;
if ($attribute->nodeName == 'class' && $attribute->nodeValue == 'wp-embedded-content') {
$height = false;
$width = false;
break;
}
}
}
}
if ( $height && $width ) {
$aspect_ratio = number_format(( $width / $height ), 2, '.', "");
// Given the actual aspect ratio, find the widest ratio to support it.
for ($ratioIndex = 0; $ratioIndex < count(self::$aspect_ratios); $ratioIndex++) {
$potentialRatio = self::$aspect_ratios[ $ratioIndex ];
if ( $aspect_ratio >= $potentialRatio['ratio'] ) {
$class = $potentialRatio['className'] . ' tainacan-content-embed tainacan-has-aspect-ratio';
return '<figure class="' . $class . '"><div class="tainacan-content-embed__wrapper">' . $html . '</div></figure>';
}
}
}
}
return $html;
}
/** /**
* Adds a responsive embed wrapper around oEmbed content * Adds a responsive embed wrapper around oEmbed content
* @param string $html The oEmbed markup * @param string $html The oEmbed markup
@ -126,12 +201,9 @@ class Embed {
*/ */
function responsive_embed($html, $url, $attr) { function responsive_embed($html, $url, $attr) {
$class = 'tainacan-embed-container'; $element = $this->add_responsive_wrapper($html);
if ( !preg_match('/(?:<iframe[^>]*)(?:(?:\/>)|(?:>.*?<\/iframe>))/i', $html ) && !preg_match('/(?:<object[^>]*)(?:(?:\/>)|(?:>.*?<\/object>))/i', $html) && !preg_match('/(?:<embed[^>]*)(?:(?:\/>)|(?:>.*?<\/embed>))/i', $html ) ) return $element;
$class .= ' tainacan-embed-without-iframe';
return $html !== '' ? '<div class="' . $class . '">'.$html.'</div>' : '';
} }
} }

View File

@ -103,7 +103,6 @@ class Media {
* @return string the file path * @return string the file path
*/ */
public function save_remote_file($url) { public function save_remote_file($url) {
set_time_limit(0); set_time_limit(0);
$filename = tempnam(sys_get_temp_dir(), basename($url)); $filename = tempnam(sys_get_temp_dir(), basename($url));
@ -134,7 +133,7 @@ class Media {
# Assign a callback function to the CURL Write-Function # Assign a callback function to the CURL Write-Function
curl_setopt($ch, CURLOPT_WRITEFUNCTION, $callback); curl_setopt($ch, CURLOPT_WRITEFUNCTION, $callback);
# Exceute the download - note we DO NOT put the result into a variable! # Execute the download - note we DO NOT put the result into a variable!
curl_exec($ch); curl_exec($ch);
if (curl_errno($ch)) { if (curl_errno($ch)) {
$error_msg = curl_error($ch); $error_msg = curl_error($ch);

View File

@ -38,7 +38,7 @@ class Generic_Process_Handler {
$data = $process_object->_to_Array(true); $data = $process_object->_to_Array(true);
$process = $this->get_generic_process_by_object($process_object); $process = $this->get_generic_process_by_object($process_object);
$process_name = sprintf( __('%s process', 'tainacan'), $process['name'] ); $process_name = sprintf( __('%s processing', 'tainacan'), $process['name'] );
$bg_process = $this->bg_process->data($data)->set_name($process_name)->save(); $bg_process = $this->bg_process->data($data)->set_name($process_name)->save();
if ( is_wp_error($bg_process->dispatch()) ) { if ( is_wp_error($bg_process->dispatch()) ) {

View File

@ -36,13 +36,15 @@ class CSV extends Importer {
} }
$columns = []; $columns = [];
if ($rawColumns) {
if( $rawColumns ) {
foreach( $rawColumns as $index => $rawColumn ) { foreach( $rawColumns as $index => $rawColumn ) {
if( strpos($rawColumn,'special_') === 0 ) { if( strpos($rawColumn,'special_') === 0 ) {
if( $rawColumn === 'special_document' ) { if( $rawColumn === 'special_document' ) {
$this->set_option('document_index', $index); $this->set_option('document_index', $index);
} else if( $rawColumn === 'special_attachments' || } else if ($rawColumn === 'special_document|REPLACE') {
$this->set_option('document_import_mode', 'replace');
$this->set_option('document_index', $index);
} else if( $rawColumn === 'special_attachments' ||
$rawColumn === 'special_attachments|APPEND' || $rawColumn === 'special_attachments|APPEND' ||
$rawColumn === 'special_attachments|REPLACE' ) { $rawColumn === 'special_attachments|REPLACE' ) {
$this->set_option('attachment_index', $index); $this->set_option('attachment_index', $index);
@ -514,7 +516,12 @@ class CSV extends Importer {
} }
} else if( strpos($column_value,'file:') === 0 ) { } else if( strpos($column_value,'file:') === 0 ) {
$correct_value = trim(substr($column_value, 5)); $correct_value = trim(substr($column_value, 5));
if( isset(parse_url($correct_value)['scheme'] ) ) { if (isset(parse_url($correct_value)['scheme'] )) {
if ($this->get_option('document_import_mode') === 'replace' ) {
$this->add_log('Item Document will be replaced ... ');
$this->delete_previous_document_imgs($item_inserted->get_id(), $item_inserted->get_document());
$this->add_log('Deleted previous Item Documents ... ');
}
$id = $TainacanMedia->insert_attachment_from_url($correct_value, $item_inserted->get_id()); $id = $TainacanMedia->insert_attachment_from_url($correct_value, $item_inserted->get_id());
if(!$id){ if(!$id){
@ -571,15 +578,7 @@ class CSV extends Importer {
break; break;
case 'REPLACE': case 'REPLACE':
$this->add_log('Attachment REPLACE file '); $this->add_log('Attachment REPLACE file ');
$args['post_parent'] = $item_inserted->get_id(); $this->delete_previous_document_imgs($item_inserted->get_id(), $item_inserted->get_document());
$args['post_type'] = 'attachment';
$args['post_status'] = 'any';
$args['post__not_in'] = [$item_inserted->get_document()];
$posts_query = new \WP_Query();
$query_result = $posts_query->query( $args );
foreach ( $query_result as $post ) {
wp_delete_attachment( $post->ID, true );
}
break; break;
} }
@ -624,10 +623,10 @@ class CSV extends Importer {
$line = substr($line, $cut_start); $line = substr($line, $cut_start);
} }
$end = substr($line, ( strlen($line) - strlen($this->get_option('enclosure')) ) , strlen($this->get_option('enclosure'))); $end = substr($line, ( strlen($line) - strlen($this->get_option('enclosure')) ) , strlen($this->get_option('enclosure')));
if( $this->get_option('enclosure') === $end ) { if( $this->get_option('enclosure') === $end ) {
$line = substr($line, 0, ( strlen($line) - strlen($this->get_option('enclosure')) ) ); $line = substr($line, 0, ( strlen($line) - strlen($this->get_option('enclosure')) ) );
} }
$delimiter = $this->get_option('enclosure').$this->get_option('delimiter').$this->get_option('enclosure'); $delimiter = $this->get_option('enclosure').$this->get_option('delimiter').$this->get_option('enclosure');
@ -681,7 +680,7 @@ class CSV extends Importer {
* its value or values * its value or values
* @param integer $collection_index The index in the $this->collections array of the collection the item is being inserted into * @param integer $collection_index The index in the $this->collections array of the collection the item is being inserted into
* *
* @return Tainacan\Entities\Item Item inserted * @return bool|Tainacan\Entities\Item Item inserted
*/ */
public function insert( $processed_item, $collection_index ) { public function insert( $processed_item, $collection_index ) {
remove_action( 'post_updated', 'wp_save_post_revision' ); remove_action( 'post_updated', 'wp_save_post_revision' );
@ -916,10 +915,9 @@ class CSV extends Importer {
* @param $metadatum the metadata * @param $metadatum the metadata
* @param $values the categories names * @param $values the categories names
* *
* @return array empty with no category or array with IDs * @return bool|array empty with no category or array with IDs
*/ */
private function insert_hierarchy( $metadatum, $values ){ private function insert_hierarchy( $metadatum, $values ) {
if (empty($values)) { if (empty($values)) {
return false; return false;
} }
@ -982,14 +980,13 @@ class CSV extends Importer {
/** /**
* @param $collection_id * @param $collection_id
* *
* @return array/bool false if has no mapping or associated array with metadata id and header * @return array|bool false if has no mapping or associated array with metadata id and header
*/ */
public function get_mapping( $collection_id ){ public function get_mapping( $collection_id ){
$mapping = get_post_meta( $collection_id, 'metadata_mapping', true ); $mapping = get_post_meta( $collection_id, 'metadata_mapping', true );
return ( $mapping ) ? $mapping : false; return $mapping ?: false;
} }
/** /**
* @inheritdoc * @inheritdoc
* *
@ -1081,4 +1078,19 @@ class CSV extends Importer {
return $message; return $message;
} }
private function delete_previous_document_imgs($item_id, $item_document) {
$previous_imgs = [
'post_parent' => $item_id,
'post_type' => 'attachment',
'post_status' => 'any',
'post__not_in' => [$item_document]
];
$posts_query = new \WP_Query();
$attachs = $posts_query->query($previous_imgs);
foreach ($attachs as $att) {
$this->add_log( "Deleting attachment [". $att->ID . "] " . $att->post_title);
wp_delete_attachment($att->ID, true);
}
}
} }

View File

@ -59,7 +59,7 @@ abstract class Importer {
private $options = []; private $options = [];
/** /**
* Stores the default options for the importer options * Stores default options for importer options
* @var array * @var array
*/ */
protected $default_options = []; protected $default_options = [];
@ -114,7 +114,7 @@ abstract class Importer {
private $error_log = []; private $error_log = [];
/** /**
* Wether to abort importer execution. * Whether to abort importer execution.
* @var bool * @var bool
*/ */
private $abort = false; private $abort = false;
@ -137,7 +137,6 @@ abstract class Importer {
]; ];
public function __construct($attributess = array()) { public function __construct($attributess = array()) {
$this->id = uniqid(); $this->id = uniqid();
$author = get_current_user_id(); $author = get_current_user_id();
@ -153,8 +152,6 @@ abstract class Importer {
} }
} }
} }
} }
public function _to_Array($short = false) { public function _to_Array($short = false) {
@ -193,8 +190,7 @@ abstract class Importer {
* @param $url string * @param $url string
* @return bool * @return bool
*/ */
public function set_url($url) public function set_url($url) {
{
if(!empty($url) && !is_array($url)) if(!empty($url) && !is_array($url))
{ {
$this->url = rtrim(trim($url), "/"); $this->url = rtrim(trim($url), "/");
@ -207,8 +203,7 @@ abstract class Importer {
/** /**
* @return string or bool * @return string or bool
*/ */
public function get_url() public function get_url() {
{
if(!empty($this->url)) if(!empty($this->url))
{ {
return $this->url; return $this->url;
@ -293,7 +288,6 @@ abstract class Importer {
$this->default_options = $options; $this->default_options = $options;
} }
public function set_steps($steps) { public function set_steps($steps) {
$this->steps = $steps; $this->steps = $steps;
} }
@ -302,7 +296,6 @@ abstract class Importer {
return $this->steps; return $this->steps;
} }
private function get_transients() { private function get_transients() {
return $this->transients; return $this->transients;
} }
@ -559,7 +552,6 @@ abstract class Importer {
$step = $steps[$current_step]; $step = $steps[$current_step];
if ($step['callback'] == 'process_collections') { if ($step['callback'] == 'process_collections') {
$totalItems = 0; $totalItems = 0;
$currentItem = $this->get_current_collection_item(); $currentItem = $this->get_current_collection_item();
$current_collection = $this->get_current_collection(); $current_collection = $this->get_current_collection();
@ -577,18 +569,12 @@ abstract class Importer {
if ($totalItems > 0) { if ($totalItems > 0) {
$value = round( ($currentItem/$totalItems) * 100 ); $value = round( ($currentItem/$totalItems) * 100 );
} }
} else { } else {
if ( isset($step['total']) && is_numeric($step['total']) && $step['total'] > 0 ) { if ( isset($step['total']) && is_numeric($step['total']) && $step['total'] > 0 ) {
$current = $this->get_in_step_count(); $current = $this->get_in_step_count();
$value = round( ($current/$step['total']) * 100 ); $value = round( ($current/$step['total']) * 100 );
} }
} }
} }
return $value; return $value;
} }

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,6 @@ use \Tainacan\Entities;
class Old_Tainacan extends Importer{ class Old_Tainacan extends Importer{
protected $steps = [ protected $steps = [
[ [
'name' => 'Create Taxonomies', 'name' => 'Create Taxonomies',
'progress_label' => 'Creating taxonomies', 'progress_label' => 'Creating taxonomies',
@ -33,7 +32,6 @@ class Old_Tainacan extends Importer{
'callback' => 'link_relationships', 'callback' => 'link_relationships',
'total' => 5 'total' => 5
] ]
]; ];
protected $tainacan_api_address, $wordpress_api_address, $actual_collection; protected $tainacan_api_address, $wordpress_api_address, $actual_collection;
@ -64,8 +62,7 @@ class Old_Tainacan extends Importer{
* *
*/ */
public function create_taxonomies() { public function create_taxonomies() {
if (!$this->get_url()) {
if(!$this->get_url()){
$this->add_error_log('Site url not found'); $this->add_error_log('Site url not found');
$this->abort(); $this->abort();
return false; return false;
@ -74,57 +71,49 @@ class Old_Tainacan extends Importer{
$this->add_log('Creating taxonomies'); $this->add_log('Creating taxonomies');
foreach ($this->get_taxonomies() as $taxonomy) { foreach ($this->get_taxonomies() as $taxonomy) {
$tax = new Entities\Taxonomy();
$tax->set_name( $taxonomy->name );
$tax->set_description( $taxonomy->description );
$tax->set_allow_insert('yes');
$tax->set_status('publish');
$tax = new Entities\Taxonomy(); if ($tax->validate()) {
$tax->set_name( $taxonomy->name ); $tax = $this->tax_repo->insert($tax);
$tax->set_description( $taxonomy->description );
$tax->set_allow_insert('yes');
$tax->set_status('publish');
if ($tax->validate()) {
$tax = $this->tax_repo->insert($tax);
$this->add_log('Taxonomy ' . $tax->get_name() . ' created, id from Old'. $taxonomy->term_id ); $this->add_log('Taxonomy ' . $tax->get_name() . ' created, id from Old'. $taxonomy->term_id );
$this->add_transient('tax_' . $taxonomy->term_id . '_id', $tax->get_id());
$this->add_transient('tax_' . $taxonomy->term_id . '_name', $tax->get_name());
$this->add_transient('tax_' . $taxonomy->term_id . '_id', $tax->get_id()); if (isset($taxonomy->children) && $tax) {
$this->add_transient('tax_' . $taxonomy->term_id . '_name', $tax->get_name()); $this->add_all_terms($tax, $taxonomy->children);
}
if (isset($taxonomy->children) && $tax) {
$this->add_all_terms($tax, $taxonomy->children);
}
} else { } else {
$this->add_log('Error creating taxonomy ' . $taxonomy->name ); $this->add_log('Error creating taxonomy ' . $taxonomy->name );
$this->add_log($tax->get_errors()); $this->add_log($tax->get_errors());
}
} }
}
return false; return false;
} }
/** /**
* create the repository metadata which each collection inherits by default * create the repository metadata which each collection inherits by default
* *
*/ */
public function create_repo_metadata(){ public function create_repo_metadata() {
$this->add_log('Creating repository metadata');
$this->add_log('Creating repository metadata');
foreach ($this->get_repo_metadata() as $metadata) { foreach ($this->get_repo_metadata() as $metadata) {
if (isset($metadata->slug) && strpos($metadata->slug, 'socialdb_property_fixed') === false) {
$metadatum_id = $this->create_metadata( $metadata );
} elseif ( strpos($metadata->slug, 'socialdb_property_fixed_tags') !== false ) {
$metadatum_id = $this->create_metadata( $metadata );
}
}
if (isset($metadata->slug) && strpos($metadata->slug, 'socialdb_property_fixed') === false) { $this->add_log('FInished repository metadata');
$metadatum_id = $this->create_metadata( $metadata ); return false;
} elseif ( strpos($metadata->slug, 'socialdb_property_fixed_tags') !== false ){ }
$metadatum_id = $this->create_metadata( $metadata );
}
}
$this->add_log('FInished repository metadata');
return false;
}
/** /**
* create all collections and its metadata * create all collections and its metadata

View File

@ -316,11 +316,9 @@ class Test_Importer extends Importer {
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<?php <?php
return ob_get_clean(); return ob_get_clean();
} }
@ -334,7 +332,6 @@ class Test_Importer extends Importer {
if ($tax1->validate()) { if ($tax1->validate()) {
$tax1 = $this->tax_repo->insert($tax1); $tax1 = $this->tax_repo->insert($tax1);
} else { } else {
/** /**
* In these set up steps, if we have an error adding * In these set up steps, if we have an error adding
* a taxonomy, collection or metadatum, there is no point * a taxonomy, collection or metadatum, there is no point
@ -345,14 +342,12 @@ class Test_Importer extends Importer {
$this->add_error_log('Error creating taxonomy Color'); $this->add_error_log('Error creating taxonomy Color');
$this->add_error_log($tax1->get_errors()); $this->add_error_log($tax1->get_errors());
$this->abort(); $this->abort();
return false; return false;
} }
$this->add_transient('tax_1_id', $tax1->get_id()); $this->add_transient('tax_1_id', $tax1->get_id());
return false; return false;
} }
public function create_collections() { public function create_collections() {
@ -366,11 +361,9 @@ class Test_Importer extends Importer {
$this->add_error_log('Error creating Collection 1'); $this->add_error_log('Error creating Collection 1');
$this->add_error_log($col1->get_errors()); $this->add_error_log($col1->get_errors());
$this->abort(); $this->abort();
return false; return false;
} }
$col1_map = []; $col1_map = [];
// metadata // metadata
@ -696,8 +689,7 @@ class Test_Importer extends Importer {
* @param $collection * @param $collection
* *
*/ */
private function create_metadata( $args, $collection ){ private function create_metadata( $args, $collection ) {
$metadatum = new Entities\Metadatum(); $metadatum = new Entities\Metadatum();
$metadatum->set_name($args['name']); $metadatum->set_name($args['name']);
$metadatum->set_collection($collection); $metadatum->set_collection($collection);
@ -758,7 +750,6 @@ class Test_Importer extends Importer {
return $array; return $array;
} }
public function get_col2_item($index) { public function get_col2_item($index) {
return [ return [
'field1' => 'Collection 2 item ' . $index, 'field1' => 'Collection 2 item ' . $index,
@ -766,7 +757,5 @@ class Test_Importer extends Importer {
'field3' => 'Collection 2 whatever ' . $index, 'field3' => 'Collection 2 whatever ' . $index,
]; ];
} }
} }

View File

@ -40,7 +40,7 @@ class Collections extends Repository {
'title' => __( 'Status', 'tainacan' ), 'title' => __( 'Status', 'tainacan' ),
'type' => 'string', 'type' => 'string',
'default' => '', 'default' => '',
'description' => __( 'The current situation of the post', 'tainacan' ) 'description' => __( 'The current situation of the collection. It also affects the visibility of the collection items, as public items from private collections do not appear in the site.', 'tainacan' )
], ],
'author_id' => [ 'author_id' => [
'map' => 'post_author', 'map' => 'post_author',
@ -169,7 +169,7 @@ class Collections extends Repository {
'map' => 'meta', 'map' => 'meta',
'title' => __( 'Header Image', 'tainacan' ), 'title' => __( 'Header Image', 'tainacan' ),
'type' => 'string', 'type' => 'string',
'description' => __( 'The image to be used in collection header', 'tainacan' ), 'description' => __( 'The image to be used in collection header, if the theme has one.', 'tainacan' ),
'on_error' => __( 'Invalid image', 'tainacan' ), 'on_error' => __( 'Invalid image', 'tainacan' ),
//'validation' => v::numeric(), //'validation' => v::numeric(),
'default' => '' 'default' => ''
@ -189,10 +189,10 @@ class Collections extends Repository {
], ],
'allow_comments' => [ 'allow_comments' => [
'map' => 'meta', 'map' => 'meta',
'title' => __( 'Allow Items Comments', 'tainacan' ), 'title' => __( 'Allow enabling comments on items', 'tainacan' ),
'type' => 'string', 'type' => 'string',
'description' => __( 'Collection items comment status: "open" means comments are allowed, "closed" means comments are not allowed.', 'tainacan' ), 'description' => __( 'If this option is enabled, items of this collection can be set to enable a comments section on their page. "open" means comments are allowed, "closed" means comments are not allowed.', 'tainacan' ),
'default' => 'open', 'default' => 'closed',
'validation' => v::optional(v::stringType()->in( [ 'open', 'closed' ] )), 'validation' => v::optional(v::stringType()->in( [ 'open', 'closed' ] )),
], ],
'submission_anonymous_user' => [ 'submission_anonymous_user' => [

View File

@ -403,7 +403,7 @@ class Item_Metadata extends Repository {
$metadatum = $item_metadata->get_metadatum(); $metadatum = $item_metadata->get_metadatum();
if ( $metadatum->get_metadata_type() == 'Tainacan\Metadata_Types\User' ) { if ( $metadatum->get_metadata_type() == 'Tainacan\Metadata_Types\User' ) {
$options = $metadatum->get_metadata_type_options(); $options = $metadatum->get_metadata_type_options();
if ( isset($options['default_author']) && $options['default_author'] = 'yes') { if ( isset($options['default_author']) && $options['default_author'] == 'yes') {
$value = $metadatum->is_multiple() ? [strval(get_current_user_id())] : strval(get_current_user_id()); $value = $metadatum->is_multiple() ? [strval(get_current_user_id())] : strval(get_current_user_id());
$item_metadata->set_value($value); $item_metadata->set_value($value);
if ( $item_metadata->validate() ) { if ( $item_metadata->validate() ) {

View File

@ -46,7 +46,7 @@ class Items extends Repository {
'title' => __( 'Status', 'tainacan' ), 'title' => __( 'Status', 'tainacan' ),
'type' => 'string', 'type' => 'string',
'default' => 'draft', 'default' => 'draft',
'description' => __( 'The posts status', 'tainacan' ) 'description' => __( 'The current situation of the item. Notice that the item visibility also depends on the collection status.', 'tainacan' )
], ],
'description' => [ 'description' => [
'map' => 'post_content', 'map' => 'post_content',

View File

@ -683,6 +683,8 @@ class Theme_Helper {
$excerpt = strip_tags(tainacan_get_the_collection_description()); $excerpt = strip_tags(tainacan_get_the_collection_description());
} elseif ( is_post_type_archive('tainacan-collection') ) { } elseif ( is_post_type_archive('tainacan-collection') ) {
$title = __('Collections', 'tainacan'); $title = __('Collections', 'tainacan');
} else {
$title = get_the_archive_title();
} }
} elseif ( is_singular() ) { } elseif ( is_singular() ) {
global $post; global $post;

View File

@ -4,13 +4,13 @@ Plugin Name: Tainacan
Plugin URI: https://tainacan.org/ 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
Version: 0.17.4 Version: 0.18RC
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.17.4'; const TAINACAN_VERSION = '0.18RC';
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__);

View File

@ -20,15 +20,16 @@
@click="isMenuCompressed = !isMenuCompressed"> @click="isMenuCompressed = !isMenuCompressed">
<span <span
v-tooltip="{ v-tooltip="{
content: $i18n.get('label_shrink_menu'), content: isMenuCompressed ? $i18n.get('label_expand_menu') : $i18n.get('label_shrink_menu'),
autoHide: true, autoHide: true,
placement: 'auto-end', placement: 'auto-end',
classes: ['tooltip', 'repository-tooltip'] classes: ['tooltip', 'repository-tooltip']
}" }"
class="icon"> class="icon">
<i <i
:class="{ 'tainacan-icon-arrowleft' : !isMenuCompressed, 'tainacan-icon-arrowright' : isMenuCompressed }" :class="{ 'tainacan-icon-arrowleft' : !isMenuCompressed, 'tainacan-icon-arrowright' : isMenuCompressed }"
class="tainacan-icon tainacan-icon-1-25em"/> class="tainacan-icon tainacan-icon-1-25em"
/>
</span> </span>
</button> </button>
<tainacan-header /> <tainacan-header />
@ -99,7 +100,8 @@
hideCancel: true hideCancel: true
}, },
ariaRole: 'alertdialog', ariaRole: 'alertdialog',
ariaModal: true ariaModal: true,
customClass: 'tainacan-modal'
}); });
} }
}); });

View File

@ -204,7 +204,7 @@
:label="$i18n.getHelperTitle('collections', 'hide_items_thumbnail_on_lists')"> :label="$i18n.getHelperTitle('collections', 'hide_items_thumbnail_on_lists')">
&nbsp; &nbsp;
<b-switch <b-switch
id="tainacan-checkbox-comment-status" id="tainacan-checkbox-hide-items-thumbnail-on-lists"
size="is-small" size="is-small"
true-value="yes" true-value="yes"
false-value="no" false-value="no"
@ -453,7 +453,7 @@
<!-- Comment Status ------------------------ --> <!-- Comment Status ------------------------ -->
<b-field <b-field
:addons="false" :addons="false"
:label="$i18n.get('label_allow_comments')"> :label="$i18n.getHelperTitle('collections', 'allow_comments')">
&nbsp; &nbsp;
<b-switch <b-switch
id="tainacan-checkbox-comment-status" id="tainacan-checkbox-comment-status"
@ -654,7 +654,7 @@ export default {
files:[], files:[],
enabled_view_modes: [], enabled_view_modes: [],
default_view_mode: [], default_view_mode: [],
allow_comments: '', allow_comments: 'closed',
allows_submission: 'no', allows_submission: 'no',
submission_default_status: 'draft', submission_default_status: 'draft',
submission_anonymous_user: 'no', submission_anonymous_user: 'no',

View File

@ -500,7 +500,7 @@ export default {
margin: 12px 0 6px 0; margin: 12px 0 6px 0;
} }
.modal .animation-content { .tainacan-modal .animation-content {
width: 100%; width: 100%;
z-index: 99999; z-index: 99999;

View File

@ -37,7 +37,6 @@
<p>{{ $i18n.get('info_metadata_mapping_helper') }}</p> <p>{{ $i18n.get('info_metadata_mapping_helper') }}</p>
<br> <br>
<b-loading <b-loading
:is-full-page="false" :is-full-page="false"
:active.sync="isLoadingSourceInfo" :active.sync="isLoadingSourceInfo"
@ -183,7 +182,8 @@
:active.sync="isNewMetadatumModalActive" :active.sync="isNewMetadatumModalActive"
trap-focus trap-focus
aria-modal aria-modal
aria-role="dialog"> aria-role="dialog"
custom-class="tainacan-modal">
<div <div
autofocus="true" autofocus="true"
tabindex="-1" tabindex="-1"
@ -246,7 +246,17 @@
</div> </div>
</b-modal> </b-modal>
<a <a
v-if="collectionId != null && collectionId != undefined && importerSourceInfo.source_metadata.length > 0 && collection && collection.current_user_can_edit_metadata" v-if="importerSourceInfo.source_metadata && importerSourceInfo.source_metadata.length > 0"
style="margin-left: 2rem; font-size: 0.875em;"
class="is-inline is-pulled-right add-link has-text-secondary"
@click="createAllMetadata()">
<span class="icon">
<i class="tainacan-icon tainacan-icon-approvedcircle"/>
</span>
{{ $i18n.get('label_set_all_create_metadada') }}
</a>
<a
v-if="collectionId != null && collectionId != undefined && importerSourceInfo.source_metadata &&importerSourceInfo.source_metadata.length > 0 && collection && collection.current_user_can_edit_metadata"
style="font-size: 0.875em;" style="font-size: 0.875em;"
class="is-inline is-pulled-right add-link has-text-secondary" class="is-inline is-pulled-right add-link has-text-secondary"
@click="createNewMetadatum()"> @click="createNewMetadatum()">
@ -293,7 +303,8 @@
autofocus autofocus
role="dialog" role="dialog"
tabindex="-1" tabindex="-1"
aria-modal> aria-modal
custom-class="tainacan-modal">
<form class="tainacan-modal-content tainacan-form"> <form class="tainacan-modal-content tainacan-form">
<div class="tainacan-modal-title"> <div class="tainacan-modal-title">
<h2>{{ $i18n.get('instruction_select_title_mapping') }}</h2> <h2>{{ $i18n.get('instruction_select_title_mapping') }}</h2>
@ -404,7 +415,7 @@ export default {
metadataSearchCancel: undefined, metadataSearchCancel: undefined,
showTitlePromptModal: false, showTitlePromptModal: false,
selectedTitle: undefined, selectedTitle: undefined,
formErrorMessage: '' formErrorMessage: '',
} }
}, },
computed: { computed: {
@ -785,6 +796,12 @@ export default {
this.showTitlePromptModal = false; this.showTitlePromptModal = false;
this.onRunImporter(); this.onRunImporter();
},
createAllMetadata() {
this.mappedCollection['mapping'] = {};
this.importerSourceInfo.source_metadata.forEach((metadatum, index) => {
this.mappedCollection['mapping']['create_metadata'+ index] = metadatum;
});
} }
} }
} }
@ -939,7 +956,7 @@ export default {
} }
} }
.modal .animation-content { .tainacan-modal .animation-content {
width: 100%; width: 100%;
z-index: 99999; z-index: 99999;

View File

@ -330,7 +330,8 @@ export default {
collectionId: this.collectionId collectionId: this.collectionId
}, },
width: 'calc(100% - (2 * var(--tainacan-one-column)))', width: 'calc(100% - (2 * var(--tainacan-one-column)))',
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
deleteOneItem(itemId, index) { deleteOneItem(itemId, index) {
@ -351,7 +352,8 @@ export default {
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
} }

View File

@ -217,7 +217,8 @@
scroll="keep" scroll="keep"
trap-focus trap-focus
aria-modal aria-modal
aria-role="dialog"> aria-role="dialog"
custom-class="tainacan-modal">
<div class="tainacan-modal-content"> <div class="tainacan-modal-content">
<div class="tainacan-modal-title"> <div class="tainacan-modal-title">
<h2>{{ $i18n.get('instruction_write_text') }}</h2> <h2>{{ $i18n.get('instruction_write_text') }}</h2>
@ -258,7 +259,8 @@
role="dialog" role="dialog"
tabindex="-1" tabindex="-1"
aria-modal aria-modal
aria-role="dialog"> aria-role="dialog"
custom-class="tainacan-modal">
<div class="tainacan-modal-content"> <div class="tainacan-modal-content">
<div class="tainacan-modal-title"> <div class="tainacan-modal-title">
<h2>{{ $i18n.get('instruction_insert_url') }}</h2> <h2>{{ $i18n.get('instruction_insert_url') }}</h2>
@ -314,7 +316,7 @@
class="image"> class="image">
<span <span
class="image-placeholder" class="image-placeholder"
v-if="item.document_type == 'empty'"> v-if="item.document_type == 'empty' && item.document_mimetype == 'empty'">
{{ $i18n.get('label_empty_thumbnail') }} {{ $i18n.get('label_empty_thumbnail') }}
</span> </span>
<img <img
@ -991,7 +993,8 @@ export default {
next(); next();
}, },
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} else { } else {
next() next()
@ -1232,6 +1235,7 @@ export default {
this.updateItemDocument({ item_id: this.itemId, document: this.form.document, document_type: this.form.document_type }) this.updateItemDocument({ item_id: this.itemId, document: this.form.document, document_type: this.form.document_type })
.then(item => { .then(item => {
this.item.document_as_html = item.document_as_html; this.item.document_as_html = item.document_as_html;
this.item.document_mimetype = item.document_mimetype;
this.isLoading = false; this.isLoading = false;
}) })
.catch((errors) => { .catch((errors) => {
@ -1263,6 +1267,7 @@ export default {
this.updateItemDocument({ item_id: this.itemId, document: this.form.document, document_type: this.form.document_type }) this.updateItemDocument({ item_id: this.itemId, document: this.form.document, document_type: this.form.document_type })
.then(item => { .then(item => {
this.item.document_as_html = item.document_as_html; this.item.document_as_html = item.document_as_html;
this.item.document_mimetype = item.document_mimetype;
this.isLoading = false; this.isLoading = false;
let oldThumbnail = this.item.thumbnail; let oldThumbnail = this.item.thumbnail;
@ -1298,6 +1303,7 @@ export default {
document_type: this.form.document_type document_type: this.form.document_type
}) })
.then(() => { .then(() => {
this.item.document_mimetype = 'empty';
this.isLoadingAttachments = true; this.isLoadingAttachments = true;
this.fetchAttachments({ this.fetchAttachments({
page: 1, page: 1,
@ -1359,7 +1365,8 @@ export default {
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
@ -1381,6 +1388,7 @@ export default {
.then((item) => { .then((item) => {
this.isLoading = false; this.isLoading = false;
this.item.document_as_html = item.document_as_html; this.item.document_as_html = item.document_as_html;
this.item.document_mimetype = item.document_mimetype;
let oldThumbnail = this.item.thumbnail; let oldThumbnail = this.item.thumbnail;
if (item.document_type == 'attachment' && oldThumbnail != item.thumbnail ) if (item.document_type == 'attachment' && oldThumbnail != item.thumbnail )
@ -1480,7 +1488,8 @@ export default {
this.$router.push(this.$routerHelper.getCollectionPath(this.form.collectionId)) this.$router.push(this.$routerHelper.getCollectionPath(this.form.collectionId))
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
loadExistingItem() { loadExistingItem() {

View File

@ -299,7 +299,8 @@
next(); next();
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} else if (this.isEditingTerm) { } else if (this.isEditingTerm) {
this.$buefy.modal.open({ this.$buefy.modal.open({
@ -313,7 +314,8 @@
next(); next();
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} else { } else {
next(); next();

View File

@ -181,7 +181,8 @@
this.loadOptions(); this.loadOptions();
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
} }
@ -192,7 +193,7 @@
.view-all-button { .view-all-button {
font-size: 0.75em; font-size: 0.75em !important;
padding: 0.1em 1em; padding: 0.1em 1em;
} }

View File

@ -95,16 +95,20 @@
&:not(:last-child) { &:not(:last-child) {
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 0.75em; padding-bottom: 0.25em;
} }
.collapse-trigger { .collapse-trigger {
margin-left: -7px; margin-left: -7px;
button {
background-color: inherit !important;
color: inherit !important;
}
.icon { .icon {
margin-right: 5px; margin-right: 5px;
} }
.collapse-label { .collapse-label {
display: inline-block; display: inline;
width: 100%; width: 100%;
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -128,6 +132,7 @@
align-items: center; align-items: center;
border: none; border: none;
background-color: transparent; background-color: transparent;
color: var(--tainacan-label-color);
text-align: left; text-align: left;
cursor: pointer; cursor: pointer;
outline: none; outline: none;

View File

@ -314,7 +314,8 @@
} }
}, },
width: 'calc(100% - (4 * var(--tainacan-one-column)))', width: 'calc(100% - (4 * var(--tainacan-one-column)))',
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
prepareOptionsForTaxonomy(items) { prepareOptionsForTaxonomy(items) {
@ -351,7 +352,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.view-all-button { .view-all-button {
font-size: 0.75em; font-size: 0.75em !important;
padding: 0.1em 1em; padding: 0.1em 1em;
} }

View File

@ -183,7 +183,8 @@
approveActivity: (activityId) => this.approveActivity(activityId), approveActivity: (activityId) => this.approveActivity(activityId),
notApproveActivity: (activityId) => this.notApproveActivity(activityId) notApproveActivity: (activityId) => this.notApproveActivity(activityId)
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
} }

View File

@ -104,7 +104,8 @@ export default {
message: this.$i18n.get('info_warning_terms_not_saved'), message: this.$i18n.get('info_warning_terms_not_saved'),
onConfirm: () => { this.removeTerm(); }, onConfirm: () => { this.removeTerm(); },
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} else { } else {
this.removeTerm(); this.removeTerm();
@ -125,7 +126,8 @@ export default {
this.$eventBusTermsList.onDeleteBasicTermItem(this.term); this.$eventBusTermsList.onDeleteBasicTermItem(this.term);
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
eventOnEditTerm() { eventOnEditTerm() {

View File

@ -143,7 +143,8 @@
capability: this.capabilities[capabilityKey], capability: this.capabilities[capabilityKey],
capabilityKey: capabilityKey capabilityKey: capabilityKey
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
getCompleteRolesList(roles, rolesInherited) { getCompleteRolesList(roles, rolesInherited) {

View File

@ -392,7 +392,8 @@ export default {
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
this.clearContextMenu(); this.clearContextMenu();
}, },
@ -432,7 +433,8 @@ export default {
this.allCollectionsOnPageSelected = false; this.allCollectionsOnPageSelected = false;
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
openCollection() { openCollection() {

View File

@ -1240,7 +1240,8 @@ export default {
collectionId: this.$route.params.collectionId, collectionId: this.$route.params.collectionId,
}, },
width: 'calc(100% - (2 * var(--tainacan-one-column)))', width: 'calc(100% - (2 * var(--tainacan-one-column)))',
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
sequenceEditSelectedItems() { sequenceEditSelectedItems() {
@ -1278,7 +1279,8 @@ export default {
} }
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
this.clearContextMenu(); this.clearContextMenu();
@ -1310,7 +1312,8 @@ export default {
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
deleteOneItem(itemId) { deleteOneItem(itemId) {
@ -1333,7 +1336,8 @@ export default {
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
this.clearContextMenu(); this.clearContextMenu();
}, },
@ -1365,7 +1369,8 @@ export default {
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
deleteSelectedItems() { deleteSelectedItems() {
@ -1406,7 +1411,8 @@ export default {
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
openItem() { openItem() {

View File

@ -142,7 +142,8 @@
:active.sync="isMapperMetadataCreating" :active.sync="isMapperMetadataCreating"
trap-focus trap-focus
aria-modal aria-modal
aria-role="dialog"> aria-role="dialog"
custom-class="tainacan-modal">
<div <div
autofocus autofocus
role="dialog" role="dialog"

View File

@ -420,7 +420,8 @@
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
deleteSelected() { deleteSelected() {
@ -459,7 +460,8 @@
this.allOnPageSelected = false; this.allOnPageSelected = false;
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
getDate(rawDate) { getDate(rawDate) {
@ -484,7 +486,8 @@
this.updateProcess({ id: this.processes[index].ID, status: 'closed' }); this.updateProcess({ id: this.processes[index].ID, status: 'closed' });
}, },
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
onHeartBitTickList(event, data) { onHeartBitTickList(event, data) {

View File

@ -235,7 +235,8 @@ export default {
message: this.$i18n.get('info_warning_terms_not_saved'), message: this.$i18n.get('info_warning_terms_not_saved'),
onConfirm: () => { this.removeTerm(); }, onConfirm: () => { this.removeTerm(); },
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} else { } else {
this.removeTerm(); this.removeTerm();
@ -277,7 +278,8 @@ export default {
} }
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
eventOnChildTermDeleted(parentTermId) { eventOnChildTermDeleted(parentTermId) {

View File

@ -276,7 +276,8 @@
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
deleteSelected() { deleteSelected() {
@ -315,7 +316,8 @@
this.allOnPageSelected = false; this.allOnPageSelected = false;
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
onClickTaxonomy($event, taxonomyId, index) { onClickTaxonomy($event, taxonomyId, index) {

View File

@ -88,7 +88,7 @@
v-if="isMultiple" v-if="isMultiple"
:disabled="itemMetadatum.item.id && (childItemMetadataGroups.length > 0 && !someValueOnLastInput)" :disabled="itemMetadatum.item.id && (childItemMetadataGroups.length > 0 && !someValueOnLastInput)"
@click="addGroup" @click="addGroup"
class="is-block add-link"> class="is-inline-block add-link">
<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>

View File

@ -289,7 +289,8 @@
next(); next();
}, },
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} else { } else {
next(); next();
@ -382,7 +383,8 @@
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
toggleMetadatumEdition(metadatumId) { toggleMetadatumEdition(metadatumId) {

View File

@ -63,7 +63,8 @@
</a> </a>
<b-modal <b-modal
:width="1200" :width="1200"
:active.sync="createNewItemModal"> :active.sync="createNewItemModal"
custom-class="tainacan-modal">
<iframe <iframe
:id="newItemFrame" :id="newItemFrame"
width="100%" width="100%"

View File

@ -85,7 +85,7 @@
<template v-if="isMultiple"> <template v-if="isMultiple">
<a <a
@click="addValue" @click="addValue"
class="is-block add-link"> class="is-inline-block add-link">
<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>

View File

@ -79,7 +79,7 @@
:message="$i18n.getHelperMessage('tainacan-taxonomy', 'visible_options_list')"/> :message="$i18n.getHelperMessage('tainacan-taxonomy', 'visible_options_list')"/>
</b-field> </b-field>
<b-field <b-field
v-if="taxonomy_id && taxonomies.length && taxonomies.find((taxonomy) => taxonomy.id == taxonomy_id).allow_insert == 'yes'" v-if="taxonomy_id && taxonomies.length && isTremCreationAllowedOnCurrentTaxonomy"
:addons="false" :addons="false"
:label="$i18n.get('label_taxonomy_allow_new_terms')"> :label="$i18n.get('label_taxonomy_allow_new_terms')">
&nbsp; &nbsp;
@ -200,6 +200,10 @@
this.setErrorsAttributes( '', '' ); this.setErrorsAttributes( '', '' );
} }
return true; return true;
},
isTremCreationAllowedOnCurrentTaxonomy() {
const currentTaxonomy = this.taxonomies.find((taxonomy) => taxonomy.id == this.taxonomy_id);
return currentTaxonomy ? currentTaxonomy.allow_insert == 'yes' : false;
} }
}, },
watch: { watch: {

View File

@ -50,7 +50,8 @@
trap-focus trap-focus
aria-role="dialog" aria-role="dialog"
aria-modal aria-modal
:can-cancel="['outside', 'escape']"> :can-cancel="['outside', 'escape']"
custom-class="tainacan-modal">
<term-edition-form <term-edition-form
:taxonomy-id="taxonomyId" :taxonomy-id="taxonomyId"
:edit-form="{ id: 'new', name: newTermName ? newTermName : '' }" :edit-form="{ id: 'new', name: newTermName ? newTermName : '' }"

View File

@ -275,7 +275,7 @@
<a <a
:disabled="dones.every((item) => item === true) === false" :disabled="dones.every((item) => item === true) === false"
@click="addEditionCriterion()" @click="addEditionCriterion()"
class="has-text-right is-block add-link"> class="has-text-right is-inline-block add-link">
<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>

View File

@ -116,7 +116,8 @@ export default {
sourceCollection: this.collection.id, sourceCollection: this.collection.id,
hideWhenManualCollection: true hideWhenManualCollection: true
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} }
} }

View File

@ -1124,7 +1124,7 @@
background-color: var(--tainacan-gray1); background-color: var(--tainacan-gray1);
&:hover { &:hover {
background-color: var(--tainacan-blue1); background-color: var(--tainacan-primary);
} }
} }

View File

@ -1010,7 +1010,7 @@
background-color: var(--tainacan-gray1); background-color: var(--tainacan-gray1);
&:hover { &:hover {
background-color: var(--tainacan-blue1); background-color: var(--tainacan-primary);
} }
} }

View File

@ -4,7 +4,7 @@
aria-modal aria-modal
autofocus autofocus
role="alertdialog" role="alertdialog"
class="tainacan-form dialog" class="tainacan-form tainacan-dialog dialog"
ref="customDialog"> ref="customDialog">
<div <div
class="modal-card" class="modal-card"

View File

@ -14,7 +14,8 @@
scroll="keep" scroll="keep"
trap-focus trap-focus
aria-modal aria-modal
aria-role="dialog"> aria-role="dialog"
custom-class="tainacan-modal">
<!-- <div class="tainacan-modal-content"> <!-- <div class="tainacan-modal-content">
<div class="tainacan-modal-title"> <div class="tainacan-modal-title">
<h2>{{ $i18n.get('label_document') }}</h2> <h2>{{ $i18n.get('label_document') }}</h2>

View File

@ -35,7 +35,8 @@
scroll="keep" scroll="keep"
trap-focus trap-focus
aria-modal aria-modal
aria-role="dialog"> aria-role="dialog"
custom-class="tainacan-modal">
<div <div
autofocus autofocus
role="dialog" role="dialog"

View File

@ -72,6 +72,7 @@ export default {
color: var(--tainacan-secondary); color: var(--tainacan-secondary);
margin-bottom: 0; margin-bottom: 0;
margin-top: 0; margin-top: 0;
white-space: normal;
} }
} }

View File

@ -187,7 +187,8 @@
collectionId: this.collectionId collectionId: this.collectionId
}, },
width: 'calc(100% - (2 * var(--tainacan-one-column)))', width: 'calc(100% - (2 * var(--tainacan-one-column)))',
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
this.$parent.close(); this.$parent.close();
@ -216,6 +217,5 @@
margin-top: 12px; margin-top: 12px;
} }
</style> </style>

View File

@ -497,7 +497,7 @@
.collapse-all { .collapse-all {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin-left: -0.65em; margin-left: -0.5em !important;
} }
.collapse-all__text { .collapse-all__text {
font-size: 0.75em !important; font-size: 0.75em !important;

View File

@ -50,7 +50,8 @@ const tainacanErrorHandler = function(error){
hideCancel: true hideCancel: true
}, },
ariaRole: 'alertdialog', ariaRole: 'alertdialog',
ariaModal: true ariaModal: true,
customClass: 'tainacan-modal'
}); });
} }
}); });

View File

@ -55,12 +55,12 @@ export const fetchMetadataList = ({ commit }, { collectionId, onlyTaxonomies } )
let endpoint = ''; let endpoint = '';
if (collectionId && collectionId != 'default') if (collectionId && collectionId != 'default')
endpoint += '/collection/' + collectionId + '/metadata/'; endpoint += '/collection/' + collectionId + '/metadata/?nopaging=1';
else else
endpoint += '/metadata/'; endpoint += '/metadata/?nopaging=1';
if (onlyTaxonomies) if (onlyTaxonomies)
endpoint += '?metaquery[0][key]=metadata_type&metaquery[0][value]=Tainacan\\Metadata_Types\\Taxonomy'; endpoint += '&metaquery[0][key]=metadata_type&metaquery[0][value]=Tainacan\\Metadata_Types\\Taxonomy';
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios.tainacan.get(endpoint) axios.tainacan.get(endpoint)

View File

@ -30,6 +30,10 @@ export const getActivities = state => {
return state.activities; return state.activities;
}; };
export const getStartDate = state => {
return state.startDate;
};
export const getStackedBarChartOptions = state => { export const getStackedBarChartOptions = state => {
return state.stackedBarChartOptions; return state.stackedBarChartOptions;
}; };

View File

@ -12,6 +12,7 @@ const state = {
metadata: {}, metadata: {},
metadataList: {}, metadataList: {},
activities: {}, activities: {},
startDate: '',
stackedBarChartOptions: { stackedBarChartOptions: {
chart: { chart: {
type: 'bar', type: 'bar',
@ -183,7 +184,7 @@ const state = {
} }
} }
}, },
treeMapOptions: { treeMapChartOptions: {
legend: { legend: {
show: false show: false
}, },
@ -193,6 +194,11 @@ const state = {
}, },
title: { title: {
text: '' text: ''
},
plotOptions: {
treemap: {
enableShades: false
}
} }
} }
}; };

View File

@ -32,6 +32,10 @@ export const setActivities = (state, activities) => {
state.activities = activities; state.activities = activities;
}; };
export const setStartDate = (state, startDate) => {
state.startDate = startDate;
};
export const setStackedBarChartOptions = (state, stackedBarChartOptions) => { export const setStackedBarChartOptions = (state, stackedBarChartOptions) => {
state.stackedBarChartOptions = stackedBarChartOptions; state.stackedBarChartOptions = stackedBarChartOptions;
}; };

View File

@ -477,7 +477,8 @@ export default {
parent: this, parent: this,
component: AvailableImportersModal, component: AvailableImportersModal,
hasModalCard: true, hasModalCard: true,
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
searchCollections() { searchCollections() {

View File

@ -298,7 +298,8 @@
:active.sync="isSelectingFilterType" :active.sync="isSelectingFilterType"
trap-focus trap-focus
aria-modal aria-modal
aria-role="dialog"> aria-role="dialog"
custom-class="tainacan-modal">
<div <div
autofocus autofocus
role="dialog" role="dialog"
@ -455,7 +456,8 @@ export default {
next(); next();
}, },
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} else { } else {
next() next()

View File

@ -441,7 +441,7 @@
trap-focus trap-focus
aria-modal aria-modal
aria-role="dialog" aria-role="dialog"
custom-class="tainacan-form filters-menu"> custom-class="tainacan-modal tainacan-form filters-menu">
<filters-items-list <filters-items-list
:is-loading-items="isLoadingItems" :is-loading-items="isLoadingItems"
autofocus="true" autofocus="true"
@ -889,7 +889,8 @@
targetCollection: this.collectionId, targetCollection: this.collectionId,
hideWhenManualCollection: true hideWhenManualCollection: true
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
openExposersModal(selectedItems) { openExposersModal(selectedItems) {
@ -902,7 +903,8 @@
totalItems: this.totalItems, totalItems: this.totalItems,
selectedItems: selectedItems selectedItems: selectedItems
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}) })
}, },
onOpenCollectionsModal() { onOpenCollectionsModal() {
@ -910,7 +912,8 @@
parent: this, parent: this,
component: CollectionsModal, component: CollectionsModal,
hasModalCard: true, hasModalCard: true,
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
updateSearch() { updateSearch() {
@ -1222,7 +1225,8 @@
showNeverShowAgainOption: offerCheckbox && tainacan_plugin.user_caps != undefined && Object.keys(tainacan_plugin.user_caps).length != undefined && Object.keys(tainacan_plugin.user_caps).length > 0, showNeverShowAgainOption: offerCheckbox && tainacan_plugin.user_caps != undefined && Object.keys(tainacan_plugin.user_caps).length != undefined && Object.keys(tainacan_plugin.user_caps).length > 0,
messageKeyForUserPrefs: 'ItemsHiddenDueSorting' messageKeyForUserPrefs: 'ItemsHiddenDueSorting'
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
hideFiltersOnMobile: _.debounce( function() { hideFiltersOnMobile: _.debounce( function() {

View File

@ -451,7 +451,8 @@ export default {
next(); next();
}, },
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} else { } else {
next(); next();
@ -597,7 +598,8 @@ export default {
}); });
} }
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
toggleMetadatumEdition(metadatumId) { toggleMetadatumEdition(metadatumId) {

View File

@ -433,7 +433,8 @@
itemURL: this.item.url, itemURL: this.item.url,
totalItems: 1, totalItems: 1,
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
} }
} }

View File

@ -6,11 +6,11 @@ button.link-style:active {
cursor: pointer; cursor: pointer;
font-size: inherit; font-size: inherit;
text-transform: inherit; text-transform: inherit;
color: var(--tainacan-secondary); color: var(--tainacan-secondary) !important;
padding: 0; padding: 0;
margin: 0; margin: 0;
font-weight: normal; font-weight: normal;
background: transparent; background: transparent !important;
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;

View File

@ -6,6 +6,7 @@
} }
.modal-content { .modal-content {
background-color: var(--tainacan-background-color);
padding: 24px 18px var(--tainacan-one-column); padding: 24px 18px var(--tainacan-one-column);
padding: 24px 18px 24px 4.1666667vw; padding: 24px 18px 24px 4.1666667vw;
margin: 0; margin: 0;
@ -20,6 +21,7 @@
h3 { h3 {
font-size: 1em; font-size: 1em;
color: var(--tainacan-heading-color); color: var(--tainacan-heading-color);
margin-bottom: 1em;
} }
} }
@ -40,6 +42,7 @@
margin: 0 12% 0 0; margin: 0 12% 0 0;
margin: 0 12vw 0 0; margin: 0 12vw 0 0;
padding: var(--tainacan-container-padding); padding: var(--tainacan-container-padding);
max-width: calc(100% - 12vw) !important;
} }
} }
} }

View File

@ -1,5 +1,5 @@
// Tainacan modals // Tainacan modals
.modal .animation-content { .tainacan-modal .animation-content {
background: none; background: none;
width: calc(100% - (2 * var(--tainacan-one-column))); width: calc(100% - (2 * var(--tainacan-one-column)));
width: 91.6666667vw; width: 91.6666667vw;
@ -13,11 +13,8 @@
max-height: 95vh; max-height: 95vh;
} }
} }
.modal.is-full-screen > .animation-content,
.modal.is-full-screen > .animation-content > .modal-card { .tainacan-modal .modal-close {
background-color: transparent;
}
.modal .modal-close {
z-index: 99999; z-index: 99999;
@media only screen and (max-width: 768px) { @media only screen and (max-width: 768px) {
&:before, &:after { background-color: #298596; } &:before, &:after { background-color: #298596; }
@ -98,8 +95,9 @@
display: block; display: block;
} }
} }
// Bulma modals customized for Tainacan (custom-dialog.vue) // Bulma modals customized for Tainacan (custom-dialog.vue)
.dialog { .tainacan-dialog {
.modal-background { .modal-background {
background-color: rgba(0, 0, 0, 0.70); background-color: rgba(0, 0, 0, 0.70);

View File

@ -1,5 +1,5 @@
.notices { .notices {
z-index: 99999999; z-index: 99999999;
.toast, .snackbar { .toast, .snackbar {
min-width: auto !important; min-width: auto !important;
@ -12,24 +12,28 @@
&.is-dark .button:hover { &.is-dark .button:hover {
background-color: var(--tainacan-gray2) !important; background-color: var(--tainacan-gray2) !important;
color: var(--tainacan-info-color) !important; color: var(--tainacan-info-color) !important;
font-size: 0.875em;
} }
&.is-warning, &.is-warning,
&.is-warning .button, &.is-warning .button,
&.is-warning .button:hover { &.is-warning .button:hover {
background-color: var(--tainacan-yellow1) !important; background-color: var(--tainacan-yellow1) !important;
color: var(--tainacan-warning) !important; color: var(--tainacan-warning) !important;
font-size: 0.875em;
} }
&.is-danger, &.is-danger,
&.is-danger .button, &.is-danger .button,
&.is-danger .button:hover { &.is-danger .button:hover {
background-color: var(--tainacan-red1) !important; background-color: var(--tainacan-red1) !important;
color: var(--tainacan-danger) !important; color: var(--tainacan-danger) !important;
font-size: 0.875em;
} }
&.is-success, &.is-success,
&.is-success .button, &.is-success .button,
&.is-success .button:hover { &.is-success .button:hover {
background-color: var(--tainacan-green1) !important; background-color: var(--tainacan-green1) !important;
color: var(--tainacan-success) !important; color: var(--tainacan-success) !important;
font-size: 0.875em;
} }
} }
} }

View File

@ -12,8 +12,8 @@ function tainacan_blocks_initialize() {
add_action('init', 'tainacan_blocks_add_plugin_settings', 90); add_action('init', 'tainacan_blocks_add_plugin_settings', 90);
add_action('init', 'tainacan_blocks_add_plugin_admin_settings', 90); add_action('init', 'tainacan_blocks_add_plugin_admin_settings', 90);
add_action('init', 'register_tainacan_blocks_add_gutenberg_blocks'); add_action('init', 'register_tainacan_blocks_add_gutenberg_blocks');
add_action('wp_enqueue_scripts', 'unregister_taiancan_blocks'); add_action('wp_enqueue_scripts', 'unregister_tainacan_blocks');
add_action('admin_enqueue_scripts', 'unregister_taiancan_blocks'); add_action('admin_enqueue_scripts', 'unregister_tainacan_blocks');
} }
} }
@ -33,11 +33,11 @@ function register_tainacan_blocks_add_gutenberg_blocks() {
tainacan_blocks_register_tainacan_carousel_collections_list(); tainacan_blocks_register_tainacan_carousel_collections_list();
} }
function unregister_taiancan_blocks() { function unregister_tainacan_blocks() {
global $post; global $post;
if(!$post) return; if(!$post) return;
$not_allowed = apply_filters('posts-names-to-unregister-taiancan-blocks', []); $not_allowed = apply_filters('posts-names-to-unregister-tainacan-blocks', []);
$current_page = $post->post_name; $current_page = $post->post_name;
if ( in_array($current_page, $not_allowed) ) { if ( in_array($current_page, $not_allowed) ) {

View File

@ -189,6 +189,10 @@
@media only screen and (max-width: 768px) { max-width: 80%; } @media only screen and (max-width: 768px) { max-width: 80%; }
} }
} }
.components-radio-control__option .components-radio-control__input {
min-width: 20px;
min-height: 20px;
}
.components-radio-control__option .components-radio-control__input::before { .components-radio-control__option .components-radio-control__input::before {
border-width: 0px; border-width: 0px;
} }

View File

@ -245,6 +245,9 @@ export default {
}, },
created() { created() {
this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot }); this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot });
if (tainacan_plugin && tainacan_plugin.nonce)
this.tainacanAxios.defaults.headers.common['X-WP-Nonce'] = tainacan_plugin.nonce;
this.fetchCollections(); this.fetchCollections();
if (!isNaN(this.maxCollectionsPerScreen)) { if (!isNaN(this.maxCollectionsPerScreen)) {

View File

@ -218,6 +218,8 @@ export default {
}, },
created() { created() {
this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot }); this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot });
if (tainacan_plugin && tainacan_plugin.nonce)
this.tainacanAxios.defaults.headers.common['X-WP-Nonce'] = tainacan_plugin.nonce;
this.offset = 0; this.offset = 0;
this.fetchFacets(); this.fetchFacets();
}, },

View File

@ -254,6 +254,8 @@ export default {
}, },
created() { created() {
this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot }); this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot });
if (tainacan_plugin && tainacan_plugin.nonce)
this.tainacanAxios.defaults.headers.common['X-WP-Nonce'] = tainacan_plugin.nonce;
if (this.showCollectionHeader) if (this.showCollectionHeader)
this.fetchCollectionForHeader(); this.fetchCollectionForHeader();

View File

@ -325,6 +325,9 @@ export default {
}, },
created() { created() {
this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot }); this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot });
if (tainacan_plugin && tainacan_plugin.nonce)
this.tainacanAxios.defaults.headers.common['X-WP-Nonce'] = tainacan_plugin.nonce;
this.localOrder = this.order; this.localOrder = this.order;
if (this.showCollectionHeader) if (this.showCollectionHeader)

View File

@ -219,6 +219,9 @@ export default {
}, },
created() { created() {
this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot }); this.tainacanAxios = axios.create({ baseURL: this.tainacanApiRoot });
if (tainacan_plugin && tainacan_plugin.nonce)
this.tainacanAxios.defaults.headers.common['X-WP-Nonce'] = tainacan_plugin.nonce;
this.fetchTerms(); this.fetchTerms();
if (!isNaN(this.maxTermsPerScreen)) { if (!isNaN(this.maxTermsPerScreen)) {

View File

@ -52,26 +52,34 @@ export default {
@import "../../../node_modules/buefy/src/scss/components/_notices.scss"; @import "../../../node_modules/buefy/src/scss/components/_notices.scss";
@import "../../../node_modules/buefy/src/scss/components/_numberinput.scss"; @import "../../../node_modules/buefy/src/scss/components/_numberinput.scss";
// Tainacan imports // Block level custom variables
@import "../admin/scss/_tainacan-form.scss";
@import "../admin/scss/_modals.scss";
@import "../admin/scss/_buttons.scss";
@import "../admin/scss/_inputs.scss";
@import "../admin/scss/_checkboxes.scss";
@import "../admin/scss/_radios.scss";
@import "../admin/scss/_switches.scss";
@import "../admin/scss/_pagination.scss";
@import "../admin/scss/_tags.scss";
@import "../admin/scss/_notices.scss";
@import "../admin/scss/_tabs.scss";
@import "../admin/scss/_selects.scss";
@import "../admin/scss/_dropdown-and-autocomplete.scss";
@import "../admin/scss/_tooltips.scss";
@import "../admin/scss/_control.scss";
@import "../admin/scss/_upload.scss";
@import "../admin/scss/_custom_variables.scss"; @import "../admin/scss/_custom_variables.scss";
.tainacan-item-submission-form { // These have to be outside of the scoped context
@import "../admin/scss/_tooltips.scss";
@import "../admin/scss/_notices.scss";
@import "../admin/scss/_modals.scss";
// Scoped, to avoid conflicts with theme's css
.tainacan-modal,
.tainacan-item-submission-form {
// Tainacan imports
@import "../admin/scss/_tainacan-form.scss";
@import "../admin/scss/_modals.scss";
@import "../admin/scss/_buttons.scss";
@import "../admin/scss/_inputs.scss";
@import "../admin/scss/_checkboxes.scss";
@import "../admin/scss/_radios.scss";
@import "../admin/scss/_switches.scss";
@import "../admin/scss/_pagination.scss";
@import "../admin/scss/_tags.scss";
@import "../admin/scss/_tabs.scss";
@import "../admin/scss/_selects.scss";
@import "../admin/scss/_dropdown-and-autocomplete.scss";
@import "../admin/scss/_control.scss";
@import "../admin/scss/_upload.scss";
.tainacan-icon { .tainacan-icon {
opacity: 0; // Will make it 1 once window.load is done; opacity: 0; // Will make it 1 once window.load is done;
} }

View File

@ -112,26 +112,54 @@ $pswp__include-minimal-style: true !default;
.swiper-slide-content { .swiper-slide-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: block;
align-items: center; text-align: center;
justify-content: center;
flex-direction: column;
.tainacan-embed-container { .tainacan-content-embed {
width: 100%; width: 100%;
height: auto; height: auto;
&.tainacan-has-aspect-ratio {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 2) / 1); /* Default to 2:1 aspect ratio. */
margin-left: auto;
margin-right: auto;
}
&.tainacan-embed-aspect-21-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 21) / 9);
}
&.tainacan-embed-aspect-18-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 18) / 9);
}
&.tainacan-embed-aspect-16-9 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 16) / 9);
}
&.tainacan-embed-aspect-4-3 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 4) / 3);
}
&.tainacan-embed-aspect-1-1 {
max-width: var(--tainacan-media-main-carousel-height, 60vh);
}
&.tainacan-embed-aspect-3-4 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 3) / 4);
}
&.tainacan-embed-aspect-9-16 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 9) / 16);
}
&.tainacan-embed-aspect-1-2 {
max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 1) / 2);
}
} }
iframe { iframe {
max-height: var(--tainacan-media-main-carousel-height, 60vh); max-height: var(--tainacan-media-main-carousel-height, 60vh);
width: 100%;
max-width: 100%; max-width: 100%;
margin-left: auto;
margin-right: auto;
border: none; border: none;
display: block; display: block;
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;
} }
a:first-of-type, a:first-of-type,
p:first-of-type { p:first-of-type {
z-index: 99; z-index: 99;
@ -157,6 +185,10 @@ $pswp__include-minimal-style: true !default;
width: auto; width: auto;
max-height: var(--tainacan-media-main-carousel-height, 60vh); max-height: var(--tainacan-media-main-carousel-height, 60vh);
} }
.twitter-tweet {
margin-left: auto;
margin-right: auto;
}
} }
} }
.tainacan-media-component__swiper-thumbs { .tainacan-media-component__swiper-thumbs {
@ -304,34 +336,68 @@ $pswp__include-minimal-style: true !default;
.attachment-without-image { .attachment-without-image {
width: 100%; width: 100%;
height: 100%; height: calc(100% - 44px);
display: flex; display: flex;
align-items: center;
justify-content: center; justify-content: center;
align-items: center;
text-align: center;
padding: 44px;
margin-top: 22px;
&.tainacan-embed-container:not(.tainacan-embed-without-iframe) { &>iframe:not(.wp-embedded-content) {
padding: 0px; width: 90vw;
} height: 90vh;
.tainacan-embed-container .twitter-tweet { border: none;
width: 100vw !important; margin: 44px;
display: block;
background-image: url('../images/preloader.gif');
background-repeat: no-repeat;
background-position: center;
} }
} }
// PDFs file that come from document instead of attachments
iframe { .pswp__zoom-wrap>iframe#iframePDF {
padding: 44px; width: 90vw;
min-height: 90vh; height: 90vh;
max-height: 90vh;
height: 100%;
width: 100%;
max-width: 100%;
margin: 0 auto;
border: none; border: none;
margin: 44px auto;
display: block; display: block;
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-content-embed {
width: 100%;
height: auto;
&.tainacan-has-aspect-ratio {
max-width: calc((90vh * 2) / 1); /* Default to 2:1 aspect ratio. */
margin-left: auto;
margin-right: auto;
}
&.tainacan-embed-aspect-21-9 {
max-width: calc((90vh * 21) / 9);
}
&.tainacan-embed-aspect-18-9 {
max-width: calc((90vh * 18) / 9);
}
&.tainacan-embed-aspect-16-9 {
max-width: calc((90vh * 16) / 9);
}
&.tainacan-embed-aspect-4-3 {
max-width: calc((90vh * 4) / 3);
}
&.tainacan-embed-aspect-1-1 {
max-width: 90vh;
}
&.tainacan-embed-aspect-9-16 {
max-width: calc((90vh * 9) / 16);
}
&.tainacan-embed-aspect-1-2 {
max-width: calc((90vh * 1) / 2);
}
}
a:first-of-type, a:first-of-type,
p:first-of-type , p:first-of-type ,
article:first-of-type { article:first-of-type {

View File

@ -92,7 +92,7 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters, mapMutations } from 'vuex';
import { reportsChartMixin } from '../js/reports-mixin'; import { reportsChartMixin } from '../js/reports-mixin';
export default { export default {
@ -101,7 +101,7 @@ export default {
return { return {
chartSeriesByUser: [], chartSeriesByUser: [],
chartOptionsByUser: [], chartOptionsByUser: [],
maxYear: new Date().getFullYear(), maxYear: new Date().getFullYear() - 1,
minYear: 2017, minYear: 2017,
currentStart: '', currentStart: '',
currentEnd: '' currentEnd: ''
@ -109,7 +109,7 @@ export default {
}, },
computed: { computed: {
...mapGetters('report', { ...mapGetters('report', {
areaChartOptions: 'getAreaChartOptions', areaChartOptions: 'getAreaChartOptions'
}) })
}, },
watch: { watch: {
@ -122,6 +122,9 @@ export default {
}, },
}, },
methods: { methods: {
...mapMutations('report', [
'setStartDate'
]),
increaseYear() { increaseYear() {
this.setStartYear(this.currentEnd.getFullYear()); this.setStartYear(this.currentEnd.getFullYear());
}, },
@ -132,7 +135,7 @@ export default {
setStartYear(newStartYear) { setStartYear(newStartYear) {
let currentStartDate = new Date(this.currentStart.getTime()); let currentStartDate = new Date(this.currentStart.getTime());
const newStart = new Date(currentStartDate.setFullYear(newStartYear)); const newStart = new Date(currentStartDate.setFullYear(newStartYear));
this.setStartDate(newStart.toISOString());
this.$emit('time-range-update', newStart.toISOString()); this.$emit('time-range-update', newStart.toISOString());
}, },
getDaysArray(start, end) { getDaysArray(start, end) {

View File

@ -8,6 +8,7 @@
class="postbox activities-per-user-box"> class="postbox activities-per-user-box">
<template v-if="chartData.totals && chartData.totals.by_user"> <template v-if="chartData.totals && chartData.totals.by_user">
<apexchart <apexchart
ref="activities-per-user-chart"
:height="120 + (chartData.totals.by_user.length * 58)" :height="120 + (chartData.totals.by_user.length * 58)"
:series="chartSeries" :series="chartSeries"
:options="chartOptions" /> :options="chartOptions" />
@ -15,7 +16,6 @@
</div> </div>
<div <div
v-else v-else
style="min-height=800px"
class="skeleton postbox activities-per-user-box" /> class="skeleton postbox activities-per-user-box" />
<slot /> <slot />
</div> </div>
@ -27,6 +27,21 @@ import { reportsChartMixin } from '../js/reports-mixin';
export default { export default {
mixins: [ reportsChartMixin ], mixins: [ reportsChartMixin ],
data() {
return {
validActions: [
"update-metadata-value",
"update",
"create",
"trash",
"new-attachment",
"update-document",
"delete",
"delete-attachment",
"update-thumbnail"
]
}
},
computed: { computed: {
...mapGetters('report', { ...mapGetters('report', {
horizontalBarChartOptions: 'getHorizontalBarChartOptions', horizontalBarChartOptions: 'getHorizontalBarChartOptions',
@ -52,20 +67,9 @@ export default {
let activityPerUserValues = []; let activityPerUserValues = [];
let activityPerUserLabels = []; let activityPerUserLabels = [];
const userCount = 100 + (this.chartData.totals.by_user.length * 58); const userCount = 100 + (this.chartData.totals.by_user.length * 58);
const validActions = [
"update-metadata-value",
"update",
"create",
"trash",
"new-attachment",
"update-document",
"delete",
"delete-attachment",
"update-thumbnail"
];
// Create empty series for each possible action // Create empty series for each possible action
validActions.forEach((action) => { this.validActions.forEach((action) => {
activityPerUserValues.push({ activityPerUserValues.push({
id: action, id: action,
name: this.$i18n.get('action_' + action), name: this.$i18n.get('action_' + action),
@ -84,7 +88,7 @@ export default {
if (activity.id == 'others') { if (activity.id == 'others') {
let otherActionsTotal = 0; let otherActionsTotal = 0;
Object.keys(activityPerUser.by_action).forEach((action) => { Object.keys(activityPerUser.by_action).forEach((action) => {
if (validActions.indexOf(action) < 0) if (this.validActions.indexOf(action) < 0)
otherActionsTotal += (activityPerUser.by_action[action] ? activityPerUser.by_action[action] : 0); otherActionsTotal += (activityPerUser.by_action[action] ? activityPerUser.by_action[action] : 0);
}); });
activity.data.push(otherActionsTotal); activity.data.push(otherActionsTotal);
@ -138,8 +142,19 @@ export default {
} }
} }
} }
setTimeout(() => {
setTimeout(() => this.isBuildingChart = false, 300); this.isBuildingChart = false;
this.$nextTick(() => {
if (this.$refs && this.$refs['activities-per-user-chart'] && this.$refs['activities-per-user-chart'].chart) {
this.validActions.forEach((action) => {
if (action !== 'update-metadata-value')
this.$refs['activities-per-user-chart'].chart.toggleSeries(this.$i18n.get('action_' + action));
});
this.$refs['activities-per-user-chart'].chart.toggleSeries(this.$i18n.get('action_others'));
}
});
}, 300);
} }
} }
} }

View File

@ -1,16 +1,30 @@
<template> <template>
<div> <div>
<apexchart <apexchart
v-if="!isBuildingChart && chartData && Object.values(chartData).length" v-if="!isFetchingData && !isBuildingChart && chartData && Object.values(chartData).length"
height="380px" height="380px"
class="postbox" class="postbox"
:series="chartSeries" :series="chartSeries"
:options="chartOptions" /> :options="chartOptions" />
<div <div
v-else v-if="!isFetchingData && !isBuildingChart && (!chartData || !Object.values(chartData).length)"
style="min-height=380px" style="min-height:380px"
class="postbox">
<div class="empty-postbox-placeholder">
<p class="title is-4">
<span class="icon has-text-gray">
<i class="tainacan-icon tainacan-icon-collections tainacan-icon-1-125em" />
</span>
&nbsp;{{ $i18n.get('collections') }}
</p>
<br>
<p class="subtitle is-6">{{ $i18n.get('info_no_collection_created') }}</p>
</div>
</div>
<div
v-if="isBuildingChart || isFetchingData"
style="min-height:380px"
class="skeleton postbox" /> class="skeleton postbox" />
<slot />
</div> </div>
</template> </template>

View File

@ -1,6 +1,7 @@
<template> <template>
<div v-if="taxonomiesList != undefined"> <div v-if="taxonomiesList != undefined">
<div <div
v-if="taxonomiesListArray.length"
:class="{ 'skeleton': isFetchingData || isBuildingChart || isFetchingTaxonomyTerms || !selectedTaxonomy || !selectedTaxonomy.id }" :class="{ 'skeleton': isFetchingData || isBuildingChart || isFetchingTaxonomyTerms || !selectedTaxonomy || !selectedTaxonomy.id }"
class="postbox"> class="postbox">
<div class="box-header"> <div class="box-header">
@ -116,6 +117,21 @@
</span> </span>
</button> </button>
</div> </div>
<div
v-if="!isFetchingData && !isBuildingChart && (!taxonomiesListArray || !taxonomiesListArray.length)"
style="min-height:380px"
class="postbox">
<div class="empty-postbox-placeholder">
<p class="title is-4">
<span class="icon has-text-gray">
<i class="tainacan-icon tainacan-icon-taxonomies tainacan-icon-1-125em" />
</span>
&nbsp;{{ $i18n.get('taxonomies') }}
</p>
<br>
<p class="subtitle is-6">{{ $i18n.get('info_no_taxonomy_created') }}</p>
</div>
</div>
</div> </div>
</template> </template>
@ -143,7 +159,7 @@ export default {
return this.taxonomiesList && this.taxonomiesList != undefined ? Object.values(this.taxonomiesList) : []; return this.taxonomiesList && this.taxonomiesList != undefined ? Object.values(this.taxonomiesList) : [];
}, },
taxonomyTermsLatestCachedOn() { taxonomyTermsLatestCachedOn() {
return this.reportsLatestCachedOn['taxonomy-terms-' + this.selectedTaxonomy.id]; return this.reportsLatestCachedOn['taxonomy-terms-default-' + this.selectedTaxonomy.id];
}, },
currentTotalTerms() { currentTotalTerms() {
return Array.isArray(this.chartData) ? this.chartData.length : 0 return Array.isArray(this.chartData) ? this.chartData.length : 0

View File

@ -1,6 +1,7 @@
<template> <template>
<div v-if="metadataList != undefined"> <div v-if="metadataList != undefined">
<div <div
v-if="metadataListArray.length"
:class="{ 'skeleton': isFetchingData || isBuildingChart || isFetchingMetadatumTerms || !selectedMetadatum || !selectedMetadatum.id }" :class="{ 'skeleton': isFetchingData || isBuildingChart || isFetchingMetadatumTerms || !selectedMetadatum || !selectedMetadatum.id }"
class="postbox"> class="postbox">
<div <div
@ -246,7 +247,7 @@
</div> </div>
<div <div
v-else v-else
class="child-term-placeholder"> class="empty-postbox-placeholder">
<p class="title is-4"> <p class="title is-4">
<span class="icon has-text-gray"> <span class="icon has-text-gray">
<i class="tainacan-icon tainacan-icon-taxonomies tainacan-icon-1-125em" /> <i class="tainacan-icon tainacan-icon-taxonomies tainacan-icon-1-125em" />
@ -287,6 +288,21 @@
</span> </span>
</button> </button>
</div> </div>
<div
v-if="!isFetchingData && !isBuildingChart && (!metadataListArray || !metadataListArray.length)"
style="min-height:380px"
class="postbox">
<div class="empty-postbox-placeholder">
<p class="title is-4">
<span class="icon has-text-gray">
<i class="tainacan-icon tainacan-icon-metadata tainacan-icon-1-125em" />
</span>
&nbsp;{{ $i18n.get('label_items_per_term_from_taxonomy_metadatum') }}
</p>
<br>
<p class="subtitle is-6">{{ $i18n.get('info_no_taxonomy_metadata_created') }}</p>
</div>
</div>
</div> </div>
</template> </template>
@ -362,10 +378,17 @@ export default {
termsDisplayedPage() { termsDisplayedPage() {
this.buildMetadatumTermsChart(); this.buildMetadatumTermsChart();
}, },
childTermsDisplayedPage() {
this.buildMetadatumChildTermsChart();
},
maxTermsToDisplay() { maxTermsToDisplay() {
this.termsDisplayedPage = 1; this.termsDisplayedPage = 1;
this.buildMetadatumTermsChart(); this.buildMetadatumTermsChart();
}, },
maxChildTermsToDisplay() {
this.childTermsDisplayedPage = 1;
this.buildMetadatumChildTermsChart();
},
selectedParentTerm() { selectedParentTerm() {
if (this.selectedParentTerm[this.selectedParentTerm.length - 1] && this.selectedParentTerm[this.selectedParentTerm.length - 1].id) { if (this.selectedParentTerm[this.selectedParentTerm.length - 1] && this.selectedParentTerm[this.selectedParentTerm.length - 1].id) {
this.loadMetadatumChildTerms(); this.loadMetadatumChildTerms();
@ -420,16 +443,22 @@ export default {
events: { events: {
dataPointSelection: (event, chartContext, config) => { dataPointSelection: (event, chartContext, config) => {
if (config.dataPointIndex >= 0 && orderedTerms[config.dataPointIndex]) { if (config.dataPointIndex >= 0 && orderedTerms[config.dataPointIndex]) {
this.selectedParentTerm.push({ const existingParentTermIndex = this.selectedParentTerm.findIndex((term) => term.id == orderedTerms[config.dataPointIndex].value);
id: orderedTerms[config.dataPointIndex].value, if (existingParentTermIndex < 0) {
label: orderedTerms[config.dataPointIndex].label this.selectedParentTerm.push({
}) id: orderedTerms[config.dataPointIndex].value,
label: orderedTerms[config.dataPointIndex].label
})
}
} }
} }
}, },
}, },
dataLabels: { dataLabels: {
enabled: true, enabled: true,
style: {
fontSize: '16px',
},
formatter: function(text, op) { formatter: function(text, op) {
return [text, op.value] return [text, op.value]
}, },
@ -487,7 +516,7 @@ export default {
chart: { chart: {
type: 'bar', type: 'bar',
height: 350, height: 350,
stacked: true, stacked: false,
toolbar: { toolbar: {
show: true show: true
}, },
@ -497,11 +526,18 @@ export default {
}, },
events: { events: {
dataPointSelection: (event, chartContext, config) => { dataPointSelection: (event, chartContext, config) => {
if (config.dataPointIndex >=0 && orderedTerms[config.dataPointIndex]) { if (config.dataPointIndex >= 0 && orderedTerms[config.dataPointIndex]) {
this.selectedParentTerm.push({ const existingParentTermIndex = this.selectedParentTerm.findIndex((term) => term.id == orderedTerms[config.dataPointIndex].value);
id: orderedTerms[config.dataPointIndex].value, if (existingParentTermIndex < 0) {
label: orderedTerms[config.dataPointIndex].label // Removes siblings from the hierarchy, if existing
}) if (this.selectedParentTerm.length && (this.selectedParentTerm[this.selectedParentTerm.length - 1].id != orderedTerms[config.dataPointIndex].parent) )
this.selectedParentTerm.pop();
this.selectedParentTerm.push({
id: orderedTerms[config.dataPointIndex].value,
label: orderedTerms[config.dataPointIndex].label
});
}
} }
} }
}, },
@ -570,24 +606,35 @@ export default {
events: { events: {
dataPointSelection: (event, chartContext, config) => { dataPointSelection: (event, chartContext, config) => {
if (config.dataPointIndex >= 0 && orderedTerms[config.dataPointIndex]) { if (config.dataPointIndex >= 0 && orderedTerms[config.dataPointIndex]) {
const previousMetadatumChildTermsLatestCachedOn = this.metadatumChildTermsLatestCachedOn ? this.metadatumChildTermsLatestCachedOn.replace('-is-child-chart', '') : ''; const existingParentTermIndex = this.selectedParentTerm.findIndex((term) => term.id == orderedTerms[config.dataPointIndex].value);
this.selectedParentTerm.push({ if (existingParentTermIndex < 0) {
id: orderedTerms[config.dataPointIndex].value,
label: orderedTerms[config.dataPointIndex].label // Removes siblings from the hierarchy, if existing
}); if (this.selectedParentTerm.length && (this.selectedParentTerm[this.selectedParentTerm.length - 1].id != orderedTerms[config.dataPointIndex].parent) )
this.selectedParentTerm.pop();
this.setTaxonomyTerms(this.taxonomyChildTerms);
this.setReportLatestCachedOn({ const previousMetadatumChildTermsLatestCachedOn = this.metadatumChildTermsLatestCachedOn ? this.metadatumChildTermsLatestCachedOn.replace('-is-child-chart', '') : '';
report: 'taxonomy-terms-' + (this.collectionId ? this.collectionId : 'default') + '-' + this.selectedMetadatum.id + (this.selectedParentTerm.length > 2 && this.selectedParentTerm[this.selectedParentTerm.length - 2] && this.selectedParentTerm[this.selectedParentTerm.length - 2].id ? '-' + this.selectedParentTerm[this.selectedParentTerm.length - 1].id : ''), this.selectedParentTerm.push({
reportLatestCachedOn: previousMetadatumChildTermsLatestCachedOn id: orderedTerms[config.dataPointIndex].value,
}); label: orderedTerms[config.dataPointIndex].label
this.buildMetadatumTermsChart(); });
this.setTaxonomyTerms(this.taxonomyChildTerms);
this.setReportLatestCachedOn({
report: 'taxonomy-terms-' + (this.collectionId ? this.collectionId : 'default') + '-' + this.selectedMetadatum.id + (this.selectedParentTerm.length > 2 && this.selectedParentTerm[this.selectedParentTerm.length - 2] && this.selectedParentTerm[this.selectedParentTerm.length - 2].id ? '-' + this.selectedParentTerm[this.selectedParentTerm.length - 1].id : ''),
reportLatestCachedOn: previousMetadatumChildTermsLatestCachedOn
});
this.buildMetadatumTermsChart();
}
} }
} }
}, },
}, },
dataLabels: { dataLabels: {
enabled: true, enabled: true,
style: {
fontSize: '16px',
},
formatter: function(text, op) { formatter: function(text, op) {
return [text, op.value] return [text, op.value]
}, },
@ -760,17 +807,4 @@ export default {
background-color: white; background-color: white;
z-index: 9; z-index: 9;
} }
.child-term-placeholder {
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
min-height: 380px;
flex-direction: column;
opacity: 0.75;
p {
color: var(--tainacan-block-gray4, #555758);
}
}
</style> </style>

View File

@ -7,13 +7,13 @@
}" }"
class="postbox metadata-distribution-box"> class="postbox metadata-distribution-box">
<apexchart <apexchart
:height="100 + (chartData.totals.metadata.total * 36)" :height="100 + (chartData.totals.metadata.total * 36) > 630 ? 100 + (chartData.totals.metadata.total * 36) : 630"
:series="chartSeries" :series="chartSeries"
:options="chartOptions" /> :options="chartOptions" />
</div> </div>
<div <div
v-else v-else
style="min-height=740px" style="min-height:740px"
class="skeleton postbox metadata-distribution-box" /> class="skeleton postbox metadata-distribution-box" />
<slot /> <slot />
</div> </div>
@ -101,7 +101,7 @@ export default {
text: '' text: ''
}, },
labels: { labels: {
maxWidth: 100 maxWidth: 110
}, },
tooltip: { enabled: true } tooltip: { enabled: true }
}, },
@ -143,5 +143,6 @@ export default {
margin: 0px 0px 0.75rem 1.5rem !important; margin: 0px 0px 0.75rem 1.5rem !important;
padding-bottom: 2rem; padding-bottom: 2rem;
overflow-y: auto; overflow-y: auto;
min-height: 690px !important;
} }
</style> </style>

View File

@ -33,7 +33,7 @@
</div> </div>
<div <div
v-else v-else
style="min-height=380px" style="min-height: 390px"
class="skeleton postbox" /> class="skeleton postbox" />
<slot /> <slot />
</div> </div>
@ -120,7 +120,12 @@ export default {
hideOverlappingLabels: false hideOverlappingLabels: false
}, },
tooltip: { enabled: true } tooltip: { enabled: true }
} },
yaxis: {
title: {
text: this.$i18n.get('label_number_of_metadata')
}
},
} }
})); }));
} }

View File

@ -7,10 +7,24 @@
:series="chartSeries" :series="chartSeries"
:options="chartOptions" /> :options="chartOptions" />
<div <div
v-else v-if="!isFetchingData && !isBuildingChart && (!taxonomiesListArray || !taxonomiesListArray.length)"
style="min-height=380px" style="min-height:380px"
class="postbox">
<div class="empty-postbox-placeholder">
<p class="title is-4">
<span class="icon has-text-gray">
<i class="tainacan-icon tainacan-icon-taxonomies tainacan-icon-1-125em" />
</span>
&nbsp;{{ $i18n.get('taxonomies') }}
</p>
<br>
<p class="subtitle is-6">{{ $i18n.get('info_no_taxonomy_created') }}</p>
</div>
</div>
<div
v-if="isBuildingChart || isFetchingData"
style="min-height:380px"
class="skeleton postbox" /> class="skeleton postbox" />
<slot />
</div> </div>
</template> </template>

View File

@ -41,6 +41,30 @@ Apex.colors = [
'#454647' // Tainacan Dark Gray '#454647' // Tainacan Dark Gray
]; ];
/* Sets some locale configs */
import enLocaleConfig from 'apexcharts/dist/locales/en.json';
import esLocaleConfig from 'apexcharts/dist/locales/es.json';
import frLocaleConfig from 'apexcharts/dist/locales/fr.json';
import ptBrLocaleConfig from 'apexcharts/dist/locales/pt-br.json';
const availableLocales = ['en', 'es', 'fr', 'pt-br'];
const browserLanguage = navigator.language.toLocaleLowerCase();
if (availableLocales.indexOf(browserLanguage) >= 0) {
let localeConfig = {};
switch(browserLanguage) {
case 'es': localeConfig = esLocaleConfig; break;
case 'fr': localeConfig = frLocaleConfig; break;
case 'pt-br': localeConfig = ptBrLocaleConfig; break;
case 'en': default: localeConfig = enLocaleConfig; break;
}
Apex.chart = {
defaultLocale: browserLanguage,
locales: [ localeConfig ]
}
}
Vue.use(I18NPlugin); Vue.use(I18NPlugin);
Vue.use(UserCapabilitiesPlugin); Vue.use(UserCapabilitiesPlugin);
Vue.use(StatusHelperPlugin); Vue.use(StatusHelperPlugin);

View File

@ -218,7 +218,7 @@
class="box-last-cached-on"> class="box-last-cached-on">
<span>{{ $i18n.get('label_report_generated_on') + ': ' + new Date(activitiesLatestCachedOn).toLocaleString() }}</span> <span>{{ $i18n.get('label_report_generated_on') + ': ' + new Date(activitiesLatestCachedOn).toLocaleString() }}</span>
<button <button
@click="loadActivities(true)"> @click="loadActivities(null, true)">
<span class="screen-reader-text"> <span class="screen-reader-text">
{{ $i18n.get('label_get_latest_report') }} {{ $i18n.get('label_get_latest_report') }}
</span> </span>
@ -239,7 +239,7 @@
class="box-last-cached-on"> class="box-last-cached-on">
<span>{{ $i18n.get('label_report_generated_on') + ': ' + new Date(activitiesLatestCachedOn).toLocaleString() }}</span> <span>{{ $i18n.get('label_report_generated_on') + ': ' + new Date(activitiesLatestCachedOn).toLocaleString() }}</span>
<button <button
@click="loadActivities(true)"> @click="loadActivities(null, true)">
<span class="screen-reader-text"> <span class="screen-reader-text">
{{ $i18n.get('label_get_latest_report') }} {{ $i18n.get('label_get_latest_report') }}
</span> </span>
@ -283,7 +283,8 @@ export default {
taxonomyTerms: 'getTaxonomyTerms', taxonomyTerms: 'getTaxonomyTerms',
activities: 'getActivities', activities: 'getActivities',
taxonomyList: 'getTaxonomiesList', taxonomyList: 'getTaxonomiesList',
reportsLatestCachedOn: 'getReportsLatestCachedOn' reportsLatestCachedOn: 'getReportsLatestCachedOn',
startDate: 'getStartDate'
}), }),
isRepositoryLevel() { isRepositoryLevel() {
return !this.selectedCollection || this.selectedCollection == 'default'; return !this.selectedCollection || this.selectedCollection == 'default';
@ -377,9 +378,12 @@ export default {
.then(() => this.isFetchingMetadataList = false) .then(() => this.isFetchingMetadataList = false)
.catch(() => this.isFetchingMetadataList = false); .catch(() => this.isFetchingMetadataList = false);
}, },
loadActivities(startDate) { loadActivities(startDate, force) {
if (startDate == null)
startDate = this.startDate;
this.isFetchingActivities = true; this.isFetchingActivities = true;
this.fetchActivities({ collectionId: this.selectedCollection, startDate: startDate }) this.fetchActivities({ collectionId: this.selectedCollection, startDate: startDate, force: force })
.then(() => this.isFetchingActivities = false) .then(() => this.isFetchingActivities = false)
.catch(() => this.isFetchingActivities = false); .catch(() => this.isFetchingActivities = false);
this.activitiesStartDate = startDate; this.activitiesStartDate = startDate;

View File

@ -84,6 +84,21 @@
} }
} }
} }
.empty-postbox-placeholder {
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
min-height: 380px;
flex-direction: column;
opacity: 0.75;
p {
color: var(--tainacan-block-gray4, #555758);
}
}
.graph-mode-switch { .graph-mode-switch {
display: inline-block; display: inline-block;
button { button {

View File

@ -474,6 +474,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'label_page' => __( 'Page', 'tainacan' ), 'label_page' => __( 'Page', 'tainacan' ),
'label_current_page' => __( 'Current page', 'tainacan' ), 'label_current_page' => __( 'Current page', 'tainacan' ),
'label_shrink_menu' => __( 'Shrink menu', 'tainacan' ), 'label_shrink_menu' => __( 'Shrink menu', 'tainacan' ),
'label_expand_menu' => __( 'Expand menu', 'tainacan' ),
'label_document_uploaded' => __( 'Document uploaded', 'tainacan' ), 'label_document_uploaded' => __( 'Document uploaded', 'tainacan' ),
/* translators: Filter of the repository, not a repository of filter! */ /* translators: Filter of the repository, not a repository of filter! */
'label_repository_filter' => __( 'Repository filter', 'tainacan' ), 'label_repository_filter' => __( 'Repository filter', 'tainacan' ),
@ -542,6 +543,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'label_terms_used' => __( 'Terms used', 'tainacan' ), 'label_terms_used' => __( 'Terms used', 'tainacan' ),
'label_number_of_terms' => __( 'Number of terms', 'tainacan' ), 'label_number_of_terms' => __( 'Number of terms', 'tainacan' ),
'label_number_of_items' => __( 'Number of items', 'tainacan' ), 'label_number_of_items' => __( 'Number of items', 'tainacan' ),
'label_number_of_metadata' => __( 'Number of metadata', 'tainacan' ),
'label_usage_of_terms_per_taxonomy' => __( 'Usage of terms per taxonomy', 'tainacan' ), 'label_usage_of_terms_per_taxonomy' => __( 'Usage of terms per taxonomy', 'tainacan' ),
'label_items_per_term' => __( 'Items per term', 'tainacan' ), 'label_items_per_term' => __( 'Items per term', 'tainacan' ),
'label_items_per_term_from_taxonomy' => __( 'Items per term from taxonomy:', 'tainacan' ), 'label_items_per_term_from_taxonomy' => __( 'Items per term from taxonomy:', 'tainacan' ),
@ -576,6 +578,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'label_get_latest_report' => __( 'Get latest report', 'tainacan'), 'label_get_latest_report' => __( 'Get latest report', 'tainacan'),
'label_decrease' => __( 'Decrease', 'tainacan'), 'label_decrease' => __( 'Decrease', 'tainacan'),
'label_increase' => __( 'Increase', 'tainacan'), 'label_increase' => __( 'Increase', 'tainacan'),
'label_set_all_create_metadada' => __( 'Set every metadata to be created', 'tainacan'),
// Instructions. More complex sentences to guide user and placeholders // Instructions. More complex sentences to guide user and placeholders
'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ), 'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),
@ -857,7 +860,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'info_recaptcha_link_%s' => __( 'Remember to configure your website reCAPTCHA keys on <a href="%s" target="_blank">the item submission repository page</a>.', 'tainacan'), 'info_recaptcha_link_%s' => __( 'Remember to configure your website reCAPTCHA keys on <a href="%s" target="_blank">the item submission repository page</a>.', 'tainacan'),
'info_form_not_loaded' => __( 'There are probably not enought permissions to display it here.', 'tainacan'), 'info_form_not_loaded' => __( 'There are probably not enought permissions to display it here.', 'tainacan'),
'info_validating_slug' => __( 'Validating slug...', 'tainacan'), 'info_validating_slug' => __( 'Validating slug...', 'tainacan'),
'info_no_taxonomy_metadata_created' => __( 'No taxonomy metadata created yet', 'tainacan'),
'label_amount_of_metadata_of_type' => __( 'Amount of metadata of this type', 'tainacan'), 'label_amount_of_metadata_of_type' => __( 'Amount of metadata of this type', 'tainacan'),
'info_child_terms_chart' => __( 'Click on the term bar on the chart aside to see its child terms (if any) in this panel', 'tainacan' ), 'info_child_terms_chart' => __( 'Click on the term bar on the chart aside to see its child terms (if any) in this panel', 'tainacan' ),

View File

@ -29,7 +29,7 @@
</template> </template>
<style lang="scss"> <style lang="scss">
.modal.slides-help-modal { .tainacan-modal.slides-help-modal {
z-index: 9999999999; z-index: 9999999999;
.slides-help-modal-content { .slides-help-modal-content {

View File

@ -48,7 +48,7 @@
show: 500, show: 500,
hide: 300, hide: 300,
}, },
content: item.metadata != undefined ? renderMetadata(item.metadata, column) : '', content: item.metadata != undefined ? renderMetadata(item, column) : '',
html: true, html: true,
autoHide: false, autoHide: false,
placement: 'auto-start' placement: 'auto-start'
@ -56,7 +56,7 @@
v-for="(column, metadatumIndex) in displayedMetadata" v-for="(column, metadatumIndex) in displayedMetadata"
:key="metadatumIndex" :key="metadatumIndex"
v-if="column.display && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop == 'title')" v-if="column.display && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop == 'title')"
v-html="item.metadata != undefined && collectionId ? renderMetadata(item.metadata, column) : (item.title ? item.title :`<span class='has-text-gray3 is-italic'>` + $i18n.get('label_value_not_provided') + `</span>`)" /> v-html="item.metadata != undefined && collectionId ? renderMetadata(item, column) : (item.title ? item.title :`<span class='has-text-gray3 is-italic'>` + $i18n.get('label_value_not_provided') + `</span>`)" />
<span <span
v-if="isSlideshowViewModeEnabled" v-if="isSlideshowViewModeEnabled"
v-tooltip="{ v-tooltip="{
@ -98,10 +98,10 @@
v-for="(column, metadatumIndex) in displayedMetadata" v-for="(column, metadatumIndex) in displayedMetadata"
:key="metadatumIndex" :key="metadatumIndex"
:class="{ 'metadata-type-textarea': column.metadata_type_object.component == 'tainacan-textarea' }" :class="{ 'metadata-type-textarea': column.metadata_type_object.component == 'tainacan-textarea' }"
v-if="renderMetadata(item.metadata, column) != '' && column.display && column.slug != 'thumbnail' && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop != 'title')"> v-if="renderMetadata(item, column) != '' && column.display && column.slug != 'thumbnail' && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop != 'title')">
<h3 class="metadata-label">{{ column.name }}</h3> <h3 class="metadata-label">{{ column.name }}</h3>
<p <p
v-html="renderMetadata(item.metadata, column)" v-html="renderMetadata(item, column)"
class="metadata-value"/> class="metadata-value"/>
</span> </span>
</div> </div>

View File

@ -54,7 +54,7 @@
show: 500, show: 500,
hide: 300, hide: 300,
}, },
content: item.metadata != undefined ? renderMetadata(item.metadata, column) : '', content: item.metadata != undefined ? renderMetadata(item, column) : '',
html: true, html: true,
autoHide: false, autoHide: false,
placement: 'auto-start' placement: 'auto-start'
@ -62,7 +62,7 @@
v-for="(column, metadatumIndex) in displayedMetadata" v-for="(column, metadatumIndex) in displayedMetadata"
:key="metadatumIndex" :key="metadatumIndex"
v-if="column.display && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop == 'title')" v-if="column.display && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop == 'title')"
v-html="item.metadata != undefined && collectionId ? renderMetadata(item.metadata, column) : (item.title ? item.title :`<span class='has-text-gray3 is-italic'>` + $i18n.get('label_value_not_provided') + `</span>`)" /> v-html="item.metadata != undefined && collectionId ? renderMetadata(item, column) : (item.title ? item.title :`<span class='has-text-gray3 is-italic'>` + $i18n.get('label_value_not_provided') + `</span>`)" />
<span <span
v-if="isSlideshowViewModeEnabled" v-if="isSlideshowViewModeEnabled"
v-tooltip="{ v-tooltip="{
@ -108,10 +108,10 @@
v-for="(column, metadatumIndex) in displayedMetadata" v-for="(column, metadatumIndex) in displayedMetadata"
:key="metadatumIndex" :key="metadatumIndex"
:class="{ 'metadata-type-textarea': column.metadata_type_object.component == 'tainacan-textarea' }" :class="{ 'metadata-type-textarea': column.metadata_type_object.component == 'tainacan-textarea' }"
v-if="renderMetadata(item.metadata, column) != '' && column.display && column.slug != 'thumbnail' && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop != 'title')"> v-if="renderMetadata(item, column) != '' && column.display && column.slug != 'thumbnail' && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop != 'title')">
<h3 class="metadata-label">{{ column.name }}</h3> <h3 class="metadata-label">{{ column.name }}</h3>
<p <p
v-html="renderMetadata(item.metadata, column)" v-html="renderMetadata(item, column)"
class="metadata-value"/> class="metadata-value"/>
</span> </span>
</div> </div>
@ -164,7 +164,6 @@ export default {
} }
}, },
mounted() { mounted() {
if (this.$refs.masonryWrapper != undefined && if (this.$refs.masonryWrapper != undefined &&
this.$refs.masonryWrapper.children[0] != undefined && this.$refs.masonryWrapper.children[0] != undefined &&
this.$refs.masonryWrapper.children[0].children[0] != undefined && this.$refs.masonryWrapper.children[0].children[0] != undefined &&

View File

@ -625,7 +625,7 @@ export default {
width: 680, width: 680,
ariaRole: 'alertdialog', ariaRole: 'alertdialog',
ariaModal: true, ariaModal: true,
customClass: 'slides-help-modal', customClass: 'tainacan-modal slides-help-modal',
onCancel: () => { onCancel: () => {
setTimeout(() => document.documentElement.classList.add('is-clipped'), 500); setTimeout(() => document.documentElement.classList.add('is-clipped'), 500);
} }

View File

@ -44,8 +44,18 @@ export const viewModesMixin = {
} }
return itemUrl; return itemUrl;
}, },
renderMetadata(itemMetadata, metadatum) { renderMetadata(item, metadatum) {
let metadata = (itemMetadata && itemMetadata[metadatum.slug] != undefined) ? itemMetadata[metadatum.slug] : false; let metadata = false;
if (item && item.metadata && item.metadata[metadatum.slug] != undefined)
metadata = item.metadata[metadatum.slug]
else if (metadatum &&
metadatum.metadata_type_object &&
metadatum.metadata_type_object.core &&
metadatum.metadata_type_object.related_mapped_prop &&
item[metadatum.metadata_type_object.related_mapped_prop]
) {
return item[metadatum.metadata_type_object.related_mapped_prop];
}
if (!metadata) if (!metadata)
return ''; return '';

View File

@ -410,7 +410,7 @@
:auto-focus="filtersAsModal" :auto-focus="filtersAsModal"
:trap-focus="filtersAsModal" :trap-focus="filtersAsModal"
full-screen full-screen
:custom-class="'tainacan-form filters-menu' + (filtersAsModal ? ' filters-menu-modal' : '')" :custom-class="'tainacan-modal tainacan-form filters-menu' + (filtersAsModal ? ' filters-menu-modal' : '')"
:can-cancel="hideHideFiltersButton || !filtersAsModal ? ['x', 'outside'] : ['x', 'escape', 'outside']"> :can-cancel="hideHideFiltersButton || !filtersAsModal ? ['x', 'outside'] : ['x', 'escape', 'outside']">
<filters-items-list <filters-items-list
:is-loading-items="isLoadingItems" :is-loading-items="isLoadingItems"
@ -879,7 +879,8 @@
collectionId: this.collectionId, collectionId: this.collectionId,
totalItems: this.totalItems totalItems: this.totalItems
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
updateSearch() { updateSearch() {
@ -1171,7 +1172,8 @@
showNeverShowAgainOption: offerCheckbox && tainacan_plugin.user_caps != undefined && Object.keys(tainacan_plugin.user_caps).length != undefined && Object.keys(tainacan_plugin.user_caps).length > 0, showNeverShowAgainOption: offerCheckbox && tainacan_plugin.user_caps != undefined && Object.keys(tainacan_plugin.user_caps).length != undefined && Object.keys(tainacan_plugin.user_caps).length > 0,
messageKeyForUserPrefs: 'ItemsHiddenDueSorting' messageKeyForUserPrefs: 'ItemsHiddenDueSorting'
}, },
trapFocus: true trapFocus: true,
customClass: 'tainacan-modal'
}); });
}, },
hideFiltersOnMobile: _.debounce( function() { hideFiltersOnMobile: _.debounce( function() {
@ -1232,12 +1234,12 @@
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
z-index: 999999999; z-index: 999999999;
background-color: var(--tainacan-black); background-color: var(--tainacan-black) !important;
transition: background-color 0.3s ease, width 0.3s ease, height 0.3s ease; transition: background-color 0.3s ease, width 0.3s ease, height 0.3s ease;
animation: open-full-screen 0.4s ease; animation: open-full-screen 0.4s ease;
.filters-menu { .filters-menu {
display: none; display: none !important;
} }
.metadata-alert { .metadata-alert {
position: absolute; position: absolute;
@ -1606,6 +1608,7 @@
padding-left: var(--tainacan-one-column); padding-left: var(--tainacan-one-column);
padding-right: var(--tainacan-one-column); padding-right: var(--tainacan-one-column);
min-height: 50vh; min-height: 50vh;
margin-top: 12px;
//height: calc(100% - 82px); //height: calc(100% - 82px);
} }

Some files were not shown because too many files have changed in this diff Show More