Continues migration to Vue 3. #794.
This commit is contained in:
parent
84fa0e3f2c
commit
8ff5470145
|
@ -1626,9 +1626,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ntohq/buefy-next": {
|
"@ntohq/buefy-next": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@ntohq/buefy-next/-/buefy-next-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@ntohq/buefy-next/-/buefy-next-0.1.2.tgz",
|
||||||
"integrity": "sha512-5ZX1S9bhLqPFEmkmZeaUCRg289Ui/k3mT2qKQQ2p8ihTTCsW2ozXTcpcV3wmwsf81kPjT90ykU18u2ve92M2fA==",
|
"integrity": "sha512-CrPNKDC9aqFEk2rAmIk0sLPwXOnfPCx9Vi/QzU1shxYoDUox+7FOBFzv+TCLkuS3HQHkK5qESN6O1CfMx8BMyw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "7.18.9",
|
"@babel/runtime": "7.18.9",
|
||||||
"bulma": "0.9.4"
|
"bulma": "0.9.4"
|
||||||
|
@ -2223,6 +2223,11 @@
|
||||||
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
|
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@yr/monotone-cubic-spline": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@yr/monotone-cubic-spline/-/monotone-cubic-spline-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA=="
|
||||||
|
},
|
||||||
"abbrev": {
|
"abbrev": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||||
|
@ -2385,10 +2390,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apexcharts": {
|
"apexcharts": {
|
||||||
"version": "3.41.0",
|
"version": "3.42.0",
|
||||||
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.41.0.tgz",
|
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.42.0.tgz",
|
||||||
"integrity": "sha512-FJXA7NVjxs1q+ptR3b1I+pN8K/gWuXn+qLZjFz8EHvJOokdgcuwa/HSe5aC465HW/LWnrjWLSTsOQejQbQ42hQ==",
|
"integrity": "sha512-hYhzZqh2Efny9uiutkGU2M/EarJ4Nn8s6dxZ0C7E7N+SV4d1xjTioXi2NLn4UKVJabZkb3HnpXDoumXgtAymwg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@yr/monotone-cubic-spline": "^1.0.3",
|
||||||
"svg.draggable.js": "^2.2.2",
|
"svg.draggable.js": "^2.2.2",
|
||||||
"svg.easing.js": "^2.0.0",
|
"svg.easing.js": "^2.0.0",
|
||||||
"svg.filter.js": "^2.0.2",
|
"svg.filter.js": "^2.0.2",
|
||||||
|
@ -2476,9 +2482,9 @@
|
||||||
"integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg=="
|
"integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg=="
|
||||||
},
|
},
|
||||||
"axios": {
|
"axios": {
|
||||||
"version": "1.4.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz",
|
||||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
"integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"follow-redirects": "^1.15.0",
|
"follow-redirects": "^1.15.0",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
|
@ -3107,9 +3113,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"countup.js": {
|
"countup.js": {
|
||||||
"version": "2.7.0",
|
"version": "2.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.8.0.tgz",
|
||||||
"integrity": "sha512-IP9nYLGgW//0If73eXQdFlReGhpFGHaStqB1v82FknxnUWueF6HFuuOXySW4sEDMc88PsZL1EOn/NPkfTZalmQ=="
|
"integrity": "sha512-f7xEhX0awl4NOElHulrl4XRfKoNH3rB+qfNSZZyjSZhaAoUk6elvhH+MNxMmlmuUJ2/QNTWPSA7U4mNtIAKljQ=="
|
||||||
},
|
},
|
||||||
"cross-env": {
|
"cross-env": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
|
@ -5582,9 +5588,9 @@
|
||||||
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="
|
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="
|
||||||
},
|
},
|
||||||
"photoswipe": {
|
"photoswipe": {
|
||||||
"version": "5.3.8",
|
"version": "5.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.4.1.tgz",
|
||||||
"integrity": "sha512-4vTzOQt8GP4Chsm0s+8j2xDtVHAEN252PxrU12A1zXauNn0zD5HRHgjALKO2GKTyBnTnOrJUOxbV8LTrFIMrYw=="
|
"integrity": "sha512-iauO0fP4oMdZvjlXzeIe8um1fZatkGE0bqdoIwpb65jlo/KK1KhfD7Z51+0YhS2tC4FOoOtE1p0c4o/HbY1s2Q=="
|
||||||
},
|
},
|
||||||
"picocolors": {
|
"picocolors": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
|
10
package.json
10
package.json
|
@ -8,15 +8,15 @@
|
||||||
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ntohq/buefy-next": "^0.1.1",
|
"@ntohq/buefy-next": "^0.1.2",
|
||||||
"@vue-leaflet/vue-leaflet": "^0.10.1",
|
"@vue-leaflet/vue-leaflet": "^0.10.1",
|
||||||
"another-vue3-blurhash": "^0.0.1",
|
"another-vue3-blurhash": "^0.0.1",
|
||||||
"apexcharts": "^3.41.0",
|
"apexcharts": "^3.42.0",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.5.0",
|
||||||
"blurhash": "^2.0.5",
|
"blurhash": "^2.0.5",
|
||||||
"bulma": "^0.9.4",
|
"bulma": "^0.9.4",
|
||||||
"conditioner-core": "^2.3.3",
|
"conditioner-core": "^2.3.3",
|
||||||
"countup.js": "^2.7.0",
|
"countup.js": "^2.8.0",
|
||||||
"css-vars-ponyfill": "^2.4.8",
|
"css-vars-ponyfill": "^2.4.8",
|
||||||
"floating-vue": "^2.0.0-beta.24",
|
"floating-vue": "^2.0.0-beta.24",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"node-sass": "^7.0.3",
|
"node-sass": "^7.0.3",
|
||||||
"photoswipe": "^5.3.8",
|
"photoswipe": "^5.4.1",
|
||||||
"qs": "^6.11.2",
|
"qs": "^6.11.2",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
|
|
|
@ -288,9 +288,17 @@
|
||||||
:root {
|
:root {
|
||||||
/*
|
/*
|
||||||
--swiper-pagination-color: var(--swiper-theme-color);
|
--swiper-pagination-color: var(--swiper-theme-color);
|
||||||
|
--swiper-pagination-left: auto;
|
||||||
|
--swiper-pagination-right: 8px;
|
||||||
|
--swiper-pagination-bottom: 8px;
|
||||||
|
--swiper-pagination-top: auto;
|
||||||
|
--swiper-pagination-fraction-color: inherit;
|
||||||
|
--swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);
|
||||||
|
--swiper-pagination-progressbar-size: 4px;
|
||||||
--swiper-pagination-bullet-size: 8px;
|
--swiper-pagination-bullet-size: 8px;
|
||||||
--swiper-pagination-bullet-width: 8px;
|
--swiper-pagination-bullet-width: 8px;
|
||||||
--swiper-pagination-bullet-height: 8px;
|
--swiper-pagination-bullet-height: 8px;
|
||||||
|
--swiper-pagination-bullet-border-radius: 50%;
|
||||||
--swiper-pagination-bullet-inactive-color: #000;
|
--swiper-pagination-bullet-inactive-color: #000;
|
||||||
--swiper-pagination-bullet-inactive-opacity: 0.2;
|
--swiper-pagination-bullet-inactive-opacity: 0.2;
|
||||||
--swiper-pagination-bullet-opacity: 1;
|
--swiper-pagination-bullet-opacity: 1;
|
||||||
|
@ -313,7 +321,8 @@
|
||||||
.swiper-pagination-custom,
|
.swiper-pagination-custom,
|
||||||
.swiper-horizontal > .swiper-pagination-bullets,
|
.swiper-horizontal > .swiper-pagination-bullets,
|
||||||
.swiper-pagination-bullets.swiper-pagination-horizontal {
|
.swiper-pagination-bullets.swiper-pagination-horizontal {
|
||||||
bottom: 10px;
|
bottom: var(--swiper-pagination-bottom, 8px);
|
||||||
|
top: var(--swiper-pagination-top, auto);
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
|
||||||
|
@ -341,7 +350,7 @@
|
||||||
width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
|
width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
|
||||||
height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
|
height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border-radius: 50%;
|
border-radius: var(--swiper-pagination-bullet-border-radius, 50%);
|
||||||
background: var(--swiper-pagination-bullet-inactive-color, #000);
|
background: var(--swiper-pagination-bullet-inactive-color, #000);
|
||||||
opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); }
|
opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); }
|
||||||
button.swiper-pagination-bullet {
|
button.swiper-pagination-bullet {
|
||||||
|
@ -361,7 +370,8 @@
|
||||||
|
|
||||||
.swiper-vertical > .swiper-pagination-bullets,
|
.swiper-vertical > .swiper-pagination-bullets,
|
||||||
.swiper-pagination-vertical.swiper-pagination-bullets {
|
.swiper-pagination-vertical.swiper-pagination-bullets {
|
||||||
right: 10px;
|
right: var(--swiper-pagination-right, 8px);
|
||||||
|
left: var(--swiper-pagination-left, auto);
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate3d(0px, -50%, 0); }
|
transform: translate3d(0px, -50%, 0); }
|
||||||
.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,
|
.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,
|
||||||
|
@ -393,9 +403,13 @@
|
||||||
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
||||||
transition: 200ms transform, 200ms right; }
|
transition: 200ms transform, 200ms right; }
|
||||||
|
|
||||||
|
/* Fraction */
|
||||||
|
.swiper-pagination-fraction {
|
||||||
|
color: var(--swiper-pagination-fraction-color, inherit); }
|
||||||
|
|
||||||
/* Progress */
|
/* Progress */
|
||||||
.swiper-pagination-progressbar {
|
.swiper-pagination-progressbar {
|
||||||
background: rgba(0, 0, 0, 0.25);
|
background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));
|
||||||
position: absolute; }
|
position: absolute; }
|
||||||
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
||||||
background: var(--swiper-pagination-color, var(--swiper-theme-color));
|
background: var(--swiper-pagination-color, var(--swiper-theme-color));
|
||||||
|
@ -410,11 +424,11 @@
|
||||||
transform-origin: right top; }
|
transform-origin: right top; }
|
||||||
.swiper-horizontal > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-horizontal, .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {
|
.swiper-horizontal > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-horizontal, .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 4px;
|
height: var(--swiper-pagination-progressbar-size, 4px);
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0; }
|
top: 0; }
|
||||||
.swiper-vertical > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-vertical, .swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {
|
.swiper-vertical > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-vertical, .swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {
|
||||||
width: 4px;
|
width: var(--swiper-pagination-progressbar-size, 4px);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0; }
|
top: 0; }
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -704,7 +704,7 @@ export default {
|
||||||
mixins: [ wpAjax, formHooks ],
|
mixins: [ wpAjax, formHooks ],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
collection: null,
|
collection: null,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
form: {
|
form: {
|
||||||
|
|
|
@ -775,10 +775,10 @@ export default {
|
||||||
swiper: {},
|
swiper: {},
|
||||||
selected: 'Home',
|
selected: 'Home',
|
||||||
pageTitle: '',
|
pageTitle: '',
|
||||||
itemId: Number,
|
itemId: [String, Number],
|
||||||
item: {},
|
item: {},
|
||||||
itemRequestCancel: undefined,
|
itemRequestCancel: undefined,
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
sequenceId: Number,
|
sequenceId: Number,
|
||||||
itemPosition: Number,
|
itemPosition: Number,
|
||||||
isCreatingNewItem: false,
|
isCreatingNewItem: false,
|
||||||
|
@ -790,7 +790,7 @@ export default {
|
||||||
metadataSectionCollapses: [],
|
metadataSectionCollapses: [],
|
||||||
collapseAll: true,
|
collapseAll: true,
|
||||||
form: {
|
form: {
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
status: '',
|
status: '',
|
||||||
document: '',
|
document: '',
|
||||||
document_type: '',
|
document_type: '',
|
||||||
|
@ -831,6 +831,7 @@ export default {
|
||||||
},
|
},
|
||||||
itemMetadata() {
|
itemMetadata() {
|
||||||
const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata()));
|
const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata()));
|
||||||
|
console.log(realItemMetadata)
|
||||||
const tweakedItemMetadata = realItemMetadata.map((anItemMetadatum) => {
|
const tweakedItemMetadata = realItemMetadata.map((anItemMetadatum) => {
|
||||||
|
|
||||||
// We need this because repository level metadata have an array of section IDs
|
// We need this because repository level metadata have an array of section IDs
|
||||||
|
|
|
@ -188,7 +188,7 @@ import ItemCreationStatusDialog from '../other/item-creation-status-dialog.vue';
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
status: String,
|
status: String,
|
||||||
collectionId: Number|String,
|
collectionId: [Number, String],
|
||||||
isOnSequenceEdit: Boolean,
|
isOnSequenceEdit: Boolean,
|
||||||
isCurrentItemOnSequenceEdit: Boolean,
|
isCurrentItemOnSequenceEdit: Boolean,
|
||||||
hasNextItemOnSequenceEdit: Boolean,
|
hasNextItemOnSequenceEdit: Boolean,
|
||||||
|
|
|
@ -318,7 +318,7 @@
|
||||||
this.form = {};
|
this.form = {};
|
||||||
this.formErrors = {};
|
this.formErrors = {};
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
@ -350,7 +350,7 @@
|
||||||
.then((term) => {
|
.then((term) => {
|
||||||
this.formErrors = {};
|
this.formErrors = {};
|
||||||
this.$emit('onEditionFinished', { term: term, hasChangedParent: this.hasChangedParent, initialParent: this.initialParentId });
|
this.$emit('onEditionFinished', { term: term, hasChangedParent: this.hasChangedParent, initialParent: this.initialParentId });
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
|
@ -363,7 +363,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancelEdition() {
|
cancelEdition() {
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
},
|
},
|
||||||
deleteHeaderImage() {
|
deleteHeaderImage() {
|
||||||
this.form = Object.assign({},
|
this.form = Object.assign({},
|
||||||
|
|
|
@ -75,7 +75,6 @@
|
||||||
mixins: [ filterTypeMixin ],
|
mixins: [ filterTypeMixin ],
|
||||||
props: {
|
props: {
|
||||||
isRepositoryLevel: Boolean,
|
isRepositoryLevel: Boolean,
|
||||||
currentCollectionId: String,
|
|
||||||
filtersAsModal: Boolean
|
filtersAsModal: Boolean
|
||||||
},
|
},
|
||||||
emits: [
|
emits: [
|
||||||
|
|
|
@ -558,7 +558,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
hasSomeMetadataTypeFilterApplied() {
|
hasSomeMetadataTypeFilterApplied() {
|
||||||
return this.metadataTypeFilterOptions.length && this.metadataTypeFilterOptions.some((metadatumType) => metadatumType.enabled);
|
return this.metadataTypeFilterOptions.length > 0 && this.metadataTypeFilterOptions.some((metadatumType) => metadatumType.enabled);
|
||||||
},
|
},
|
||||||
activeMetadataSectionsList: {
|
activeMetadataSectionsList: {
|
||||||
get() {
|
get() {
|
||||||
|
|
|
@ -160,7 +160,7 @@
|
||||||
isLoading: Boolean,
|
isLoading: Boolean,
|
||||||
isEditable: Boolean,
|
isEditable: Boolean,
|
||||||
itemId: String,
|
itemId: String,
|
||||||
collectionId: String,
|
collectionId: [String, Number],
|
||||||
isMobileScreen: Boolean
|
isMobileScreen: Boolean
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -316,7 +316,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
hasSomeMetadataTypeFilterApplied() {
|
hasSomeMetadataTypeFilterApplied() {
|
||||||
return this.metadataTypeFilterOptions.length && this.metadataTypeFilterOptions.some((metadatumType) => metadatumType.enabled);
|
return this.metadataTypeFilterOptions.length > 0 && this.metadataTypeFilterOptions.some((metadatumType) => metadatumType.enabled);
|
||||||
},
|
},
|
||||||
activeMetadatumList: {
|
activeMetadatumList: {
|
||||||
get() {
|
get() {
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
<!-- Hierarchical lists -->
|
<!-- Hierarchical lists -->
|
||||||
<transition-group
|
<transition-group
|
||||||
|
tag="div"
|
||||||
class="tainacan-hierarchical-list-columns-container"
|
class="tainacan-hierarchical-list-columns-container"
|
||||||
name="page-left"
|
name="page-left"
|
||||||
ref="tainacan-finder-scrolling-container">
|
ref="tainacan-finder-scrolling-container">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<b-input
|
<!-- <b-input
|
||||||
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:custom-class="isInvalidDate && dateValue ? 'is-danger' : ''"
|
:custom-class="isInvalidDate && dateValue ? 'is-danger' : ''"
|
||||||
|
@ -10,6 +10,17 @@
|
||||||
@update:model-value="onInput"
|
@update:model-value="onInput"
|
||||||
@blur="onBlur"
|
@blur="onBlur"
|
||||||
@focus="onMobileSpecialFocus"
|
@focus="onMobileSpecialFocus"
|
||||||
|
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : dateFormat.toLowerCase()" /> -->
|
||||||
|
<!-- TODO: FIX IMASK -->
|
||||||
|
<b-input
|
||||||
|
:id="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
|
||||||
|
:disabled="disabled"
|
||||||
|
:custom-class="isInvalidDate && dateValue ? 'is-danger' : ''"
|
||||||
|
type="text"
|
||||||
|
v-model="dateValue"
|
||||||
|
@update:model-value="onInput"
|
||||||
|
@blur="onBlur"
|
||||||
|
@focus="onMobileSpecialFocus"
|
||||||
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : dateFormat.toLowerCase()" />
|
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : dateFormat.toLowerCase()" />
|
||||||
<p
|
<p
|
||||||
v-if="isInvalidDate && dateValue"
|
v-if="isInvalidDate && dateValue"
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.map_provider ? this.itemMetadatum.metadatum.metadata_type_options.map_provider : 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
|
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.map_provider ? this.itemMetadatum.metadatum.metadata_type_options.map_provider : 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||||
},
|
},
|
||||||
initialZoom() {
|
initialZoom() {
|
||||||
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.initial_zoom ? this.itemMetadatum.metadatum.metadata_type_options.initial_zoom : 5;
|
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.initial_zoom ? Number(this.itemMetadatum.metadatum.metadata_type_options.initial_zoom) : 5;
|
||||||
},
|
},
|
||||||
maxZoom() {
|
maxZoom() {
|
||||||
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.maximum_zoom ? this.itemMetadatum.metadatum.metadata_type_options.maximum_zoom : 12;
|
return this.itemMetadatum && this.itemMetadatum.metadatum.metadata_type_options && this.itemMetadatum.metadatum.metadata_type_options.maximum_zoom ? this.itemMetadatum.metadatum.metadata_type_options.maximum_zoom : 12;
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
},
|
},
|
||||||
shouldAddMore() {
|
shouldAddMore() {
|
||||||
// MaxTags value may come from a preset prop (bulk adition, for example) or from the actual maxMultipleValues setting.
|
// MaxTags value may come from a preset prop (bulk adition, for example) or from the actual maxMultipleValues setting.
|
||||||
const hasMaxTagsValue = ( this.maxtags != undefined ? this.maxtags : (this.itemMetadatum.metadatum.multiple == 'yes' || this.allowNew === true ? (this.maxMultipleValues !== undefined ? this.maxMultipleValues : null) : '1') );
|
const hasMaxTagsValue = ( this.maxtags != undefined ? this.maxtags : (this.itemMetadatum.metadatum.multiple == 'yes' ? (this.maxMultipleValues !== undefined ? this.maxMultipleValues : null) : '1') );
|
||||||
// For multivalued metadata without maxMultipleValues, the limit is infinet, so we should let add anyway.
|
// For multivalued metadata without maxMultipleValues, the limit is infinet, so we should let add anyway.
|
||||||
return (hasMaxTagsValue !== null ? (this.selected.length < hasMaxTagsValue) : true);
|
return (hasMaxTagsValue !== null ? (this.selected.length < hasMaxTagsValue) : true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
:is-metadata-navigation="isMetadataNavigation" />
|
:is-metadata-navigation="isMetadataNavigation" />
|
||||||
<template v-if="isMultiple && values.length > 1">
|
<template v-if="isMultiple && values.length > 1">
|
||||||
<transition-group
|
<transition-group
|
||||||
|
tag="div"
|
||||||
name="filter-item"
|
name="filter-item"
|
||||||
class="multiple-inputs">
|
class="multiple-inputs">
|
||||||
<template
|
<template
|
||||||
|
|
|
@ -83,13 +83,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TainacanTaxonomyTagInput from './TaxonomyTaginput.vue';
|
import TaxonomyTagInput from './TaxonomyTaginput.vue';
|
||||||
import CheckboxRadioMetadataInput from '../../other/checkbox-radio-metadata-input.vue';
|
import CheckboxRadioMetadataInput from '../../other/checkbox-radio-metadata-input.vue';
|
||||||
import { tainacan as axios } from '../../../js/axios.js';
|
import { tainacan as axios } from '../../../js/axios.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
TainacanTaxonomyTagInput,
|
TaxonomyTagInput,
|
||||||
CheckboxRadioMetadataInput
|
CheckboxRadioMetadataInput
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -551,7 +551,7 @@
|
||||||
<button
|
<button
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">
|
@click="$emit('close')">
|
||||||
{{ $i18n.get('close') }}
|
{{ $i18n.get('close') }}
|
||||||
</button>
|
</button>
|
||||||
<div class="buttons is-pulled-right">
|
<div class="buttons is-pulled-right">
|
||||||
|
@ -590,7 +590,7 @@
|
||||||
|
|
||||||
<!-- <button
|
<!-- <button
|
||||||
v-if="activity.status == 'publish'"
|
v-if="activity.status == 'publish'"
|
||||||
@click="$parent.close()"
|
@click="$emit('close')"
|
||||||
type="button"
|
type="button"
|
||||||
class="button is-secondary">
|
class="button is-secondary">
|
||||||
<span>OK</span>
|
<span>OK</span>
|
||||||
|
@ -670,7 +670,7 @@
|
||||||
'$route': {
|
'$route': {
|
||||||
handler(to, from) {
|
handler(to, from) {
|
||||||
if (to !== from)
|
if (to !== from)
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
id="button-cancel-exporter-selection"
|
id="button-cancel-exporter-selection"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close();">
|
@click="$emit('close');">
|
||||||
{{ $i18n.get('cancel') }}</button>
|
{{ $i18n.get('cancel') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
]),
|
]),
|
||||||
onSelectExporter(exporterType) {
|
onSelectExporter(exporterType) {
|
||||||
this.$router.push({ path: this.$routerHelper.getExporterEditionPath(exporterType.slug), query: { sourceCollection: this.sourceCollection } });
|
this.$router.push({ path: this.$routerHelper.getExporterEditionPath(exporterType.slug), query: { sourceCollection: this.sourceCollection } });
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<button
|
<button
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">Close</button>
|
@click="$emit('close')">Close</button>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="control">
|
<!-- <div class="control">
|
||||||
<button class="button is-success">Confirm</button>
|
<button class="button is-success">Confirm</button>
|
||||||
|
@ -87,7 +87,7 @@ export default {
|
||||||
]),
|
]),
|
||||||
onSelectImporter(importerType) {
|
onSelectImporter(importerType) {
|
||||||
this.$router.push({ path: this.$routerHelper.getImporterEditionPath(importerType.slug), query: { targetCollection: this.targetCollection } });
|
this.$router.push({ path: this.$routerHelper.getImporterEditionPath(importerType.slug), query: { targetCollection: this.targetCollection } });
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
:disabled="!!bulkEditionProcedures[criterion].metadatum || metadataIsLoading"
|
:disabled="!!bulkEditionProcedures[criterion].metadatum || metadataIsLoading"
|
||||||
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-not-last"
|
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-not-last"
|
||||||
:placeholder="$i18n.get('instruction_select_a_metadatum')"
|
:placeholder="$i18n.get('instruction_select_a_metadatum')"
|
||||||
|
inherit-attrs="false"
|
||||||
@update:model-value="addToBulkEditionProcedures($event, 'metadatum', criterion)">
|
@update:model-value="addToBulkEditionProcedures($event, 'metadatum', criterion)">
|
||||||
<template
|
<template
|
||||||
v-for="(metadatum, index) in metadata"
|
v-for="(metadatum, index) in metadata"
|
||||||
|
@ -292,7 +293,7 @@
|
||||||
<footer class="field is-grouped form-submit">
|
<footer class="field is-grouped form-submit">
|
||||||
<p class="control">
|
<p class="control">
|
||||||
<button
|
<button
|
||||||
@click="$eventBusSearch.loadItems(); $parent.close()"
|
@click="$eventBusSearch.loadItems(); $emit('close')"
|
||||||
:disabled="(Object.keys(bulkEditionProcedures).length &&
|
:disabled="(Object.keys(bulkEditionProcedures).length &&
|
||||||
bulkEditionProcedures[editionCriteria[editionCriteria.length-1]].isExecuting) || false"
|
bulkEditionProcedures[editionCriteria[editionCriteria.length-1]].isExecuting) || false"
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -305,7 +306,7 @@
|
||||||
:disabled="dones.every((item) => item === true) === false"
|
:disabled="dones.every((item) => item === true) === false"
|
||||||
class="button is-success"
|
class="button is-success"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$root.$emit('openProcessesPopup'); $eventBusSearch.loadItems(); $parent.close();">
|
@click="$root.$emit('openProcessesPopup'); $eventBusSearch.loadItems(); $emit('close');">
|
||||||
{{ $i18n.get('finish') }}
|
{{ $i18n.get('finish') }}
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
@ -324,7 +325,7 @@
|
||||||
totalItems: Array,
|
totalItems: Array,
|
||||||
objectType: String,
|
objectType: String,
|
||||||
selectedForBulk: Object,
|
selectedForBulk: Object,
|
||||||
collectionId: Number
|
collectionId: [String, Number]
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
id="button-cancel-importer-edition"
|
id="button-cancel-importer-edition"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">
|
@click="$emit('close')">
|
||||||
{{ $i18n.get('exit') }}</button>
|
{{ $i18n.get('exit') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
:key="metadatumMapper.slug">
|
:key="metadatumMapper.slug">
|
||||||
<button
|
<button
|
||||||
class="collection-creation-option"
|
class="collection-creation-option"
|
||||||
@click="$router.push($routerHelper.getNewMappedCollectionPath(metadatumMapper.slug)); $parent.close();"
|
@click="$router.push($routerHelper.getNewMappedCollectionPath(metadatumMapper.slug)); $emit('close');"
|
||||||
v-if="metadatumMapper.metadata != false"
|
v-if="metadatumMapper.metadata != false"
|
||||||
aria-role="listitem">
|
aria-role="listitem">
|
||||||
<h3>{{ metadatumMapper.name }}</h3>
|
<h3>{{ metadatumMapper.name }}</h3>
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
<button
|
<button
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">{{ $i18n.get('close') }}</button>
|
@click="$emit('close')">{{ $i18n.get('close') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</section>
|
</section>
|
||||||
|
@ -187,7 +187,7 @@ export default {
|
||||||
});
|
});
|
||||||
this.isCreatingCollectionPreset = false;
|
this.isCreatingCollectionPreset = false;
|
||||||
this.$router.push(this.$routerHelper.getCollectionsPath());
|
this.$router.push(this.$routerHelper.getCollectionsPath());
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
})
|
})
|
||||||
.catch((error) =>{
|
.catch((error) =>{
|
||||||
if (typeof collectionPreset.onError === 'function') {
|
if (typeof collectionPreset.onError === 'function') {
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
<button
|
<button
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">Close</button>
|
@click="$emit('close')">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</section>
|
</section>
|
||||||
|
@ -92,7 +92,7 @@ export default {
|
||||||
]),
|
]),
|
||||||
onSelectCollection(collection) {
|
onSelectCollection(collection) {
|
||||||
this.$router.push(this.$routerHelper.getNewItemPath(collection.id));
|
this.$router.push(this.$routerHelper.getNewItemPath(collection.id));
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,7 +236,7 @@
|
||||||
<button
|
<button
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">Close</button>
|
@click="$emit('close')">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</section>
|
</section>
|
||||||
|
@ -260,9 +260,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
totalItems: Number,
|
totalItems: Number,
|
||||||
itemId: Number,
|
itemId: [String, Number],
|
||||||
itemURL: String,
|
itemURL: String,
|
||||||
selectedItems: Array
|
selectedItems: Array
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,14 +17,14 @@
|
||||||
id="button-cancel-text-content-writing"
|
id="button-cancel-text-content-writing"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$emit('cancelTextWriting');$parent.close();">
|
@click="$emit('cancelTextWriting');$emit('close');">
|
||||||
{{ $i18n.get('cancel') }}</button>
|
{{ $i18n.get('cancel') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
id="button-submit-text-content-writing"
|
id="button-submit-text-content-writing"
|
||||||
type="submit"
|
type="submit"
|
||||||
@click.prevent="confirmTextWriting();$parent.close();"
|
@click.prevent="confirmTextWriting();$emit('close');"
|
||||||
class="button is-success">
|
class="button is-success">
|
||||||
{{ $i18n.get('save') }}</button>
|
{{ $i18n.get('save') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -67,13 +67,13 @@
|
||||||
id="button-cancel-url-link-selection"
|
id="button-cancel-url-link-selection"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">
|
@click="$emit('close')">
|
||||||
{{ $i18n.get('cancel') }}</button>
|
{{ $i18n.get('cancel') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
id="button-submit-url-link-selection"
|
id="button-submit-url-link-selection"
|
||||||
@click.prevent="confirmURLSelection();$parent.close();"
|
@click.prevent="confirmURLSelection();$emit('close');"
|
||||||
class="button is-success">
|
class="button is-success">
|
||||||
{{ $i18n.get('save') }}</button>
|
{{ $i18n.get('save') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
</li>
|
</li>
|
||||||
<li v-if="!$adminOptions.hidePrimaryMenuItemsButton">
|
<li v-if="!$adminOptions.hidePrimaryMenuItemsButton">
|
||||||
<router-link
|
<router-link
|
||||||
:to="$routerHelper.getItemsPath()"
|
:to="{name: 'RepositoryItemsPage' }"
|
||||||
:class="activeRoute == 'ItemsPage' ? 'is-active':''">
|
:class="activeRoute == 'RepositoryItemsPage' ? 'is-active':''">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-items"/>
|
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-items"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -168,7 +168,8 @@
|
||||||
<transition-group
|
<transition-group
|
||||||
v-if="!isSearching && isTaxonomy"
|
v-if="!isSearching && isTaxonomy"
|
||||||
class="modal-card-body tainacan-finder-columns-container"
|
class="modal-card-body tainacan-finder-columns-container"
|
||||||
name="page-left">
|
name="page-left"
|
||||||
|
tag="div">
|
||||||
<div
|
<div
|
||||||
v-for="(finderColumn, key) in finderColumns"
|
v-for="(finderColumn, key) in finderColumns"
|
||||||
class="tainacan-finder-column"
|
class="tainacan-finder-column"
|
||||||
|
@ -304,7 +305,7 @@
|
||||||
<button
|
<button
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">{{ $i18n.get('cancel') }}
|
@click="$emit('close')">{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
@ -329,14 +330,14 @@
|
||||||
mixins: [ dynamicFilterTypeMixin ],
|
mixins: [ dynamicFilterTypeMixin ],
|
||||||
props: {
|
props: {
|
||||||
filter: '',
|
filter: '',
|
||||||
parent: Number,
|
parent: [Number, String],
|
||||||
taxonomy_id: Number,
|
taxonomy_id: [Number, String],
|
||||||
taxonomy: String,
|
taxonomy: String,
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
metadatumId: Number,
|
metadatumId: [Number, String],
|
||||||
metadatum: Object,
|
metadatum: Object,
|
||||||
selected: Array,
|
selected: Array,
|
||||||
currentCollectionId: String,
|
currentCollectionId: [Number, String],
|
||||||
isTaxonomy: {
|
isTaxonomy: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -806,7 +807,7 @@
|
||||||
},
|
},
|
||||||
applyFilter() {
|
applyFilter() {
|
||||||
if (this.isModal)
|
if (this.isModal)
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
else
|
else
|
||||||
this.initializeValues();
|
this.initializeValues();
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,8 @@
|
||||||
class="modal-card-body tainacan-finder-columns-container"
|
class="modal-card-body tainacan-finder-columns-container"
|
||||||
:style="{ height: expandResultsSection ? 'auto' : '0px' }"
|
:style="{ height: expandResultsSection ? 'auto' : '0px' }"
|
||||||
name="page-left"
|
name="page-left"
|
||||||
ref="tainacan-finder-scrolling-container">
|
ref="tainacan-finder-scrolling-container"
|
||||||
|
tag="div">
|
||||||
<div
|
<div
|
||||||
v-for="(finderColumn, key) in finderColumns"
|
v-for="(finderColumn, key) in finderColumns"
|
||||||
class="tainacan-finder-column"
|
class="tainacan-finder-column"
|
||||||
|
@ -328,7 +329,7 @@
|
||||||
parent: Number,
|
parent: Number,
|
||||||
taxonomy_id: Number,
|
taxonomy_id: Number,
|
||||||
taxonomy: String,
|
taxonomy: String,
|
||||||
collectionId: Number,
|
collectionId: [Number, String],
|
||||||
metadatumId: Number,
|
metadatumId: Number,
|
||||||
metadatum: Object,
|
metadatum: Object,
|
||||||
selected: Array,
|
selected: Array,
|
||||||
|
|
|
@ -44,13 +44,13 @@
|
||||||
v-if="!hideCancel"
|
v-if="!hideCancel"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">
|
@click="$emit('close')">
|
||||||
{{ $i18n.get('cancel') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="button is-success"
|
class="button is-success"
|
||||||
@click="onConfirm(); $parent.close();">
|
@click="onConfirm(); $emit('close');">
|
||||||
{{ $i18n.get('continue') }}
|
{{ $i18n.get('continue') }}
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
id="button-cancel-importer-edition"
|
id="button-cancel-importer-edition"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">
|
@click="$emit('close')">
|
||||||
{{ $i18n.get('exit') }}</button>
|
{{ $i18n.get('exit') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
type="submit"
|
type="submit"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
@click="onConfirm(newItems); $parent.close();">
|
@click="onConfirm(newItems); $emit('close');">
|
||||||
{{ hasCopied ? $i18n.get('label_return_to_list') : $i18n.get('cancel') }}
|
{{ hasCopied ? $i18n.get('label_return_to_list') : $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<button
|
<button
|
||||||
v-if="copyCount == 1 && hasCopied && newItems.length == 1"
|
v-if="copyCount == 1 && hasCopied && newItems.length == 1"
|
||||||
class="button is-secondary"
|
class="button is-secondary"
|
||||||
@click.prevent="$router.push($routerHelper.getItemEditPath(collectionId, newItems[0].id)); $parent.close();"
|
@click.prevent="$router.push($routerHelper.getItemEditPath(collectionId, newItems[0].id)); $emit('close');"
|
||||||
type="submit">
|
type="submit">
|
||||||
{{ $i18n.getFrom('items','edit_item') }}
|
{{ $i18n.getFrom('items','edit_item') }}
|
||||||
</button>
|
</button>
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => {}
|
default: () => {}
|
||||||
},
|
},
|
||||||
collectionId: String,
|
collectionId: [String, Number],
|
||||||
itemId: String
|
itemId: String
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
let sequenceId = group.id;
|
let sequenceId = group.id;
|
||||||
this.isCreatingSequenceEditGroup = false;
|
this.isCreatingSequenceEditGroup = false;
|
||||||
this.$router.push(this.$routerHelper.getCollectionSequenceEditPath(this.collectionId, sequenceId, 1));
|
this.$router.push(this.$routerHelper.getCollectionSequenceEditPath(this.collectionId, sequenceId, 1));
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
openBulkEditionModal() {
|
openBulkEditionModal() {
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
closeButtonAriaLabel: this.$i18n.get('close')
|
closeButtonAriaLabel: this.$i18n.get('close')
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$parent.close();
|
this.$emit('close');
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,13 +53,13 @@
|
||||||
type="button"
|
type="button"
|
||||||
style="margin-right: auto"
|
style="margin-right: auto"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
@click="$parent.close();">
|
@click="$emit('close');">
|
||||||
{{ $i18n.get('cancel') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="button is-success"
|
class="button is-success"
|
||||||
@click="onConfirm(selectedStatus); $parent.close();">
|
@click="onConfirm(selectedStatus); $emit('close');">
|
||||||
{{ $i18n.get('label_create_item') }}
|
{{ $i18n.get('label_create_item') }}
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -48,13 +48,13 @@
|
||||||
v-if="!hideCancel"
|
v-if="!hideCancel"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">
|
@click="$emit('close')">
|
||||||
{{ $i18n.get('cancel') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="button is-success"
|
class="button is-success"
|
||||||
@click="onConfirm(typeOfDelete); $parent.close();">
|
@click="onConfirm(typeOfDelete); $emit('close');">
|
||||||
{{ $i18n.get('continue') }}
|
{{ $i18n.get('continue') }}
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -111,14 +111,14 @@
|
||||||
v-if="!hideCancel"
|
v-if="!hideCancel"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">
|
@click="$emit('close')">
|
||||||
{{ $i18n.get('cancel') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="button is-success"
|
class="button is-success"
|
||||||
:disabled="hasParent ? !selectedParentTerm : false"
|
:disabled="hasParent ? !selectedParentTerm : false"
|
||||||
@click="onConfirm({ parent: hasParent ? selectedParentTerm : 0, termNames: termNames }); $parent.close();">
|
@click="onConfirm({ parent: hasParent ? selectedParentTerm : 0, termNames: termNames }); $emit('close');">
|
||||||
{{ $i18n.get('continue') }}
|
{{ $i18n.get('continue') }}
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -78,14 +78,14 @@
|
||||||
v-if="!hideCancel"
|
v-if="!hideCancel"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close()">
|
@click="$emit('close')">
|
||||||
{{ $i18n.get('cancel') }}
|
{{ $i18n.get('cancel') }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="button is-success"
|
class="button is-success"
|
||||||
:disabled="hasParent ? !selectedParentTerm : false"
|
:disabled="hasParent ? !selectedParentTerm : false"
|
||||||
@click="onConfirm(hasParent ? selectedParentTerm : 0); $parent.close();">
|
@click="onConfirm(hasParent ? selectedParentTerm : 0); $emit('close');">
|
||||||
{{ $i18n.get('continue') }}
|
{{ $i18n.get('continue') }}
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -306,7 +306,7 @@
|
||||||
FiltersTagsList
|
FiltersTagsList
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
collectionId: String,
|
collectionId: [String, Number],
|
||||||
isRepositoryLevel: Boolean,
|
isRepositoryLevel: Boolean,
|
||||||
taxonomy: String,
|
taxonomy: String,
|
||||||
filtersAsModal: Boolean,
|
filtersAsModal: Boolean,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
class="filter-tags-info">
|
class="filter-tags-info">
|
||||||
<span
|
<span
|
||||||
style="margin-right: 1em"
|
style="margin-right: 1em"
|
||||||
v-html="totalItems == 1 ? $i18n.getWithVariables('info_item_%s_found', [totalItems]) : $i18n.getWithVariables('info_items_%s_found', [totalItems])" />
|
v-html="totalItems === null ? $i18n.get('label_loading_items') : totalItems == 1 ? $i18n.getWithVariables('info_item_%s_found', [totalItems]) : $i18n.getWithVariables('info_items_%s_found', [totalItems])" />
|
||||||
<span>
|
<span>
|
||||||
<span v-html="filterTags.length == 1 ? $i18n.getWithVariables('info_%s_applied_filter', [filterTags.length]) : $i18n.getWithVariables('info_%s_applied_filters', [filterTags.length])" />
|
<span v-html="filterTags.length == 1 ? $i18n.getWithVariables('info_%s_applied_filter', [filterTags.length]) : $i18n.getWithVariables('info_%s_applied_filters', [filterTags.length])" />
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@ export default {
|
||||||
|
|
||||||
const emitter = mitt();
|
const emitter = mitt();
|
||||||
const bus = {
|
const bus = {
|
||||||
|
$userPrefs: app.config.globalProperties.$userPrefs,
|
||||||
$store: app.config.globalProperties.$store,
|
$store: app.config.globalProperties.$store,
|
||||||
$router: app.config.globalProperties.$router,
|
$router: app.config.globalProperties.$router,
|
||||||
$route: app.config.globalProperties.$route,
|
$route: app.config.globalProperties.$route,
|
||||||
$userPrefs: app.config.globalProperties.$userPrefs,
|
|
||||||
errors : [],
|
errors : [],
|
||||||
query: {},
|
query: {},
|
||||||
collectionId: undefined,
|
collectionId: undefined,
|
||||||
|
@ -171,7 +171,7 @@ export default {
|
||||||
this.$store.dispatch('search/setAdminViewMode', adminViewMode);
|
this.$store.dispatch('search/setAdminViewMode', adminViewMode);
|
||||||
this.updateURLQueries();
|
this.updateURLQueries();
|
||||||
},
|
},
|
||||||
setSelectedItemsForIframe(selectedItems, singleSelection) {
|
async setSelectedItemsForIframe(selectedItems, singleSelection) {
|
||||||
|
|
||||||
if (singleSelection)
|
if (singleSelection)
|
||||||
this.$store.dispatch('search/cleanSelectedItems');
|
this.$store.dispatch('search/cleanSelectedItems');
|
||||||
|
@ -180,36 +180,48 @@ export default {
|
||||||
|
|
||||||
let currentSelectedItems = this.$store.getters['search/getSelectedItems'];
|
let currentSelectedItems = this.$store.getters['search/getSelectedItems'];
|
||||||
|
|
||||||
if (window.history.pushState) {
|
if (window.history.replaceState) {
|
||||||
let searchParams = new URLSearchParams(window.location.search);
|
let searchParams = new URLSearchParams(window.location.search);
|
||||||
searchParams.delete('selecteditems');
|
searchParams.delete('selecteditems');
|
||||||
for (let selectedItem of currentSelectedItems)
|
for (let selectedItem of currentSelectedItems)
|
||||||
searchParams.append('selecteditems', selectedItem);
|
searchParams.append('selecteditems', selectedItem);
|
||||||
|
|
||||||
let newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?' + searchParams.toString() + window.location.hash;
|
let newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?' + searchParams.toString() + window.location.hash;
|
||||||
window.history.pushState({path: newurl}, '', newurl);
|
|
||||||
|
await this.$router.push(newurl)
|
||||||
|
window.history.replaceState({ ...window.history.state, ...{ path: newurl } }, '')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cleanSelectedItems() {
|
cleanSelectedItems() {
|
||||||
this.$store.dispatch('search/cleanSelectedItems');
|
this.$store.dispatch('search/cleanSelectedItems');
|
||||||
},
|
},
|
||||||
filterBySelectedItems(selectedItems) {
|
filterBySelectedItems(selectedItems) {
|
||||||
this.$router.replace({ query: {} });
|
if ( app.config.globalProperties.$route.name ) {
|
||||||
this.$router.replace({ query: { postin: selectedItems } });
|
this.$router.replace({ name: app.config.globalProperties.$route.name, query: {} });
|
||||||
|
this.$router.replace({ name: app.config.globalProperties.$route.name, query: { postin: selectedItems } });
|
||||||
|
} else {
|
||||||
|
this.$router.replace({ path: '', query: {} });
|
||||||
|
this.$router.replace({ path: '', query: { postin: selectedItems } });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
highlightsItem(itemId) {
|
highlightsItem(itemId) {
|
||||||
this.$store.dispatch('search/highlightsItem', itemId);
|
this.$store.dispatch('search/highlightsItem', itemId);
|
||||||
this.updateURLQueries();
|
this.updateURLQueries();
|
||||||
},
|
},
|
||||||
updateURLQueries() {
|
updateURLQueries() {
|
||||||
this.$router.replace({ query: {} });
|
if ( app.config.globalProperties.$route.name ) {
|
||||||
this.$router.replace({ query: this.$store.getters['search/getPostQuery'] });
|
this.$router.replace({ name: app.config.globalProperties.$route.name, query: {} });
|
||||||
|
this.$router.replace({ name: app.config.globalProperties.$route.name, query: this.$store.getters['search/getPostQuery'] });
|
||||||
|
} else {
|
||||||
|
this.$router.replace({ path: '', query: {} });
|
||||||
|
this.$router.replace({ path: '', query: this.$store.getters['search/getPostQuery'] });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
updateStoreFromURL() {
|
updateStoreFromURL() {
|
||||||
this.$store.dispatch('search/set_postquery', this.$route.query);
|
this.$store.dispatch('search/set_postquery', this.$route.query);
|
||||||
},
|
},
|
||||||
loadItems() {
|
loadItems() {
|
||||||
console.log('loadItems')
|
|
||||||
// Forces fetch_only to be filled before any search happens
|
// Forces fetch_only to be filled before any search happens
|
||||||
if (this.$store.getters['search/getPostQuery']['fetch_only'] != undefined) {
|
if (this.$store.getters['search/getPostQuery']['fetch_only'] != undefined) {
|
||||||
|
|
||||||
|
@ -220,7 +232,7 @@ export default {
|
||||||
|
|
||||||
this.$store.dispatch('collection/fetchItems', {
|
this.$store.dispatch('collection/fetchItems', {
|
||||||
'collectionId': this.collectionId,
|
'collectionId': this.collectionId,
|
||||||
'isOnTheme': (this.$route.name == null),
|
'isOnTheme': app.config.globalProperties.$route.meta && app.config.globalProperties.$route.meta.isOnTheme,
|
||||||
'termId': this.termId,
|
'termId': this.termId,
|
||||||
'taxonomy': this.taxonomy
|
'taxonomy': this.taxonomy
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const filterTypeMixin = {
|
||||||
isRepositoryLevel: Boolean,
|
isRepositoryLevel: Boolean,
|
||||||
isUsingElasticSearch: Boolean,
|
isUsingElasticSearch: Boolean,
|
||||||
isLoadingItems: Boolean,
|
isLoadingItems: Boolean,
|
||||||
currentCollectionId: String|Number
|
currentCollectionId: [Number, String]
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.collectionId = this.filter.collection_id ? this.filter.collection_id : this.collectionId;
|
this.collectionId = this.filter.collection_id ? this.filter.collection_id : this.collectionId;
|
||||||
|
|
|
@ -30,7 +30,7 @@ const i18nGet = function (key) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: '/', redirect:'/home' },
|
{ path: '/', redirect: { name: 'HomePage' } },
|
||||||
{ path: '/home', name: 'HomePage', component: HomePage, meta: {title: 'Tainacan'} },
|
{ path: '/home', name: 'HomePage', component: HomePage, meta: {title: 'Tainacan'} },
|
||||||
|
|
||||||
{ path: '/collections', name: 'CollectionsPage', component: CollectionsPage, meta: { title: i18nGet('title_repository_collections_page') } },
|
{ path: '/collections', name: 'CollectionsPage', component: CollectionsPage, meta: { title: i18nGet('title_repository_collections_page') } },
|
||||||
|
@ -39,8 +39,12 @@ const routes = [
|
||||||
|
|
||||||
{ path: '/collections/:collectionId', component: CollectionPage, meta: {title: i18nGet('title_collection_page') },
|
{ path: '/collections/:collectionId', component: CollectionPage, meta: {title: i18nGet('title_collection_page') },
|
||||||
children: [
|
children: [
|
||||||
{ path: '', redirect: { name: 'CollectionItemsPage' }},
|
/**
|
||||||
{ path: 'items', component: ItemsPage, name: 'CollectionItemsPage', meta: {title: i18nGet('title_collection_page') }, props: { isOnTheme: false } },
|
* Previously, the first child route had a path: ''. Due to the following Vue3 update, we're doing it like that
|
||||||
|
* https://router.vuejs.org/guide/migration/#Named-children-routes-with-an-empty-path-no-longer-appends-a-slash
|
||||||
|
*/
|
||||||
|
{ path: '/collections/:collectionId', redirect: { name: 'CollectionItemsPage' }},
|
||||||
|
{ path: 'items', component: ItemsPage, name: 'CollectionItemsPage', meta: {title: i18nGet('title_collection_page') }, meta: { isOnTheme: false } },
|
||||||
{ path: 'items/:itemId/edit', name: 'ItemEditionForm', component: ItemEditionForm, meta: {title: i18nGet('title_edit_item') } },
|
{ path: 'items/:itemId/edit', name: 'ItemEditionForm', component: ItemEditionForm, meta: {title: i18nGet('title_edit_item') } },
|
||||||
{ path: 'items/new', name: 'CollectionItemCreatePage', component: ItemEditionForm, meta: {title: i18nGet('title_create_item_collection') } },
|
{ path: 'items/new', name: 'CollectionItemCreatePage', component: ItemEditionForm, meta: {title: i18nGet('title_create_item_collection') } },
|
||||||
{ path: 'items/:itemId', name: 'ItemPage', component: ItemPage, meta: {title: i18nGet('title_item_page') } },
|
{ path: 'items/:itemId', name: 'ItemPage', component: ItemPage, meta: {title: i18nGet('title_item_page') } },
|
||||||
|
@ -55,7 +59,7 @@ const routes = [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{ path: '/items', name: 'ItemsPage', component: ItemsPage, meta: {title: i18nGet('title_items_page') } },
|
{ path: '/items', name: 'RepositoryItemsPage', component: ItemsPage, meta: {title: i18nGet('title_items_page') } },
|
||||||
{ path: '/items/new', name: 'ItemCreationForm', component: ItemEditionForm, meta: {title: i18nGet('title_create_item') } },
|
{ path: '/items/new', name: 'ItemCreationForm', component: ItemEditionForm, meta: {title: i18nGet('title_create_item') } },
|
||||||
|
|
||||||
{ path: '/filters', name: 'FiltersPage', component: FiltersPage, meta: {title: i18nGet('title_repository_filters_page') } },
|
{ path: '/filters', name: 'FiltersPage', component: FiltersPage, meta: {title: i18nGet('title_repository_filters_page') } },
|
||||||
|
@ -79,6 +83,7 @@ const routes = [
|
||||||
{ path: '/exporters/', name: 'ExportersPage', component: AvailableExportersPage, meta: {title: i18nGet('title_exporters_page') } },
|
{ path: '/exporters/', name: 'ExportersPage', component: AvailableExportersPage, meta: {title: i18nGet('title_exporters_page') } },
|
||||||
{ path: '/exporters/:exporterSlug', name: 'ExporterEditionForm', component: ExporterEditionForm, meta: {title: i18nGet('title_exporter_page') }},
|
{ path: '/exporters/:exporterSlug', name: 'ExporterEditionForm', component: ExporterEditionForm, meta: {title: i18nGet('title_exporter_page') }},
|
||||||
|
|
||||||
|
{ path: '/:pathMatch(.*)*', redirect: { name: 'HomePage' } }
|
||||||
];
|
];
|
||||||
|
|
||||||
export default createRouter({
|
export default createRouter({
|
||||||
|
|
|
@ -98,7 +98,7 @@ export const fetchItems = ({ rootGetters, dispatch, commit }, { collectionId, is
|
||||||
itemsPerPage: res.headers['x-wp-itemperpage'] });
|
itemsPerPage: res.headers['x-wp-itemperpage'] });
|
||||||
}
|
}
|
||||||
console.log(res.headers['x-wp-total']);
|
console.log(res.headers['x-wp-total']);
|
||||||
dispatch('search/setTotalItems', res.headers['x-wp-total'], { root: true } );
|
dispatch('search/setTotalItems', Number(res.headers['x-wp-total']), { root: true } );
|
||||||
dispatch('search/setTotalPages', res.headers['x-wp-totalpages'], { root: true } );
|
dispatch('search/setTotalPages', res.headers['x-wp-totalpages'], { root: true } );
|
||||||
dispatch('search/setItemsPerPage', res.headers['x-wp-itemsperpage'], { root: true } );
|
dispatch('search/setItemsPerPage', res.headers['x-wp-itemsperpage'], { root: true } );
|
||||||
|
|
||||||
|
|
|
@ -565,7 +565,6 @@
|
||||||
<!-- FILTERS TAG LIST-->
|
<!-- FILTERS TAG LIST-->
|
||||||
<filters-tags-list
|
<filters-tags-list
|
||||||
class="filter-tags-list"
|
class="filter-tags-list"
|
||||||
:filters="filters"
|
|
||||||
v-if="hasFiltered && !openAdvancedSearch" />
|
v-if="hasFiltered && !openAdvancedSearch" />
|
||||||
|
|
||||||
<!-- ITEMS LISTING RESULTS ------------------------- -->
|
<!-- ITEMS LISTING RESULTS ------------------------- -->
|
||||||
|
@ -729,7 +728,7 @@
|
||||||
AdvancedSearch
|
AdvancedSearch
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
collectionId: String
|
collectionId: [String, Number]
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -816,15 +815,14 @@
|
||||||
watch: {
|
watch: {
|
||||||
'$route': {
|
'$route': {
|
||||||
handler(to, from) {
|
handler(to, from) {
|
||||||
console.log('line 819')
|
|
||||||
// Should set Collection ID from URL only when in admin.
|
// Should set Collection ID from URL only when in admin.
|
||||||
if (this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage')
|
if (this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage')
|
||||||
this.$eventBusSearch.setCollectionId( !this.$route.params.collectionId ? this.$route.params.collectionId : parseInt(this.$route.params.collectionId) );
|
this.$eventBusSearch.setCollectionId( !this.$route.params.collectionId ? this.$route.params.collectionId : parseInt(this.$route.params.collectionId) );
|
||||||
|
|
||||||
console.log('line 824')
|
|
||||||
// Fills the URL with appropriate default values in case a query is not passed
|
// Fills the URL with appropriate default values in case a query is not passed
|
||||||
if (this.$route.name == null || this.$route.name == undefined || this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage') {
|
if (this.$route.name == null || this.$route.name == undefined || this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage') {
|
||||||
console.log('line 828')
|
|
||||||
// Items Per Page
|
// Items Per Page
|
||||||
if (this.$route.query.perpage == undefined || to.params.collectionId != from.params.collectionId) {
|
if (this.$route.query.perpage == undefined || to.params.collectionId != from.params.collectionId) {
|
||||||
let perPageKey = (this.collectionId != undefined ? 'items_per_page_' + this.collectionId : 'items_per_page');
|
let perPageKey = (this.collectionId != undefined ? 'items_per_page_' + this.collectionId : 'items_per_page');
|
||||||
|
@ -837,12 +835,11 @@
|
||||||
this.$userPrefs.set(perPageKey, 12);
|
this.$userPrefs.set(perPageKey, 12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('line 841')
|
|
||||||
console.log(this.$route.query, to.params, from.params);
|
|
||||||
// Page
|
// Page
|
||||||
if (this.$route.query.paged == undefined || to.params.collectionId != from.params.collectionId)
|
if (this.$route.query.paged == undefined || to.params.collectionId != from.params.collectionId)
|
||||||
this.$route.query.paged = 1;
|
this.$route.query.paged = 1;
|
||||||
console.log('line 845')
|
|
||||||
// Order (ASC, DESC)
|
// Order (ASC, DESC)
|
||||||
if (this.$route.query.order == undefined || to.params.collectionId != from.params.collectionId) {
|
if (this.$route.query.order == undefined || to.params.collectionId != from.params.collectionId) {
|
||||||
let orderKey = (this.collectionId != undefined ? 'order_' + this.collectionId : 'order');
|
let orderKey = (this.collectionId != undefined ? 'order_' + this.collectionId : 'order');
|
||||||
|
@ -855,7 +852,7 @@
|
||||||
this.$userPrefs.set(orderKey, 'DESC');
|
this.$userPrefs.set(orderKey, 'DESC');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('line 851')
|
|
||||||
// Order By (required extra work to deal with custom metadata ordering)
|
// Order By (required extra work to deal with custom metadata ordering)
|
||||||
if (this.$route.query.orderby == undefined || (to.params.collectionId != from.params.collectionId)) {
|
if (this.$route.query.orderby == undefined || (to.params.collectionId != from.params.collectionId)) {
|
||||||
let orderByKey = (this.collectionId != undefined ? 'order_by_' + this.collectionId : 'order_by');
|
let orderByKey = (this.collectionId != undefined ? 'order_by_' + this.collectionId : 'order_by');
|
||||||
|
@ -884,7 +881,7 @@
|
||||||
} else if ( this.$route.query.orderby == 'creation_date' ) { // Fixes old usage of creation_date
|
} else if ( this.$route.query.orderby == 'creation_date' ) { // Fixes old usage of creation_date
|
||||||
this.$route.query.orderby = 'date'
|
this.$route.query.orderby = 'date'
|
||||||
}
|
}
|
||||||
console.log('line 887')
|
|
||||||
// Theme View Modes
|
// Theme View Modes
|
||||||
if ((this.$route.name == null || this.$route.name == undefined ) &&
|
if ((this.$route.name == null || this.$route.name == undefined ) &&
|
||||||
this.$route.name != 'CollectionItemsPage' && this.$route.name != 'ItemsPage' &&
|
this.$route.name != 'CollectionItemsPage' && this.$route.name != 'ItemsPage' &&
|
||||||
|
@ -905,7 +902,7 @@
|
||||||
// Emit slideshow-from to start this view mode from index
|
// Emit slideshow-from to start this view mode from index
|
||||||
if (this.$route.query.view_mode != 'slideshow' && this.$route.query['slideshow-from'] !== null && this.$route.query['slideshow-from'] !== undefined && this.$route.query['slideshow-from'] !== false)
|
if (this.$route.query.view_mode != 'slideshow' && this.$route.query['slideshow-from'] !== null && this.$route.query['slideshow-from'] !== undefined && this.$route.query['slideshow-from'] !== false)
|
||||||
this.$eventBusSearchEmitter.emit('startSlideshowFromItem', this.$route.query['slideshow-from']);
|
this.$eventBusSearchEmitter.emit('startSlideshowFromItem', this.$route.query['slideshow-from']);
|
||||||
console.log('line 908')
|
|
||||||
// Admin View Modes
|
// Admin View Modes
|
||||||
if (this.$route.name != null && this.$route.name != undefined &&
|
if (this.$route.name != null && this.$route.name != undefined &&
|
||||||
(this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage') &&
|
(this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage') &&
|
||||||
|
@ -929,7 +926,6 @@
|
||||||
this.$store.dispatch('search/set_postquery', this.$route.query);
|
this.$store.dispatch('search/set_postquery', this.$route.query);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('line 931')
|
|
||||||
// Checks current metaqueries and taxqueries to alert filters that should reload
|
// Checks current metaqueries and taxqueries to alert filters that should reload
|
||||||
// For some reason, this process is not working accessing to.query, so we need to check the path string.
|
// For some reason, this process is not working accessing to.query, so we need to check the path string.
|
||||||
const oldQueryString = from.fullPath.replace(from.path + '?', '');
|
const oldQueryString = from.fullPath.replace(from.path + '?', '');
|
||||||
|
@ -956,11 +952,9 @@
|
||||||
this.$eventBusSearchEmitter.emit('hasToReloadFacets', true);
|
this.$eventBusSearchEmitter.emit('hasToReloadFacets', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('line 958')
|
console.log(to == from);
|
||||||
console.log(to.query, from.query);
|
|
||||||
// Finally, loads items
|
// Finally, loads items
|
||||||
//if (to.fullPath != from.fullPath) {
|
//if (to.fullPath != from.fullPath) {
|
||||||
console.log('vai')
|
|
||||||
this.$eventBusSearch.loadItems();
|
this.$eventBusSearch.loadItems();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
@ -1089,13 +1083,6 @@
|
||||||
...mapGetters('metadata', [
|
...mapGetters('metadata', [
|
||||||
'getMetadata'
|
'getMetadata'
|
||||||
]),
|
]),
|
||||||
...mapActions('filter', [
|
|
||||||
'fetchFilters'
|
|
||||||
]),
|
|
||||||
...mapGetters('filter', [
|
|
||||||
'getFilters',
|
|
||||||
'getRepositoryCollectionFilters'
|
|
||||||
]),
|
|
||||||
...mapGetters('search', [
|
...mapGetters('search', [
|
||||||
'getSearchQuery',
|
'getSearchQuery',
|
||||||
'getSentenceMode',
|
'getSentenceMode',
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
isLoadingCollectionBasics: Boolean
|
isLoadingCollectionBasics: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -464,13 +464,14 @@
|
||||||
mixins: [formHooks],
|
mixins: [formHooks],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
itemId: Number,
|
itemId: Number,
|
||||||
itemRequestCancel: undefined,
|
itemRequestCancel: undefined,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
isLoadingMetadataSections: false,
|
isLoadingMetadataSections: false,
|
||||||
open: true,
|
open: true,
|
||||||
urls_open: false,
|
urls_open: false,
|
||||||
|
entityName: 'item',
|
||||||
activeTab: 'metadata'
|
activeTab: 'metadata'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
&[disabled=disabled] {
|
&[disabled=disabled],
|
||||||
|
&:disabled {
|
||||||
background: var(--tainacan-gray1) !important;
|
background: var(--tainacan-gray1) !important;
|
||||||
}
|
}
|
||||||
&:hover,
|
&:hover,
|
||||||
|
|
|
@ -163,7 +163,7 @@ export default {
|
||||||
name: "CarouselItemsListTheme",
|
name: "CarouselItemsListTheme",
|
||||||
props: {
|
props: {
|
||||||
blockId: String,
|
blockId: String,
|
||||||
collectionId: String,
|
collectionId: [String, Number],
|
||||||
searchURL: String,
|
searchURL: String,
|
||||||
selectedItems: Array,
|
selectedItems: Array,
|
||||||
loadStrategy: String,
|
loadStrategy: String,
|
||||||
|
|
|
@ -281,7 +281,7 @@ import debounce from 'lodash/debounce.js';
|
||||||
export default {
|
export default {
|
||||||
name: "DynamicItemsListTheme",
|
name: "DynamicItemsListTheme",
|
||||||
props: {
|
props: {
|
||||||
collectionId: String,
|
collectionId: [String, Number],
|
||||||
showImage: Boolean,
|
showImage: Boolean,
|
||||||
showName: Boolean,
|
showName: Boolean,
|
||||||
layout: String,
|
layout: String,
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
id="button-close-slides-modal"
|
id="button-close-slides-modal"
|
||||||
class="button is-outlined"
|
class="button is-outlined"
|
||||||
type="button"
|
type="button"
|
||||||
@click="$parent.close();">
|
@click="$emit('close');">
|
||||||
{{ $i18n.get('close') }}</button>
|
{{ $i18n.get('close') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import qs from 'qs';
|
||||||
const themeRoutes = [];
|
const themeRoutes = [];
|
||||||
|
|
||||||
export default createRouter ({
|
export default createRouter ({
|
||||||
history: createWebHistory(),
|
history: createWebHistory(window.document.location.pathname),
|
||||||
routes: themeRoutes,
|
routes: themeRoutes,
|
||||||
// set custom query resolver
|
// set custom query resolver
|
||||||
parseQuery(query) {
|
parseQuery(query) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ export const viewModesMixin = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
collectionId: Number,
|
collectionId: [String, Number],
|
||||||
displayedMetadata: Array,
|
displayedMetadata: Array,
|
||||||
items: {
|
items: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
|
|
@ -719,8 +719,8 @@
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
// Source settings
|
// Source settings
|
||||||
collectionId: Number,
|
collectionId: [String,Number],
|
||||||
termId: Number,
|
termId: [String,Number],
|
||||||
taxonomy: String,
|
taxonomy: String,
|
||||||
// View Mode settings
|
// View Mode settings
|
||||||
isForcedViewMode: Boolean,
|
isForcedViewMode: Boolean,
|
||||||
|
@ -744,7 +744,7 @@
|
||||||
defaultOrderBy: 'date',
|
defaultOrderBy: 'date',
|
||||||
defaultOrderByMeta: '',
|
defaultOrderByMeta: '',
|
||||||
defaultOrderByType: '',
|
defaultOrderByType: '',
|
||||||
defaultItemsPerPage: Number,
|
defaultItemsPerPage: '',
|
||||||
showFiltersButtonInsideSearchControl: false,
|
showFiltersButtonInsideSearchControl: false,
|
||||||
startWithFiltersHidden: false,
|
startWithFiltersHidden: false,
|
||||||
filtersAsModal: false,
|
filtersAsModal: false,
|
||||||
|
@ -835,6 +835,154 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
'$route': {
|
||||||
|
handler(to, from) {
|
||||||
|
|
||||||
|
// Should set Collection ID from URL only when in admin.
|
||||||
|
if (this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage')
|
||||||
|
this.$eventBusSearch.setCollectionId( !this.$route.params.collectionId ? this.$route.params.collectionId : parseInt(this.$route.params.collectionId) );
|
||||||
|
|
||||||
|
// Fills the URL with appropriate default values in case a query is not passed
|
||||||
|
if (this.$route.name == null || this.$route.name == undefined || this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage') {
|
||||||
|
|
||||||
|
// Items Per Page
|
||||||
|
if (this.$route.query.perpage == undefined || to.params.collectionId != from.params.collectionId) {
|
||||||
|
let perPageKey = (this.collectionId != undefined ? 'items_per_page_' + this.collectionId : 'items_per_page');
|
||||||
|
let perPageValue = this.$userPrefs.get(perPageKey);
|
||||||
|
|
||||||
|
if (perPageValue)
|
||||||
|
this.$route.query.perpage = perPageValue;
|
||||||
|
else {
|
||||||
|
this.$route.query.perpage = 12;
|
||||||
|
this.$userPrefs.set(perPageKey, 12);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Page
|
||||||
|
if (this.$route.query.paged == undefined || to.params.collectionId != from.params.collectionId)
|
||||||
|
this.$route.query.paged = 1;
|
||||||
|
|
||||||
|
// Order (ASC, DESC)
|
||||||
|
if (this.$route.query.order == undefined || to.params.collectionId != from.params.collectionId) {
|
||||||
|
let orderKey = (this.collectionId != undefined ? 'order_' + this.collectionId : 'order');
|
||||||
|
let orderValue = this.$userPrefs.get(orderKey) ? this.$userPrefs.get(orderKey) : this.defaultOrder;
|
||||||
|
|
||||||
|
if (orderValue)
|
||||||
|
this.$route.query.order = orderValue;
|
||||||
|
else {
|
||||||
|
this.$route.query.order = 'DESC';
|
||||||
|
this.$userPrefs.set(orderKey, 'DESC');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Order By (required extra work to deal with custom metadata ordering)
|
||||||
|
if (this.$route.query.orderby == undefined || (to.params.collectionId != from.params.collectionId)) {
|
||||||
|
let orderByKey = (this.collectionId != undefined ? 'order_by_' + this.collectionId : 'order_by');
|
||||||
|
let orderBy = this.$userPrefs.get(orderByKey) ? this.$userPrefs.get(orderByKey) : this.defaultOrderBy;
|
||||||
|
|
||||||
|
if (orderBy && orderBy != 'name') {
|
||||||
|
|
||||||
|
// Previously was stored as a metadata object, now it is a orderby object
|
||||||
|
if (orderBy.slug || typeof orderBy == 'string')
|
||||||
|
orderBy = this.$orderByHelper.getOrderByForMetadatum(orderBy);
|
||||||
|
|
||||||
|
if (orderBy.orderby)
|
||||||
|
Object.keys(orderBy).forEach((paramKey) => {
|
||||||
|
this.$route.query[paramKey] = orderBy[paramKey];
|
||||||
|
});
|
||||||
|
else
|
||||||
|
this.$route.query.orderby = 'date'
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$route.query.orderby = 'date';
|
||||||
|
this.$userPrefs.set(orderByKey, {
|
||||||
|
slug: 'creation_date',
|
||||||
|
name: this.$i18n.get('label_creation_date')
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
} else if ( this.$route.query.orderby == 'creation_date' ) { // Fixes old usage of creation_date
|
||||||
|
this.$route.query.orderby = 'date'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Theme View Modes
|
||||||
|
if ((this.$route.name == null || this.$route.name == undefined ) &&
|
||||||
|
this.$route.name != 'CollectionItemsPage' && this.$route.name != 'ItemsPage' &&
|
||||||
|
(this.$route.query.view_mode == undefined || to.params.collectionId != from.params.collectionId)
|
||||||
|
) {
|
||||||
|
|
||||||
|
let viewModeKey = (this.collectionId != undefined ? 'view_mode_' + this.collectionId : 'view_mode');
|
||||||
|
let viewModeValue = this.$userPrefs.get(viewModeKey);
|
||||||
|
|
||||||
|
if (viewModeValue)
|
||||||
|
this.$route.query.view_mode = viewModeValue;
|
||||||
|
else {
|
||||||
|
this.$route.query.view_mode = 'table';
|
||||||
|
this.$userPrefs.set(viewModeKey, 'table');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Emit slideshow-from to start this view mode from index
|
||||||
|
if (this.$route.query.view_mode != 'slideshow' && this.$route.query['slideshow-from'] !== null && this.$route.query['slideshow-from'] !== undefined && this.$route.query['slideshow-from'] !== false)
|
||||||
|
this.$eventBusSearchEmitter.emit('startSlideshowFromItem', this.$route.query['slideshow-from']);
|
||||||
|
|
||||||
|
// Admin View Modes
|
||||||
|
if (this.$route.name != null && this.$route.name != undefined &&
|
||||||
|
(this.$route.name == 'CollectionItemsPage' || this.$route.name == 'ItemsPage') &&
|
||||||
|
(this.$route.query.admin_view_mode == undefined || to.params.collectionId != from.params.collectionId)
|
||||||
|
) {
|
||||||
|
let adminViewModeKey = (this.collectionId != undefined ? 'admin_view_mode_' + this.collectionId : 'admin_view_mode');
|
||||||
|
let adminViewModeValue = this.$userPrefs.get(adminViewModeKey);
|
||||||
|
|
||||||
|
if (adminViewModeValue)
|
||||||
|
this.$route.query.admin_view_mode = adminViewModeValue;
|
||||||
|
else {
|
||||||
|
this.$route.query.admin_view_mode = 'table';
|
||||||
|
this.$userPrefs.set(adminViewModeKey, 'table');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Advanced Search
|
||||||
|
if (this.$route.query && this.$route.query.advancedSearch){
|
||||||
|
this.$store.dispatch('search/set_advanced_query', this.$route.query);
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('search/set_postquery', this.$route.query);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checks current metaqueries and taxqueries to alert filters that should reload
|
||||||
|
// For some reason, this process is not working accessing to.query, so we need to check the path string.
|
||||||
|
const oldQueryString = from.fullPath.replace(from.path + '?', '');
|
||||||
|
const newQueryString = to.fullPath.replace(from.path + '?', '');
|
||||||
|
|
||||||
|
const oldQueryArray = oldQueryString.split('&');
|
||||||
|
const newQueryArray = newQueryString.split('&');
|
||||||
|
|
||||||
|
const oldMetaQueryArray = oldQueryArray.filter(queryItem => queryItem.startsWith('metaquery'));
|
||||||
|
const newMetaQueryArray = newQueryArray.filter(queryItem => queryItem.startsWith('metaquery'));
|
||||||
|
const oldTaxQueryArray = oldQueryArray.filter(queryItem => queryItem.startsWith('taxquery'));
|
||||||
|
const newTaxQueryArray = newQueryArray.filter(queryItem => queryItem.startsWith('taxquery'));
|
||||||
|
const oldStatusArray = oldQueryArray.filter(queryItem => queryItem.startsWith('status'));
|
||||||
|
const newStatusArray = newQueryArray.filter(queryItem => queryItem.startsWith('status'));
|
||||||
|
const oldSearchQuery = oldQueryArray.filter(queryItem => queryItem.startsWith('search'));
|
||||||
|
const newSearchQuery = newQueryArray.filter(queryItem => queryItem.startsWith('search'));
|
||||||
|
|
||||||
|
if (
|
||||||
|
JSON.stringify(oldMetaQueryArray) != JSON.stringify(newMetaQueryArray) ||
|
||||||
|
JSON.stringify(oldTaxQueryArray) != JSON.stringify(newTaxQueryArray) ||
|
||||||
|
JSON.stringify(oldStatusArray) != JSON.stringify(newStatusArray) ||
|
||||||
|
JSON.stringify(oldSearchQuery) != JSON.stringify(newSearchQuery)
|
||||||
|
) {
|
||||||
|
this.$eventBusSearchEmitter.emit('hasToReloadFacets', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(to == from);
|
||||||
|
// Finally, loads items
|
||||||
|
//if (to.fullPath != from.fullPath) {
|
||||||
|
this.$eventBusSearch.loadItems();
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
displayedMetadata: {
|
displayedMetadata: {
|
||||||
handler() {
|
handler() {
|
||||||
this.localDisplayedMetadata = JSON.parse(JSON.stringify(this.displayedMetadata));
|
this.localDisplayedMetadata = JSON.parse(JSON.stringify(this.displayedMetadata));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Main imports
|
// Main imports
|
||||||
import { createApp, h, onMounted } from 'vue';
|
import { createApp, h, defineAsyncComponent } from 'vue';
|
||||||
import {
|
import {
|
||||||
Field,
|
Field,
|
||||||
Input,
|
Input,
|
||||||
|
@ -77,7 +77,7 @@ export default (element) => {
|
||||||
defaultOrderByType: '',
|
defaultOrderByType: '',
|
||||||
isForcedViewMode: false,
|
isForcedViewMode: false,
|
||||||
enabledViewModes: {},
|
enabledViewModes: {},
|
||||||
defaultItemsPerPage: '',
|
defaultItemsPerPage: 12,
|
||||||
hideFilters: false,
|
hideFilters: false,
|
||||||
hideHideFiltersButton: false,
|
hideHideFiltersButton: false,
|
||||||
hideSearch: false,
|
hideSearch: false,
|
||||||
|
@ -161,7 +161,7 @@ export default (element) => {
|
||||||
|
|
||||||
// Other Tweaks
|
// Other Tweaks
|
||||||
if (this.$el.attributes['default-items-per-page'] != undefined)
|
if (this.$el.attributes['default-items-per-page'] != undefined)
|
||||||
this.defaultItemsPerPage = this.$el.attributes['default-items-per-page'].value;
|
this.defaultItemsPerPage = Number(this.$el.attributes['default-items-per-page'].value);
|
||||||
if (this.$el.attributes['show-filters-button-inside-search-control'] != undefined)
|
if (this.$el.attributes['show-filters-button-inside-search-control'] != undefined)
|
||||||
this.showFiltersButtonInsideSearchControl = this.isParameterTrue('show-filters-button-inside-search-control');
|
this.showFiltersButtonInsideSearchControl = this.isParameterTrue('show-filters-button-inside-search-control');
|
||||||
if (this.$el.attributes['start-with-filters-hidden'] != undefined)
|
if (this.$el.attributes['start-with-filters-hidden'] != undefined)
|
||||||
|
@ -254,9 +254,7 @@ export default (element) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !possibleHideFilters ) {
|
if ( !possibleHideFilters ) {
|
||||||
import('../../../admin/components/search/filters-items-list.vue')
|
VueItemsList.component('filters-items-list', defineAsyncComponent(() => import('../../../admin/components/search/filters-items-list.vue')));
|
||||||
.then(importedModule => VueItemsList.component('filters-items-list', importedModule.default))
|
|
||||||
.catch(error => console.log(error));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Main page component */
|
/* Main page component */
|
||||||
|
@ -285,15 +283,13 @@ export default (element) => {
|
||||||
// Logic for dynamic importing Tainacan oficial view modes only if they are necessary
|
// Logic for dynamic importing Tainacan oficial view modes only if they are necessary
|
||||||
possibleViewModes.forEach(viewModeSlug => {
|
possibleViewModes.forEach(viewModeSlug => {
|
||||||
if ( registeredViewModes.indexOf(viewModeSlug) >= 0 )
|
if ( registeredViewModes.indexOf(viewModeSlug) >= 0 )
|
||||||
import('./theme-search/components/view-mode-' + viewModeSlug + '.vue')
|
VueItemsList.component('view-mode-' + viewModeSlug, defineAsyncComponent(() => import('./theme-search/components/view-mode-' + viewModeSlug + '.vue')));
|
||||||
.then(importedModule => VueItemsList.component('view-mode-' + viewModeSlug, importedModule.default) )
|
|
||||||
.catch(error => console.log(error));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const emitter = mitt();
|
const emitter = mitt();
|
||||||
VueItemsList.config.globalProperties.$emitter = emitter;
|
VueItemsList.config.globalProperties.$emitter = emitter;
|
||||||
|
|
||||||
VueItemsList.use(eventBusSearch, { store: store, router: routerTheme });
|
VueItemsList.use(eventBusSearch);
|
||||||
|
|
||||||
VueItemsList.mount('#tainacan-items-page');
|
VueItemsList.mount('#tainacan-items-page');
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
metadatumId: String,
|
metadatumId: String,
|
||||||
metadatumType: String,
|
metadatumType: String,
|
||||||
collectionId: String,
|
collectionId: [String, Number],
|
||||||
collectionSlug: String,
|
collectionSlug: String,
|
||||||
parentTermId: String,
|
parentTermId: String,
|
||||||
showImage: Boolean,
|
showImage: Boolean,
|
||||||
|
|
|
@ -224,9 +224,9 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
|
||||||
let currentURL = window.location.toString();
|
let currentURL = window.location.toString();
|
||||||
if (currentURL.indexOf("#") > 0) {
|
if (currentURL.indexOf("#") > 0) {
|
||||||
currentURL = currentURL.substring(0, currentURL.indexOf("#"));
|
currentURL = currentURL.substring(0, currentURL.indexOf("#"));
|
||||||
window.history.replaceState({}, '', currentURL + '#gid=' + this.options.media_id + '&pid=' + (self.lightbox.pswp.currIndex + 1));
|
window.history.replaceState(window.history.state, '', currentURL + '#gid=' + this.options.media_id + '&pid=' + (self.lightbox.pswp.currIndex + 1));
|
||||||
} else {
|
} else {
|
||||||
window.history.pushState({}, '', currentURL + '#gid=' + this.options.media_id + '&pid=' + (self.lightbox.pswp.currIndex + 1));
|
window.history.pushState(window.history.state, '', currentURL + '#gid=' + this.options.media_id + '&pid=' + (self.lightbox.pswp.currIndex + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
import { mapActions } from 'vuex';
|
import { mapActions } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TermEditionForm',
|
name: 'TermCreationPanel',
|
||||||
mixins: [ formHooks ],
|
mixins: [ formHooks ],
|
||||||
props: {
|
props: {
|
||||||
originalForm: Object,
|
originalForm: Object,
|
||||||
|
|
|
@ -753,7 +753,7 @@ export default {
|
||||||
name: 'ItemSubmissionForm',
|
name: 'ItemSubmissionForm',
|
||||||
mixins: [ formHooks, itemMetadataMixin ],
|
mixins: [ formHooks, itemMetadataMixin ],
|
||||||
props: {
|
props: {
|
||||||
collectionId: String,
|
collectionId: [String, Number],
|
||||||
hideFileModalButton: Boolean,
|
hideFileModalButton: Boolean,
|
||||||
hideTextModalButton: Boolean,
|
hideTextModalButton: Boolean,
|
||||||
hideLinkModalButton: Boolean,
|
hideLinkModalButton: Boolean,
|
||||||
|
|
|
@ -697,6 +697,7 @@ return apply_filters( 'tainacan-i18n', [
|
||||||
'label_multiple_terms' => __( 'Multiple terms', 'tainacan' ),
|
'label_multiple_terms' => __( 'Multiple terms', 'tainacan' ),
|
||||||
'label_multiple' => __( 'Multiple', 'tainacan' ),
|
'label_multiple' => __( 'Multiple', 'tainacan' ),
|
||||||
'label_separator' => __( 'Separator', 'tainacan' ),
|
'label_separator' => __( 'Separator', 'tainacan' ),
|
||||||
|
'label_loading_items' => __( 'Loading items...', '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' ),
|
||||||
|
|
Loading…
Reference in New Issue