Merge branch 'develop' into feature/274
This commit is contained in:
commit
4e5857efa9
|
@ -1951,9 +1951,9 @@
|
|||
}
|
||||
},
|
||||
"buefy": {
|
||||
"version": "0.8.6",
|
||||
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.8.6.tgz",
|
||||
"integrity": "sha512-7woxrdwANcnJbe7lofPxkJLGRRGIVwFXOo0kzEpiNB6alQj18NV6UrdAKse+LWCOADz+AeHe5gyc6qdgRjG5mw==",
|
||||
"version": "0.8.8",
|
||||
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.8.8.tgz",
|
||||
"integrity": "sha512-kTUnroPBLm998KFZbeJuUgJV+nJbDUJxw1c8gzeJoe+Mve73Nb3hi6AZpgrIH8FtXmh5r8nMBYBqwN54EtPWXg==",
|
||||
"requires": {
|
||||
"bulma": "0.7.5"
|
||||
}
|
||||
|
@ -4767,9 +4767,9 @@
|
|||
}
|
||||
},
|
||||
"he": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
|
||||
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||
"dev": true
|
||||
},
|
||||
"hmac-drbg": {
|
||||
|
@ -5682,11 +5682,6 @@
|
|||
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.merge": {
|
||||
"version": "4.6.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
|
||||
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
|
||||
},
|
||||
"lodash.tail": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz",
|
||||
|
@ -6714,9 +6709,9 @@
|
|||
}
|
||||
},
|
||||
"popper.js": {
|
||||
"version": "1.14.3",
|
||||
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.3.tgz",
|
||||
"integrity": "sha1-FDj5jQRqz3tNeM1QK/QYrGTU8JU="
|
||||
"version": "1.16.0",
|
||||
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.0.tgz",
|
||||
"integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw=="
|
||||
},
|
||||
"portfinder": {
|
||||
"version": "1.0.17",
|
||||
|
@ -8081,9 +8076,9 @@
|
|||
}
|
||||
},
|
||||
"sortablejs": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.7.0.tgz",
|
||||
"integrity": "sha1-gKKyNwq9Vo4c7IwnETHvMKkE+ig="
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.1.tgz",
|
||||
"integrity": "sha512-N6r7GrVmO8RW1rn0cTdvK3JR0BcqecAJ0PmYMCL3ZuqTH3pY+9QyqkmJSkkLyyDvd+AJnwaxTP22Ybr/83V9hQ=="
|
||||
},
|
||||
"source-list-map": {
|
||||
"version": "2.0.0",
|
||||
|
@ -9072,13 +9067,13 @@
|
|||
"dev": true
|
||||
},
|
||||
"v-tooltip": {
|
||||
"version": "2.0.0-rc.33",
|
||||
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.0-rc.33.tgz",
|
||||
"integrity": "sha1-ePfY6cNCZWIr5lup3HjGfx3AK3M=",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.2.tgz",
|
||||
"integrity": "sha512-xQ+qzOFfywkLdjHknRPgMMupQNS8yJtf9Utd5Dxiu/0n4HtrxqsgDtN2MLZ0LKbburtSAQgyypuE/snM8bBZhw==",
|
||||
"requires": {
|
||||
"lodash.merge": "^4.6.0",
|
||||
"popper.js": "^1.12.9",
|
||||
"vue-resize": "^0.4.3"
|
||||
"lodash": "^4.17.11",
|
||||
"popper.js": "^1.15.0",
|
||||
"vue-resize": "^0.4.5"
|
||||
}
|
||||
},
|
||||
"v8-compile-cache": {
|
||||
|
@ -9122,9 +9117,9 @@
|
|||
}
|
||||
},
|
||||
"vue": {
|
||||
"version": "2.5.17",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-2.5.17.tgz",
|
||||
"integrity": "sha512-mFbcWoDIJi0w0Za4emyLiW72Jae0yjANHbCVquMKijcavBGypqlF7zHRgMa5k4sesdv7hv2rB4JPdZfR+TPfhQ=="
|
||||
"version": "2.6.10",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz",
|
||||
"integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ=="
|
||||
},
|
||||
"vue-awesome-swiper": {
|
||||
"version": "3.1.3",
|
||||
|
@ -9222,9 +9217,9 @@
|
|||
"integrity": "sha512-viecHQiHVLez7HlYUQsv1wJb2MT/RDSzkDp6m3In41vPrk6OsBmT2qRE8LZqYIA4daIwrnx/Xm8h4fjOpuE3hw=="
|
||||
},
|
||||
"vue-resize": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-0.4.4.tgz",
|
||||
"integrity": "sha512-Lb/cnE2N9Y42ZJPw8wpjkpuX5a9ReerWNGcQRcbNCwfCnkHG6++FurNNmLIdU8dcCTH4c5rtTPdxBqFoRMK2cQ=="
|
||||
"version": "0.4.5",
|
||||
"resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-0.4.5.tgz",
|
||||
"integrity": "sha512-bhP7MlgJQ8TIkZJXAfDf78uJO+mEI3CaLABLjv0WNzr4CcGRGPIAItyWYnP6LsPA4Oq0WE+suidNs6dgpO4RHg=="
|
||||
},
|
||||
"vue-router": {
|
||||
"version": "3.0.1",
|
||||
|
@ -9242,9 +9237,9 @@
|
|||
}
|
||||
},
|
||||
"vue-template-compiler": {
|
||||
"version": "2.5.17",
|
||||
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.5.17.tgz",
|
||||
"integrity": "sha512-63uI4syCwtGR5IJvZM0LN5tVsahrelomHtCxvRkZPJ/Tf3ADm1U1wG6KWycK3qCfqR+ygM5vewUvmJ0REAYksg==",
|
||||
"version": "2.6.10",
|
||||
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz",
|
||||
"integrity": "sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"de-indent": "^1.0.2",
|
||||
|
@ -9263,11 +9258,11 @@
|
|||
"integrity": "sha512-UquSfnSWejD0zAfcD+3jJ1chUAkOAyoxya9Lxh9acCRtrlmGcAIvd0cQYraWqKenbuZJUdum+S174atv2AuEHQ=="
|
||||
},
|
||||
"vuedraggable": {
|
||||
"version": "2.16.0",
|
||||
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.16.0.tgz",
|
||||
"integrity": "sha512-fr9gcWKXMJlzbbtJcrQs4kU7qdOZqd4SEpAcx+r0nykbW8AygZN0aKVpadEtI53T8A2azhzCdXMvEqrLuKE2fA==",
|
||||
"version": "2.23.2",
|
||||
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.23.2.tgz",
|
||||
"integrity": "sha512-PgHCjUpxEAEZJq36ys49HfQmXglattf/7ofOzUrW2/rRdG7tu6fK84ir14t1jYv4kdXewTEa2ieKEAhhEMdwkQ==",
|
||||
"requires": {
|
||||
"sortablejs": "^1.7.0"
|
||||
"sortablejs": "^1.10.1"
|
||||
}
|
||||
},
|
||||
"vuex": {
|
||||
|
|
10
package.json
10
package.json
|
@ -8,7 +8,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.19.0",
|
||||
"buefy": "^0.8.6",
|
||||
"buefy": "^0.8.8",
|
||||
"bulma": "^0.7.5",
|
||||
"mdi": "^2.2.43",
|
||||
"moment": "^2.22.2",
|
||||
|
@ -17,13 +17,13 @@
|
|||
"react": "^16.8.3",
|
||||
"react-dom": "^16.8.3",
|
||||
"t": "^0.5.1",
|
||||
"v-tooltip": "^2.0.0-rc.33",
|
||||
"vue": "^2.5.17",
|
||||
"v-tooltip": "^2.0.2",
|
||||
"vue": "^2.5.22",
|
||||
"vue-awesome-swiper": "^3.1.3",
|
||||
"vue-masonry-css": "^1.0.3",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-the-mask": "^0.11.1",
|
||||
"vuedraggable": "^2.16.0",
|
||||
"vuedraggable": "^2.23.2",
|
||||
"vuex": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -43,7 +43,7 @@
|
|||
"style-loader": "^0.23.1",
|
||||
"terser-webpack-plugin": "^1.1.0",
|
||||
"vue-loader": "^15.4.2",
|
||||
"vue-template-compiler": "^2.5.17",
|
||||
"vue-template-compiler": "^2.5.22",
|
||||
"webpack": "^4.22.0",
|
||||
"webpack-bundle-analyzer": "^3.3.2",
|
||||
"webpack-cli": "^3.1.2",
|
||||
|
|
|
@ -530,9 +530,19 @@ export default {
|
|||
this.isNewMetadatumModalActive = false;
|
||||
this.selectedMetadatumType = undefined;
|
||||
|
||||
// Generates options for metadata listing
|
||||
// Updates options for metadata listing
|
||||
this.isFetchingCollectionMetadata = true;
|
||||
this.fetchMetadata({collectionId: this.collectionId, isRepositoryLevel: false, isContextEdit: false })
|
||||
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
||||
this.fetchMetadata({
|
||||
collectionId: this.collectionId,
|
||||
isRepositoryLevel: false,
|
||||
isContextEdit: false
|
||||
}).then((resp) => {
|
||||
resp.request
|
||||
.then((metadata) => {
|
||||
this.collectionMetadata = JSON.parse(JSON.stringify(metadata));
|
||||
this.isFetchingCollectionMetadata = false;
|
||||
|
@ -541,6 +551,10 @@ export default {
|
|||
this.$console.error(error);
|
||||
this.isFetchingCollectionMetadata = false;
|
||||
});
|
||||
// Search Request Token for cancelling
|
||||
this.metadataSearchCancel = resp.source;
|
||||
})
|
||||
.catch(() => this.isFetchingCollectionMetadata = false);
|
||||
},
|
||||
onMetadatumEditionCanceled() {
|
||||
// Reset variables for metadatum creation
|
||||
|
|
|
@ -40,14 +40,12 @@
|
|||
@change="handleChangeOnFilter"
|
||||
:class="{'filters-area-receive': isDraggingFromAvailable}"
|
||||
v-model="activeFilterList"
|
||||
:options="{
|
||||
group: { name:'filters', pull: false, put: true },
|
||||
sort: (openedFilterId == '' || openedFilterId == undefined) && !isRepositoryLevel,
|
||||
//disabled: openedFilterId != '' && openedFilterId != undefined,
|
||||
handle: '.handle',
|
||||
ghostClass: 'sortable-ghost',
|
||||
filter: 'not-sortable-item',
|
||||
animation: '250'}">
|
||||
:group="{ name:'filters', pull: false, put: true }"
|
||||
:sort="(openedFilterId == '' || openedFilterId == undefined) && !isRepositoryLevel"
|
||||
:handle="'.handle'"
|
||||
ghost-class="sortable-ghost"
|
||||
filter="not-sortable-item"
|
||||
:animation="250">
|
||||
<div
|
||||
class="active-filter-item"
|
||||
:class="{
|
||||
|
@ -170,11 +168,9 @@
|
|||
@change="handleChangeOnMetadata"
|
||||
v-if="availableMetadata.length > 0 && !isLoadingMetadatumTypes"
|
||||
v-model="availableMetadata"
|
||||
:options="{
|
||||
sort: false,
|
||||
group: { name:'filters', pull: !isSelectingFilterType, put: false, revertClone: true },
|
||||
dragClass: 'sortable-drag'
|
||||
}">
|
||||
:sort="false"
|
||||
:group="{ name:'filters', pull: !isSelectingFilterType, put: false, revertClone: true }"
|
||||
drag-class="sortable-drag">
|
||||
<div
|
||||
class="available-metadatum-item"
|
||||
:class="{
|
||||
|
|
|
@ -43,15 +43,13 @@
|
|||
class="active-metadata-area"
|
||||
@change="handleChange"
|
||||
:class="{'metadata-area-receive': isDraggingFromAvailable}"
|
||||
:options="{
|
||||
group: { name:'metadata', pull: false, put: true },
|
||||
sort: (openedMetadatumId == '' || openedMetadatumId == undefined) && !isRepositoryLevel,
|
||||
//disabled: openedMetadatumId != '' && openedMetadatumId != undefined,
|
||||
handle: '.handle',
|
||||
ghostClass: 'sortable-ghost',
|
||||
chosenClass: 'sortable-chosen',
|
||||
filter: 'not-sortable-item',
|
||||
animation: '250'}">
|
||||
:group="{ name:'metadata', pull: false, put: true }"
|
||||
:sort="(openedMetadatumId == '' || openedMetadatumId == undefined) && !isRepositoryLevel"
|
||||
:handle="'.handle'"
|
||||
ghost-class="sortable-ghost"
|
||||
chosen-class="sortable-chosen"
|
||||
filter="not-sortable-item"
|
||||
:animation="250">
|
||||
<div
|
||||
class="active-metadatum-item"
|
||||
:class="{
|
||||
|
@ -194,11 +192,9 @@
|
|||
<h3 class="label has-text-secondary">{{ $i18n.get('label_available_metadata_types') }}</h3>
|
||||
<draggable
|
||||
v-model="availableMetadatumList"
|
||||
:options="{
|
||||
sort: false,
|
||||
group: { name:'metadata', pull: 'clone', put: false, revertClone: true },
|
||||
dragClass: 'sortable-drag'
|
||||
}">
|
||||
:sort="false"
|
||||
:group="{ name:'metadata', pull: 'clone', put: false, revertClone: true }"
|
||||
drag-class="sortable-drag">
|
||||
<div
|
||||
@click.prevent="addMetadatumViaButton(metadatum)"
|
||||
class="available-metadatum-item"
|
||||
|
|
|
@ -472,6 +472,7 @@
|
|||
}
|
||||
},
|
||||
created(){
|
||||
if (jQuery && jQuery( document )) {
|
||||
jQuery( document ).on( 'heartbeat-tick-list', ( event, data ) => {
|
||||
let updatedProcesses = data.bg_process_feedback;
|
||||
|
||||
|
@ -486,11 +487,14 @@
|
|||
jQuery( document ).on( 'heartbeat-tick', ( event, data ) => {
|
||||
jQuery( document ).trigger('heartbeat-tick-list', data);
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (jQuery && jQuery( document )) {
|
||||
jQuery( document ).unbind( 'heartbeat-tick-list')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -534,7 +534,7 @@ export default {
|
|||
color: $blue5;
|
||||
height: 27px;
|
||||
font-size: 18px !important;
|
||||
height: 2rem !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
a {
|
||||
|
|
|
@ -236,6 +236,7 @@ export default {
|
|||
|
||||
this.showProcessesList = false;
|
||||
|
||||
if (jQuery && jQuery( document )) {
|
||||
jQuery( document ).on( 'heartbeat-tick-popup', ( event, data ) => {
|
||||
this.setProcesses(data.bg_process_feedback);
|
||||
});
|
||||
|
@ -243,10 +244,10 @@ export default {
|
|||
jQuery( document ).on( 'heartbeat-tick', ( event, data ) => {
|
||||
jQuery( document ).trigger('heartbeat-tick-popup',data);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (jQuery && jQuery( document ))
|
||||
jQuery( document ).unbind( 'heartbeat-tick-popup')
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,6 +118,7 @@ function listen(evnt, elem, func) {
|
|||
return r;
|
||||
}
|
||||
else {
|
||||
if (jQuery && jQuery('head'))
|
||||
jQuery('head').append('<style>.tainacan-icon{ opacity: 1 !important; }</style>');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1525,6 +1525,8 @@
|
|||
this.$nextTick(() => {
|
||||
if (this.$refs['search-control'] != undefined)
|
||||
this.searchControlHeight = this.$refs['search-control'] ? this.$refs['search-control'].clientHeight + this.$refs['search-control'].offsetTop : 0;
|
||||
|
||||
if (jQuery && jQuery(window))
|
||||
this.isFiltersMenuCompressed = jQuery(window).width() <= 768;
|
||||
});
|
||||
}, 500),
|
||||
|
@ -1772,7 +1774,6 @@
|
|||
.filters-menu {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
background-color: white;
|
||||
width: $filter-menu-width;
|
||||
min-width: 180px;
|
||||
min-height: 100%;
|
||||
|
@ -1814,7 +1815,7 @@
|
|||
color: $blue5;
|
||||
height: 27px;
|
||||
font-size: 1.125rem !important;
|
||||
height: 2rem !important;
|
||||
height: auto !important;
|
||||
}
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
@ -1982,7 +1983,7 @@
|
|||
color: $blue5;
|
||||
height: 27px;
|
||||
font-size: 1.125rem !important;
|
||||
height: 2rem !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
a {
|
||||
|
|
|
@ -1449,6 +1449,8 @@
|
|||
this.$nextTick(() => {
|
||||
if (this.$refs['search-control'] != undefined)
|
||||
this.searchControlHeight = this.$refs['search-control'] ? this.$refs['search-control'].clientHeight + this.$refs['search-control'].offsetTop : 0;
|
||||
|
||||
if (jQuery && jQuery(window))
|
||||
this.isFiltersMenuCompressed = jQuery(window).width() <= 768;
|
||||
});
|
||||
}, 500),
|
||||
|
@ -1686,7 +1688,6 @@
|
|||
.filters-menu {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
background-color: white;
|
||||
width: $filter-menu-width;
|
||||
min-width: 180px;
|
||||
min-height: 100%;
|
||||
|
@ -1728,7 +1729,7 @@
|
|||
color: $blue5;
|
||||
height: 27px;
|
||||
font-size: 1.125rem !important;
|
||||
height: 2rem !important;
|
||||
height: auto !important;
|
||||
}
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
@ -1897,7 +1898,7 @@
|
|||
color: $blue5;
|
||||
height: 27px;
|
||||
font-size: 1.125rem !important;
|
||||
height: 2rem !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
a {
|
||||
|
|
|
@ -37,8 +37,8 @@ button.link-style:active {
|
|||
&.is-success:hover, &.is-success:focus {
|
||||
background: $success !important;
|
||||
}
|
||||
&.is-white:hover, &.is-white:focus, &.is-outlined:hover, &.is-outlined:focus {
|
||||
background: $white !important;
|
||||
&.is-white, &.is-white:hover, &.is-white:focus, &.is-outlined:hover, &.is-outlined:focus {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
&:active {
|
||||
-webkit-transform: none !important;
|
||||
|
@ -68,7 +68,8 @@ button.link-style:active {
|
|||
background-color: white !important;
|
||||
}
|
||||
&.is-white[disabled] {
|
||||
background-color: white !important;
|
||||
background-color: transparent !important;
|
||||
opacity: 0.85;
|
||||
}
|
||||
}
|
||||
.button.is-small {
|
||||
|
|
|
@ -97,6 +97,9 @@
|
|||
max-height: unset !important;
|
||||
}
|
||||
}
|
||||
.taginput.is-expanded {
|
||||
width: 100%;
|
||||
}
|
||||
.taginput-container .mdi-magnify::before,
|
||||
.autocomplete .mdi-magnify::before {
|
||||
content: 'search';
|
||||
|
@ -109,11 +112,12 @@
|
|||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-size: 20px;
|
||||
text-transform: none !important;
|
||||
}
|
||||
|
||||
.taginput-container {
|
||||
padding: 0px !important;
|
||||
background-color: white !important;
|
||||
background-color: transparent !important;
|
||||
|
||||
&:focus, &:active {
|
||||
border: none !important;
|
||||
|
@ -216,6 +220,8 @@
|
|||
// -webkit-font-smoothing: antialiased;
|
||||
// -moz-osx-font-smoothing: grayscale;
|
||||
// content: 'calendar';
|
||||
// text-transform: none !important;
|
||||
// letter-spacing: normal !important;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
@ -239,6 +245,8 @@
|
|||
line-height: inherit;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-transform: none !important;
|
||||
letter-spacing: normal !important;
|
||||
color: $secondary;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#filters-mobile-modal {
|
||||
background-color: white;
|
||||
|
||||
.modal-close {
|
||||
right: calc(8.3333333% + 20px);
|
||||
|
|
|
@ -115,6 +115,8 @@
|
|||
line-height: inherit;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-transform: none !important;
|
||||
letter-spacing: normal !important;
|
||||
}
|
||||
.mdi-chevron-left::before {
|
||||
content: "arrowleft" !important;
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
display: flex !important;
|
||||
align-items: initial;
|
||||
margin-top: -10px !important;
|
||||
text-transform: none !important;
|
||||
letter-spacing: normal !important;
|
||||
}
|
||||
&.is-loading.is-small::after {
|
||||
font-size: 0.875rem;
|
||||
|
|
|
@ -85,6 +85,8 @@
|
|||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
transform: none !important;
|
||||
text-transform: none !important;
|
||||
letter-spacing: normal !important;
|
||||
font-size: 20px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@
|
|||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,6 +113,7 @@
|
|||
text-align: left !important;
|
||||
margin-bottom: 0 !important;
|
||||
word-break: break-word;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,11 @@
|
|||
text-rendering: auto;
|
||||
vertical-align: middle;
|
||||
line-height: inherit;
|
||||
text-transform: none !important;
|
||||
letter-spacing: normal !important;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
}
|
||||
|
||||
.tainacan-icon-pdf:before {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
@ -298,7 +308,8 @@
|
|||
display: grid;
|
||||
grid-template-columns: 33% 33% 33%;
|
||||
grid-template-rows: 50% 50%;
|
||||
width: 100%; }
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper-container .swiper-slide.collection-list-item-grid .collection-items-grid img:first-of-type {
|
||||
flex-basis: 100%;
|
||||
-ms-grid-column: 1;
|
||||
|
@ -331,6 +342,8 @@
|
|||
margin: 0 -4px; }
|
||||
.wp-block-tainacan-carousel-collections-list .swiper-button-prev svg, .wp-block-tainacan-carousel-collections-list .swiper-button-next svg {
|
||||
fill: #298596; }
|
||||
.wp-block-tainacan-carousel-collections-list.alignfull .swiper-button-prev, .wp-block-tainacan-carousel-collections-list .swiper-button-next {
|
||||
margin: 0 6px; }
|
||||
.wp-block-tainacan-carousel-collections-list .collections-list-edit-container,
|
||||
.wp-block-tainacan-carousel-collections-list .tainacan-carousel {
|
||||
position: relative; }
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
@ -331,6 +341,8 @@
|
|||
margin: 0 -4px; }
|
||||
.wp-block-tainacan-carousel-terms-list .swiper-button-prev svg, .wp-block-tainacan-carousel-terms-list .swiper-button-next svg {
|
||||
fill: #298596; }
|
||||
.wp-block-tainacan-carousel-terms-list.alignfull .swiper-button-prev, .wp-block-tainacan-carousel-terms-list .swiper-button-next {
|
||||
margin: 0 6px; }
|
||||
.wp-block-tainacan-carousel-terms-list .terms-list-edit-container,
|
||||
.wp-block-tainacan-carousel-terms-list .tainacan-carousel {
|
||||
position: relative; }
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
@ -163,6 +173,11 @@
|
|||
.wp-block-tainacan-collections-list .components-spinner {
|
||||
position: absolute;
|
||||
right: 0; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list li.collection-list-item > button,
|
||||
.wp-block-tainacan-collections-list ul.collections-list li.collection-list-item > button:hover {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
opacity: 0; }
|
||||
.wp-block-tainacan-collections-list ul.collections-list.collections-list-without-margin,
|
||||
.wp-block-tainacan-collections-list ul.collections-list-edit.collections-list-without-margin {
|
||||
grid-template-columns: repeat(auto-fill, 185px);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
@ -163,6 +173,11 @@
|
|||
.wp-block-tainacan-items-list .components-spinner {
|
||||
position: absolute;
|
||||
right: 0; }
|
||||
.wp-block-tainacan-items-list ul.items-list li.item-list-item > button,
|
||||
.wp-block-tainacan-items-list ul.items-list li.item-list-item > button:hover {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
opacity: 0; }
|
||||
.wp-block-tainacan-items-list ul.items-list.items-list-without-margin,
|
||||
.wp-block-tainacan-items-list ul.items-list-edit.items-list-without-margin {
|
||||
grid-template-columns: repeat(auto-fill, 185px);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
@ -166,7 +176,7 @@
|
|||
margin: 2rem auto; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container {
|
||||
width: 100%; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block {
|
||||
height: 32px;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
|
@ -175,22 +185,22 @@
|
|||
margin: 0 auto;
|
||||
border: 1px solid #dbdbdb;
|
||||
transition: border-color ease 0.3s; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block.is-aligned-left {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block.is-aligned-left {
|
||||
margin-left: 0;
|
||||
justify-content: flex-start; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block.is-aligned-right {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block.is-aligned-right {
|
||||
margin-right: 0;
|
||||
justify-content: flex-end; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block:hover, .wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block:focus, .wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block:active {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block:hover, .wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block:focus, .wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block:active {
|
||||
border: 1px solid #545758; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input {
|
||||
width: 100%;
|
||||
min-width: 28px;
|
||||
margin: 0;
|
||||
border: none;
|
||||
padding: 4px 0.75rem;
|
||||
text-overflow: ellipsis; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block button {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block button {
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -200,36 +210,40 @@
|
|||
background: white;
|
||||
padding: 4px 1rem;
|
||||
font-size: 1rem; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block button .icon {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block button .icon {
|
||||
height: 28px; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block button .icon svg {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block button .icon svg {
|
||||
fill: #298596; }
|
||||
@media only screen and (max-width: 768px) {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
max-width: 100% !important; }
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input {
|
||||
.wp-block-tainacan-search-bar .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input {
|
||||
width: 100% !important; } }
|
||||
.wp-block-tainacan-search-bar .search-bar-collection-header-container .search-bar-collection-header-title {
|
||||
max-width: 1400px;
|
||||
margin-left: auto;
|
||||
margin-right: auto; }
|
||||
@media only screen and (max-width: 768px) {
|
||||
.wp-block-tainacan-search-bar .search-bar-collection-header-container {
|
||||
flex-wrap: wrap !important; }
|
||||
.wp-block-tainacan-search-bar .search-bar-collection-header-container .search-bar-collection-header-title {
|
||||
text-align: center !important; } }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
border: none; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block.is-aligned-left {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block.is-aligned-left {
|
||||
margin-left: 0;
|
||||
justify-content: flex-end; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block.is-aligned-right {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block.is-aligned-right {
|
||||
margin-right: 0;
|
||||
justify-content: flex-start; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block:focus, .wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block:active, .wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block:hover {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block:focus, .wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block:active, .wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block:hover {
|
||||
border: none; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block input#taincan-search-bar-block_input {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block input#tainacan-search-bar-block_input {
|
||||
width: 35%;
|
||||
border-radius: 0;
|
||||
margin-left: -52px;
|
||||
|
@ -237,12 +251,14 @@
|
|||
border: 1px solid transparent;
|
||||
background: rgba(250, 250, 250, 0.2);
|
||||
transition: border-color 0.4s ease, width 0.5s ease-in, background-color 0.3s ease, color 0.3s ease; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block input#taincan-search-bar-block_input:focus, .wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block input#taincan-search-bar-block_input:active, .wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block input#taincan-search-bar-block_input:hover {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block input#tainacan-search-bar-block_input:focus, .wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block input#tainacan-search-bar-block_input:active, .wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block input#tainacan-search-bar-block_input:hover {
|
||||
width: 100%;
|
||||
border-color: #cbcbcb;
|
||||
background: #fafafa;
|
||||
box-shadow: none; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block button {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block input#tainacan-search-bar-block_input::placeholder {
|
||||
color: #cbcbcb; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block button {
|
||||
margin-right: 0.75rem;
|
||||
padding: 0 0.35rem;
|
||||
min-height: 28px;
|
||||
|
@ -250,48 +266,46 @@
|
|||
border: none;
|
||||
background: transparent;
|
||||
cursor: pointer; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block button .icon svg {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block button .icon svg {
|
||||
fill: #cbcbcb;
|
||||
transition: fill 0.4s ease; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block button:hover {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block button:hover {
|
||||
background: transparent; }
|
||||
@media only screen and (max-width: 768px) {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
max-width: 100% !important; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #taincan-search-bar-block input#taincan-search-bar-block_input {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate #tainacan-search-bar-block input#tainacan-search-bar-block_input {
|
||||
width: 100% !important; } }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:focus input,
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:focus input::placeholder, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:active input,
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:active input::placeholder, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:hover input,
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:hover input::placeholder {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:focus input,
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:focus input::placeholder, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:active input,
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:active input::placeholder, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:hover input,
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:hover input::placeholder {
|
||||
color: #454647;
|
||||
border-width: 0; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:focus button .icon svg, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:active button .icon svg, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block:hover button .icon svg {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:focus button .icon svg, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:active button .icon svg, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block:hover button .icon svg {
|
||||
fill: #cbcbcb !important; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input {
|
||||
color: white; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input::placeholder {
|
||||
color: white; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input:focus, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input:active, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input:hover, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input:focus::placeholder, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input:active::placeholder, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input:hover::placeholder {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input:focus, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input:active, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input:hover, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input:focus::placeholder, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input:active::placeholder, .wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input:hover::placeholder {
|
||||
color: #454647; }
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block button .icon svg {
|
||||
.wp-block-tainacan-search-bar.is-style-alternate .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block button .icon svg {
|
||||
fill: #dbdbdb !important; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block {
|
||||
width: 100%;
|
||||
height: 53px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border: none; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block:focus, .wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block:active, .wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block:hover {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block:focus, .wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block:active, .wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block:hover {
|
||||
border: none; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block:hover input#taincan-search-bar-block_input {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block:hover input#tainacan-search-bar-block_input {
|
||||
width: 100%;
|
||||
padding-right: 52px;
|
||||
padding-left: 24px;
|
||||
border-width: 0; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block input#taincan-search-bar-block_input {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block input#tainacan-search-bar-block_input {
|
||||
width: 0%;
|
||||
min-width: 0%;
|
||||
border-radius: 28px;
|
||||
|
@ -301,13 +315,13 @@
|
|||
font-size: 1rem;
|
||||
border-width: 0;
|
||||
background: #f2f2f2;
|
||||
transition: width 0.5s ease-in; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block input#taincan-search-bar-block_input:focus, .wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block input#taincan-search-bar-block_input:active, .wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block input#taincan-search-bar-block_input:hover {
|
||||
transition: width 0.5s ease-in, padding 0.5s ease-in; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block input#tainacan-search-bar-block_input:focus, .wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block input#tainacan-search-bar-block_input:active, .wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block input#tainacan-search-bar-block_input:hover {
|
||||
width: 100%;
|
||||
padding-right: 52px;
|
||||
padding-left: 24px;
|
||||
border-width: 0; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block button {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block button {
|
||||
margin-left: 0.75rem;
|
||||
padding: 0 0.35rem;
|
||||
min-height: 28px;
|
||||
|
@ -315,10 +329,10 @@
|
|||
border: none;
|
||||
background: transparent;
|
||||
cursor: pointer; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block button .icon svg {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block button .icon svg {
|
||||
fill: black;
|
||||
transition: fill 0.4s ease; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #taincan-search-bar-block button:hover {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish #tainacan-search-bar-block button:hover {
|
||||
background: transparent; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish .search-bar-collection-header-container:not(.is-aligned-right):not(.is-aligned-left) .tainacan-search-container {
|
||||
width: calc(100% - 4.1667% - 53px);
|
||||
|
@ -340,14 +354,14 @@
|
|||
left: calc(4.1667% + 26px);
|
||||
left: calc(4.1667vw + 26px);
|
||||
position: absolute; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input {
|
||||
background: white;
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
margin-right: -56px;
|
||||
padding-right: 24px;
|
||||
padding-left: 24px; }
|
||||
.wp-block-tainacan-search-bar.is-style-stylish .search-bar-collection-header-container .tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input:hover {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish .search-bar-collection-header-container .tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input:hover {
|
||||
border-width: 3px !important; }
|
||||
@media only screen and (max-width: 768px) {
|
||||
.wp-block-tainacan-search-bar.is-style-stylish .search-bar-collection-header-container .tainacan-search-container {
|
||||
|
@ -377,7 +391,7 @@
|
|||
text-align: center;
|
||||
text-decoration: none !important; }
|
||||
.wp-block-tainacan-search-bar .search-bar-collection-header-container.is-aligned-left {
|
||||
min-height: 100px;
|
||||
min-height: 115px;
|
||||
text-align: left;
|
||||
flex-direction: row-reverse;
|
||||
flex-wrap: nowrap;
|
||||
|
@ -385,7 +399,7 @@
|
|||
.wp-block-tainacan-search-bar .search-bar-collection-header-container.is-aligned-left .search-bar-collection-header-title {
|
||||
text-align: right; }
|
||||
.wp-block-tainacan-search-bar .search-bar-collection-header-container.is-aligned-right {
|
||||
min-height: 100px;
|
||||
min-height: 115px;
|
||||
text-align: right;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
|
@ -407,7 +421,7 @@
|
|||
.wp-block-tainacan-search-bar .search-bar-collection-header-container .search-bar-collection-header-title span.label {
|
||||
width: 100%;
|
||||
display: block;
|
||||
margin-top: -12px;
|
||||
margin-top: -8px;
|
||||
font-weight: normal;
|
||||
font-size: 1rem; }
|
||||
@media only screen and (max-width: 1024px) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@
|
|||
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -22,11 +23,17 @@
|
|||
position: relative;
|
||||
fill: #555758; }
|
||||
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6; }
|
||||
.components-placeholder .components-placeholder__label {
|
||||
margin-bottom: 0; }
|
||||
.components-placeholder .components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758; }
|
||||
.components-placeholder__fieldset p svg {
|
||||
.components-placeholder .components-placeholder__fieldset p svg {
|
||||
margin-right: 1rem;
|
||||
top: 4px;
|
||||
position: relative;
|
||||
|
@ -111,6 +118,9 @@
|
|||
.wp-block-tainacan-modal .modal-checkbox-list .components-base-control,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .components-base-control {
|
||||
overflow: hidden; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list svg.dashicon.components-checkbox-control__checked,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black; }
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .modal-checkbox-list-item,
|
||||
.wp-block-tainacan-modal .modal-checkbox-list .components-radio-control__option,
|
||||
.wp-block-tainacan-modal .modal-radio-list .components-base-control__field .modal-checkbox-list-item,
|
||||
|
@ -163,6 +173,11 @@
|
|||
.wp-block-tainacan-terms-list .components-spinner {
|
||||
position: absolute;
|
||||
right: 0; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list li.term-list-item > button,
|
||||
.wp-block-tainacan-terms-list ul.terms-list li.term-list-item > button:hover {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
opacity: 0; }
|
||||
.wp-block-tainacan-terms-list ul.terms-list.terms-layout-grid,
|
||||
.wp-block-tainacan-terms-list ul.terms-list-edit.terms-layout-grid {
|
||||
padding: 0;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -59,7 +59,7 @@ class Elastic_Press {
|
|||
$array_dynamic_templates = $mapping["mappings"]["post"]["dynamic_templates"];
|
||||
foreach ($array_dynamic_templates as $key => $dynamic_templates) {
|
||||
if ( isset($dynamic_templates['template_meta_types'] )) {
|
||||
$mapping["mappings"]["post"]["dynamic_templates"][$key]['template_meta_types']["mapping"]["properties"][$name_field] = ['type' => 'keyword'];
|
||||
$mapping["mappings"]["post"]["dynamic_templates"][$key]['template_meta_types']["mapping"]["properties"][$name_field] = ['type' => 'keyword', 'normalizer' => 'lowerasciinormalizer'];
|
||||
// $mapping["mappings"]["post"]["dynamic_templates"][$key]['template_meta_types']["mapping"]["properties"][$name_field] =
|
||||
// ['type' => 'nested',
|
||||
// 'properties' => [
|
||||
|
@ -284,8 +284,8 @@ class Elastic_Press {
|
|||
$new_sort["post_name.raw"] = $value;
|
||||
} elseif ($key == 'post_type') {
|
||||
$new_sort["post_type.raw"] = $value;
|
||||
} elseif( !in_array("long", $parts) && in_array("meta", $parts) ) {
|
||||
$new_sort["$key.sortable"] = $value;
|
||||
// } elseif( !in_array("long", $parts) && in_array("meta", $parts) ) {
|
||||
// $new_sort["$key.sortable"] = $value;
|
||||
} else {
|
||||
$new_sort[$key] = $value;
|
||||
}
|
||||
|
@ -434,7 +434,8 @@ class Elastic_Press {
|
|||
//"size" => $filter['max_options'],
|
||||
"script" => [
|
||||
"lang" => "painless",
|
||||
"source"=> "def c= [''];if(!params._source.terms.empty && params._source.$field != null){ for(term in params._source.$field) { if(term.parent==$parent) { c.add(term.term_id); }}} return c;"
|
||||
"source" => "for (int i = 0; i < doc['$field.parent'].length; ++i) { if (doc['$field.parent'][i] == $parent) { return doc['$field.term_id'][i]; }}",
|
||||
//"source"=> "def c= [''];if(!params._source.terms.empty && params._source.$field != null){ for(term in params._source.$field) { if(term.parent==$parent) { c.add(term.term_id); }}} return c;"
|
||||
]
|
||||
)
|
||||
)
|
||||
|
@ -452,7 +453,8 @@ class Elastic_Press {
|
|||
"terms"=>array(
|
||||
"script" => [
|
||||
"lang" => "painless",
|
||||
"source"=> "def c= ['']; if(!params._source.terms.empty && params._source.$field != null) { for(term in params._source.$field) { if( [$terms_id_inlcude].contains(term.term_id) ) { c.add(term.term_id); }}} return c;"
|
||||
"source" => "def c= ['']; for (int i = 0; i < doc['$field.term_id'].length; ++i) { if( [$terms_id_inlcude].contains(doc['$field.term_id'][i]) ) { c.add(doc['$field.term_id'][i]); } } return c;"
|
||||
//"source"=> "def c= ['']; if(!params._source.terms.empty && params._source.$field != null) { for(term in params._source.$field) { if( [$terms_id_inlcude].contains(term.term_id) ) { c.add(term.term_id); }}} return c;"
|
||||
]
|
||||
)
|
||||
)
|
||||
|
@ -559,7 +561,8 @@ class Elastic_Press {
|
|||
"terms" => [
|
||||
"script" => [
|
||||
"lang" => "painless",
|
||||
"source" => "def c= ['']; if(!params._source.terms.empty && params._source.$field != null) { for(term in params._source.$field) { if(term.parent==$parent) { c.add(term.term_id); }}} return c;"
|
||||
"source" => "for (int i = 0; i < doc['$field.parent'].length; ++i) { if (doc['$field.parent'][i] == $parent) { return doc['$field.term_id'][i]; }}",
|
||||
//"source" => "def c= ['']; if(!params._source.terms.empty && params._source.$field != null) { for(term in params._source.$field) { if(term.parent==$parent) { c.add(term.term_id); }}} return c;"
|
||||
]
|
||||
]
|
||||
]
|
||||
|
@ -575,7 +578,8 @@ class Elastic_Press {
|
|||
"terms" => array(
|
||||
"script" => [
|
||||
"lang" => "painless",
|
||||
"source"=> "def c= ['']; if(!params._source.terms.empty && params._source.$field != null) { for(term in params._source.$field) { if(term.parent==$parent) { c.add(term.term_id); }}} return c;"
|
||||
"source" => "for (int i = 0; i < doc['$field.parent'].length; ++i) { if (doc['$field.parent'][i] == $parent) { return doc['$field.term_id'][i]; }}",
|
||||
//"source"=> "def c= ['']; if(!params._source.terms.empty && params._source.$field != null) { for(term in params._source.$field) { if(term.parent==$parent) { c.add(term.term_id); }}} return c;"
|
||||
]
|
||||
)
|
||||
)
|
||||
|
|
|
@ -52,7 +52,7 @@ class Media {
|
|||
return false;
|
||||
}
|
||||
|
||||
$file = fopen($filename,'r');
|
||||
$file = file_get_contents($filename);
|
||||
|
||||
if (false === $file) {
|
||||
return false;
|
||||
|
@ -75,7 +75,7 @@ class Media {
|
|||
return false;
|
||||
}
|
||||
|
||||
return $this->insert_attachment_from_blob(fopen($filename,'r'), basename($filename), $post_id);
|
||||
return $this->insert_attachment_from_blob(file_get_contents($filename), basename($filename), $post_id);
|
||||
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ class Media {
|
|||
|
||||
do_action('tainacan-pre-insert-attachment', $blob, $filename, $post_id);
|
||||
|
||||
$upload = wp_upload_bits( $filename, null, '' );
|
||||
$upload = wp_upload_bits( $filename, null, $blob );
|
||||
if( !empty( $upload['error'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -235,6 +235,7 @@ class Private_Files {
|
|||
$mime_type = \Tainacan\Media::get_instance()->get_mime_content_type($existing_file);
|
||||
|
||||
if ($item instanceof \Tainacan\Entities\Item && $item->can_read()) {
|
||||
http_response_code(200); //header("HTTP/1.1 200 Ok");
|
||||
//header('Content-Description: File Transfer');
|
||||
//header('Content-Type: application/octet-stream');
|
||||
header("Content-type: " . $mime_type);
|
||||
|
|
|
@ -63,6 +63,10 @@
|
|||
'query.metaquery'() {
|
||||
if (!this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
},
|
||||
facetsFromItemSearch() {
|
||||
if (this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -114,7 +114,6 @@ export const dynamicFilterTypeMixin = {
|
|||
});
|
||||
|
||||
} else {
|
||||
|
||||
let callback = new Promise((resolve) => {
|
||||
for (const facet in this.facetsFromItemSearch) {
|
||||
if (facet == this.filter.id)
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<div
|
||||
class="options-input"
|
||||
v-for="(interval, index) of intervals"
|
||||
:key="index">
|
||||
:key="0 + index">
|
||||
<b-field>
|
||||
<b-input
|
||||
expanded
|
||||
|
|
|
@ -40,6 +40,10 @@
|
|||
'query.metaquery'() {
|
||||
if (!this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
},
|
||||
facetsFromItemSearch() {
|
||||
if (this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
:is="filter.filter_type_object.component"
|
||||
:filter="filter"
|
||||
:query="query"
|
||||
:is-using-elastic-search="isUsingElasticSearch"
|
||||
:is-repository-level="isRepositoryLevel"
|
||||
:is-loading-items.sync="isLoadingItems"
|
||||
@input="onInput"
|
||||
|
@ -63,7 +64,7 @@
|
|||
mounted() {
|
||||
if (this.isUsingElasticSearch) {
|
||||
this.$eventBusSearch.$on('isLoadingItems', isLoadingItems => {
|
||||
this.isLoadingOptions = isLoadingItems;
|
||||
this.isLoadingItems = isLoadingItems;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -149,7 +149,6 @@
|
|||
this.getOptionsValuesCancel = promise.source;
|
||||
|
||||
} else {
|
||||
|
||||
for (const facet in this.facetsFromItemSearch) {
|
||||
if (facet == this.filter.id) {
|
||||
if (Array.isArray(this.facetsFromItemSearch[facet]))
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
v-mask="dateMask"
|
||||
v-model="dateValue"
|
||||
@input.native="onInput"
|
||||
@blur="onBlur"
|
||||
:placeholder="dateFormat.toLowerCase()" />
|
||||
<p
|
||||
v-if="isInvalidDate && dateValue"
|
||||
|
@ -76,7 +77,10 @@
|
|||
} else {
|
||||
this.$emit('input', [null]);
|
||||
}
|
||||
}, 300)
|
||||
}, 300),
|
||||
onBlur() {
|
||||
this.$emit('blur');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
:id="metadatum.metadatum.metadata_type_object.component + '-' + metadatum.metadatum.slug"
|
||||
:value="value"
|
||||
@input="onInput($event)"
|
||||
@blur="onBlur"
|
||||
type="number"
|
||||
lang="en"
|
||||
:step="getStep"/>
|
||||
|
@ -27,6 +28,9 @@
|
|||
methods: {
|
||||
onInput(value) {
|
||||
this.$emit('input', value);
|
||||
},
|
||||
onBlur() {
|
||||
this.$emit('blur');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
size="is-small"
|
||||
icon="magnify"
|
||||
@input="onInput"
|
||||
@blur="onBlur"
|
||||
:data="options"
|
||||
:maxtags="maxtags != undefined ? maxtags : (metadatum.metadatum.multiple == 'yes' || allowNew === true ? 100 : 1)"
|
||||
autocomplete
|
||||
|
@ -95,6 +96,9 @@
|
|||
this.selected = newSelected;
|
||||
this.$emit('input', newSelected.map((item) => item.value));
|
||||
},
|
||||
onBlur() {
|
||||
this.$emit('blur');
|
||||
},
|
||||
search: _.debounce(function(query) {
|
||||
if ( this.selected.length > 0 && this.metadatum.metadatum.multiple === 'no')
|
||||
return '';
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
methods: {
|
||||
onSelected(value) {
|
||||
this.$emit('input', value);
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<b-field
|
||||
:addons="false"
|
||||
:message="getErrorMessage"
|
||||
:message="errorMessage"
|
||||
:type="metadatumTypeMessage">
|
||||
<span
|
||||
class="collapse-handle"
|
||||
|
@ -45,7 +45,8 @@
|
|||
:is="metadatum.metadatum.metadata_type_object.component"
|
||||
v-model="inputs[0]"
|
||||
:metadatum="metadatum"
|
||||
@input="changeValue()"/>
|
||||
@input="changeValue()"
|
||||
@blur="performValueChange()"/>
|
||||
<template v-if="metadatum.metadatum.multiple == 'yes' && inputs.length > 1">
|
||||
<transition-group
|
||||
name="filter-item"
|
||||
|
@ -57,7 +58,8 @@
|
|||
:is="metadatum.metadatum.metadata_type_object.component"
|
||||
v-model="inputs[index]"
|
||||
:metadatum="metadatum"
|
||||
@input="changeValue()"/>
|
||||
@input="changeValue()"
|
||||
@blur="performValueChange()"/>
|
||||
<a
|
||||
v-if="index > 0"
|
||||
@click="removeInput(index)"
|
||||
|
@ -92,7 +94,8 @@
|
|||
:is="metadatum.metadatum.metadata_type_object.component"
|
||||
v-model="inputs"
|
||||
:metadatum="metadatum"
|
||||
@input="changeValue()"/>
|
||||
@input="changeValue()"
|
||||
@blur="performValueChange()"/>
|
||||
</div>
|
||||
</transition>
|
||||
</b-field>
|
||||
|
@ -109,33 +112,33 @@
|
|||
},
|
||||
data(){
|
||||
return {
|
||||
inputs: []
|
||||
inputs: [],
|
||||
errorMessage: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getErrorMessage() {
|
||||
let errorMessage = '';
|
||||
let errors = eventBus.getErrors(this.metadatum.metadatum.id);
|
||||
|
||||
if (errors) {
|
||||
for (let error of errors) {
|
||||
for (let index of Object.keys(error))
|
||||
errorMessage += error[index] + '\n';
|
||||
}
|
||||
}
|
||||
|
||||
return errorMessage;
|
||||
},
|
||||
metadatumTypeMessage() {
|
||||
return this.getErrorMessage ? 'is-danger' : ''
|
||||
return this.errorMessage ? 'is-danger' : ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.createInputs();
|
||||
eventBus.$on('updateErrorMessageOf#' + this.metadatum.metadatum.id, (errors) => {
|
||||
let updatedErrorMessage = '';
|
||||
if (errors && this.metadatum.metadatum.id == errors.metadatum_id && errors.errors) {
|
||||
for (let error of errors.errors) {
|
||||
for (let index of Object.keys(error))
|
||||
updatedErrorMessage += error[index] + '\n';
|
||||
}
|
||||
}
|
||||
this.errorMessage = updatedErrorMessage;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
changeValue: _.debounce(function() {
|
||||
|
||||
this.performValueChange();
|
||||
}, 800),
|
||||
performValueChange() {
|
||||
if (this.inputs && this.inputs.length > 0 && this.inputs[0] && this.inputs[0].value) {
|
||||
let terms = this.inputs.map(term => term.value)
|
||||
|
||||
|
@ -150,7 +153,6 @@
|
|||
|
||||
if (equal.length == terms.length && this.metadatum.value.length <= equal.length)
|
||||
return;
|
||||
|
||||
}
|
||||
} else if (this.metadatum.value.constructor.name == 'Object') {
|
||||
|
||||
|
@ -170,14 +172,16 @@
|
|||
|
||||
if (equal.length == this.inputs.length && this.metadatum.value.length <= equal.length)
|
||||
return;
|
||||
} else if (this.inputs && this.inputs.length == 1 && this.inputs[0] == this.metadatum.value) {
|
||||
return
|
||||
}
|
||||
|
||||
eventBus.$emit('input', {
|
||||
itemId: this.metadatum.item.id,
|
||||
metadatumId: this.metadatum.metadatum.id,
|
||||
values: this.inputs ? this.inputs : ''
|
||||
});
|
||||
|
||||
}, 900),
|
||||
},
|
||||
createInputs() {
|
||||
if (this.metadatum.value instanceof Array)
|
||||
this.inputs = this.metadatum.value.slice(0);
|
||||
|
@ -196,6 +200,9 @@
|
|||
const array = ['tainacan-relationship','tainacan-taxonomy'];
|
||||
return !(array.indexOf(component) >= 0 );
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
eventBus.$off('updateErrorMessageOf#' + this.metadatum.metadatum.id);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -86,10 +86,6 @@
|
|||
this.valueComponent = values;
|
||||
}
|
||||
},
|
||||
onInput($event) {
|
||||
this.valueComponent = $event;
|
||||
this.$emit('input', this.valueComponent);
|
||||
},
|
||||
reload($event) {
|
||||
if ($event.taxonomyId == this.taxonomyId && $event.metadatumId == this.metadatum.metadatum.id) {
|
||||
this.valueComponent = $event.values;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<template>
|
||||
<div class="block">
|
||||
<b-taginput
|
||||
:id="metadatumComponentId"
|
||||
expanded
|
||||
:disabled="disabled"
|
||||
:id="metadatumComponentId"
|
||||
size="is-small"
|
||||
icon="magnify"
|
||||
:allow-new="false"
|
||||
|
@ -19,7 +20,20 @@
|
|||
:loading="isFetching"
|
||||
:class="{'has-selected': selected != undefined && selected != []}"
|
||||
autocomplete
|
||||
@typing="autoCompleteTerm"/>
|
||||
@typing="autoCompleteTerm">
|
||||
<template slot-scope="props">
|
||||
<div class="media">
|
||||
<div class="media-content">
|
||||
{{ props.option.label }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template
|
||||
v-if="!isFetching"
|
||||
slot="empty">
|
||||
{{ $i18n.get('info_no_terms_found') }}
|
||||
</template>
|
||||
</b-taginput>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -31,7 +45,6 @@
|
|||
return {
|
||||
selected: [],
|
||||
labels: [],
|
||||
termList: [],
|
||||
isFetching: false,
|
||||
}
|
||||
},
|
||||
|
@ -65,7 +78,6 @@
|
|||
'getTerms'
|
||||
]),
|
||||
autoCompleteTerm: _.debounce( function(value) {
|
||||
this.termList = [];
|
||||
this.labels = [];
|
||||
this.isFetching = true;
|
||||
|
||||
|
@ -80,14 +92,16 @@
|
|||
search: {
|
||||
searchterm: value
|
||||
},
|
||||
all: true
|
||||
all: true,
|
||||
order: 'asc',
|
||||
offset: 0,
|
||||
number: 12
|
||||
}).then((res) => {
|
||||
this.termList = res.terms;
|
||||
|
||||
for (let term of this.termList)
|
||||
for (let term of res.terms)
|
||||
this.labels.push({label: term.name, value: term.id});
|
||||
|
||||
if (this.termList.length <= 0 && this.allowSelectToCreate)
|
||||
if (res.terms.length <= 0 && this.allowSelectToCreate)
|
||||
this.labels.push({label: `${value} (${this.$i18n.get('select_to_create')})`, value: value})
|
||||
|
||||
this.isFetching = false;
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
:disabled="disabled"
|
||||
:id="metadatum.metadatum.metadata_type_object.component + '-' + metadatum.metadatum.slug"
|
||||
:value="value"
|
||||
@input="onInput($event)"/>
|
||||
@input="onInput($event)"
|
||||
@blur="onBlur"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -16,6 +17,9 @@
|
|||
methods: {
|
||||
onInput(value) {
|
||||
this.$emit('input', value);
|
||||
},
|
||||
onBlur() {
|
||||
this.$emit('blur');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
:id="metadatum.metadatum.metadata_type_object.component + '-' + metadatum.metadatum.slug"
|
||||
:value="value"
|
||||
@input="onInput($event)"
|
||||
@blur="onBlur"
|
||||
type="textarea" />
|
||||
</template>
|
||||
|
||||
|
@ -17,6 +18,9 @@
|
|||
methods: {
|
||||
onInput(value) {
|
||||
this.$emit('input', value);
|
||||
},
|
||||
onBlur() {
|
||||
this.$emit('blur');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import axios from 'axios';
|
||||
|
||||
const tainacan = axios.create({
|
||||
baseURL: tainacan_plugin.root
|
||||
baseURL: tainacan_blocks.root
|
||||
});
|
||||
|
||||
tainacan.defaults.headers.common['X-WP-Nonce'] = tainacan_plugin.nonce;
|
||||
tainacan.defaults.headers.common['X-WP-Nonce'] = tainacan_blocks.nonce;
|
||||
|
||||
export default tainacan;
|
|
@ -308,13 +308,13 @@ function tainacan_blocks_add_plugin_settings() {
|
|||
|
||||
$settings = tainacan_blocks_get_plugin_js_settings();
|
||||
|
||||
wp_localize_script( 'terms-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'items-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'dynamic-items-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'carousel-items-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'carousel-terms-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'search-bar', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'collections-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'carousel-collections-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'facets-list', 'tainacan_plugin', $settings );
|
||||
wp_localize_script( 'terms-list', 'tainacan_blocks', $settings );
|
||||
wp_localize_script( 'items-list', 'tainacan_blocks', $settings );
|
||||
wp_localize_script( 'dynamic-items-list', 'tainacan_blocks', $settings );
|
||||
wp_localize_script( 'carousel-items-list', 'tainacan_blocks', $settings );
|
||||
wp_localize_script( 'carousel-terms-list', 'tainacan_blocks', $settings );
|
||||
wp_localize_script( 'search-bar', 'tainacan_blocks', $settings );
|
||||
wp_localize_script( 'collections-list', 'tainacan_blocks', $settings );
|
||||
wp_localize_script( 'carousel-collections-list', 'tainacan_blocks', $settings );
|
||||
wp_localize_script( 'facets-list', 'tainacan_blocks', $settings );
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
}
|
||||
.block-control {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -28,9 +29,17 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.components-placeholder__fieldset p {
|
||||
.components-placeholder {
|
||||
margin-bottom: 0;
|
||||
background: #f6f6f6;
|
||||
|
||||
.components-placeholder__label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.components-placeholder__fieldset p {
|
||||
font-size: 0.875rem !important;
|
||||
margin-top: -2px;
|
||||
margin: 12px 0;
|
||||
color: #454647;
|
||||
fill: #555758;
|
||||
|
||||
svg {
|
||||
|
@ -39,6 +48,7 @@
|
|||
position: relative;
|
||||
fill: #555758;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Grid mixin for display: grid compatibility
|
||||
|
@ -156,6 +166,10 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
svg.dashicon.components-checkbox-control__checked {
|
||||
fill: black;
|
||||
}
|
||||
|
||||
.modal-checkbox-list-item,
|
||||
.components-radio-control__option {
|
||||
display: flex;
|
||||
|
|
|
@ -163,6 +163,7 @@
|
|||
grid-template-columns: 33% 33% 33%;
|
||||
grid-template-rows: 50% 50%;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
img:first-of-type {
|
||||
flex-basis: 100%;
|
||||
|
@ -206,6 +207,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
&.alignfull .swiper-button-prev, .swiper-button-next {
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
// Carousel placeholder on editor side ----------------------------------------------------
|
||||
.collections-list-edit-container,
|
||||
.tainacan-carousel {
|
||||
|
|
|
@ -224,7 +224,7 @@ export default class CollectionsModal extends React.Component {
|
|||
{ collection.thumbnail ?
|
||||
<img
|
||||
aria-hidden
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
|
||||
: null
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ export default class CollectionsModal extends React.Component {
|
|||
{ collection.thumbnail ?
|
||||
<img
|
||||
aria-hidden
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
|
||||
: null
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ registerBlockType('tainacan/carousel-collections-list', {
|
|||
?
|
||||
collectionItems[0].thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ collectionItems[0] && collectionItems[0].name ? collectionItems[0].name : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
<img
|
||||
|
@ -163,7 +163,7 @@ registerBlockType('tainacan/carousel-collections-list', {
|
|||
?
|
||||
collectionItems[1].thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ collectionItems[1] && collectionItems[1].name ? collectionItems[1].name : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
<img
|
||||
|
@ -176,7 +176,7 @@ registerBlockType('tainacan/carousel-collections-list', {
|
|||
?
|
||||
collectionItems[2].thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ collectionItems[2] && collectionItems[2].name ? collectionItems[2].name : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
</div>
|
||||
|
@ -191,7 +191,7 @@ registerBlockType('tainacan/carousel-collections-list', {
|
|||
?
|
||||
collection.thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ collection.name ? collection.name : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ registerBlockType('tainacan/carousel-collections-list', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
@ -542,8 +542,8 @@ registerBlockType('tainacan/carousel-collections-list', {
|
|||
loop-slides={ '' + loopSlides }
|
||||
hide-name={ '' + hideName }
|
||||
max-collections-number={ maxCollectionsNumber }
|
||||
tainacan-api-root={ tainacan_plugin.root }
|
||||
tainacan-base-url={ tainacan_plugin.base_url }
|
||||
tainacan-api-root={ tainacan_blocks.root }
|
||||
tainacan-base-url={ tainacan_blocks.base_url }
|
||||
show-collection-thumbnail={ '' + showCollectionThumbnail }
|
||||
id={ 'wp-block-tainacan-carousel-collections-list_' + blockId }>
|
||||
{ content }
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
right: 0;
|
||||
}
|
||||
|
||||
// For all view modes ------------------------------------------------
|
||||
ul.collections-list li.collection-list-item > button,
|
||||
ul.collections-list li.collection-list-item > button:hover {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
// Grid View Mode ----------------------------------------------------
|
||||
ul.collections-list.collections-list-without-margin,
|
||||
ul.collections-list-edit.collections-list-without-margin {
|
||||
|
|
|
@ -226,7 +226,7 @@ export default class CollectionsModal extends React.Component {
|
|||
{ collection.thumbnail ?
|
||||
<img
|
||||
aria-hidden
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
|
||||
: null
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ export default class CollectionsModal extends React.Component {
|
|||
{ collection.thumbnail ?
|
||||
<img
|
||||
aria-hidden
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
|
||||
: null
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ registerBlockType('tainacan/collections-list', {
|
|||
target="_blank"
|
||||
className={ (!showName ? 'collection-without-name' : '') + ' ' + (!showImage ? 'collection-without-image' : '') }>
|
||||
<img
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ collection.thumbnail && collection.thumbnail[0] ? collection.thumbnail[0].alt : collection.name }/>
|
||||
<span>{ collection.name ? collection.name : '' }</span>
|
||||
</a>
|
||||
|
@ -304,7 +304,7 @@ registerBlockType('tainacan/collections-list', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
|
|
@ -4,6 +4,15 @@ import FacetsListTheme from './facets-list-theme.vue';
|
|||
// This is rendered on the theme side.
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
// Gets all divs with content created by our block;
|
||||
let blocks = document.getElementsByClassName('wp-block-tainacan-facets-list');
|
||||
|
||||
if (blocks) {
|
||||
let blockIds = Object.values(blocks).map((block) => block.id);
|
||||
|
||||
// Creates a new Vue Instance to manage each block isolatelly
|
||||
for (let blockId of blockIds) {
|
||||
|
||||
// Configure Vue logic before passing it to constructor:
|
||||
let vueOptions = {
|
||||
data: {
|
||||
|
@ -11,6 +20,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
metadatumType: '',
|
||||
collectionId: '',
|
||||
collectionSlug: '',
|
||||
parentTermId: null,
|
||||
showImage: true,
|
||||
showItemsCount: true,
|
||||
showSearchBar: false,
|
||||
|
@ -31,6 +41,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
metadatumType: this.metadatumType,
|
||||
collectionId: this.collectionId,
|
||||
collectionSlug: this.collectionSlug,
|
||||
parentTermId: this.parentTermId,
|
||||
showImage: this.showImage,
|
||||
showItemsCount: this.showItemsCount,
|
||||
showSearchBar: this.showSearchBar,
|
||||
|
@ -51,6 +62,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
this.metadatumType = this.$el.attributes['metadatum-type'] != undefined ? this.$el.attributes['metadatum-type'].value : undefined;
|
||||
this.collectionId = this.$el.attributes['collection-id'] != undefined ? this.$el.attributes['collection-id'].value : undefined;
|
||||
this.collectionSlug = this.$el.attributes['collection-slug'] != undefined ? this.$el.attributes['collection-slug'].value : undefined;
|
||||
this.parentTermId = this.$el.attributes['parent-term-id'] != undefined ? this.$el.attributes['parent-term-id'].value : undefined;
|
||||
this.showImage = this.$el.attributes['show-image'] != undefined ? this.$el.attributes['show-image'].value == 'true' : true;
|
||||
this.showItemsCount = this.$el.attributes['show-items-count'] != undefined ? this.$el.attributes['show-items-count'].value == 'true' : true;
|
||||
this.showSearchBar = this.$el.attributes['show-search-bar'] != undefined ? this.$el.attributes['show-search-bar'].value == 'true' : false;
|
||||
|
@ -70,14 +82,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
}
|
||||
}
|
||||
};
|
||||
// Gets all divs with content created by our block;
|
||||
let blocks = document.getElementsByClassName('wp-block-tainacan-facets-list');
|
||||
|
||||
if (blocks) {
|
||||
let blockIds = Object.values(blocks).map((block) => block.id);
|
||||
|
||||
// Creates a new Vue Instance to manage each block isolatelly
|
||||
for (let blockId of blockIds) {
|
||||
new Vue( Object.assign({ el: '#' + blockId }, vueOptions) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,6 +159,7 @@ export default {
|
|||
metadatumType: String,
|
||||
collectionId: String,
|
||||
collectionSlug: String,
|
||||
parentTermId: String,
|
||||
showImage: Boolean,
|
||||
showItemsCount: Boolean,
|
||||
showSearchBar: Boolean,
|
||||
|
@ -228,6 +229,14 @@ export default {
|
|||
if (this.lastTerm != undefined)
|
||||
queryObject.last_term = this.lastTerm;
|
||||
|
||||
// Set up parentTerm for taxonomies
|
||||
if (this.parentTermId !== undefined && this.parentTermId !== null && this.parentTermId !== '' && this.metadatumType == 'Taxonomy')
|
||||
queryObject.parent = this.parentTermId;
|
||||
else {
|
||||
delete queryObject.parent;
|
||||
this.parentTermId = null;
|
||||
}
|
||||
|
||||
// Parameter fo tech entity object with image and url
|
||||
queryObject['context'] = 'extended';
|
||||
|
||||
|
|
|
@ -2,11 +2,12 @@ const { registerBlockType } = wp.blocks;
|
|||
|
||||
const { __ } = wp.i18n;
|
||||
|
||||
const { RangeControl, Spinner, Button, ToggleControl, Tooltip, Placeholder, Toolbar, PanelBody } = wp.components;
|
||||
const { BaseControl, RangeControl, Spinner, Button, ToggleControl, Tooltip, Placeholder, Toolbar, PanelBody } = wp.components;
|
||||
|
||||
const { InspectorControls, BlockControls } = wp.editor;
|
||||
|
||||
import MetadataModal from './metadata-modal.js';
|
||||
import ParentTermModal from './parent-term-modal.js';
|
||||
import tainacan from '../../api-client/axios.js';
|
||||
import axios from 'axios';
|
||||
import qs from 'qs';
|
||||
|
@ -116,6 +117,14 @@ registerBlockType('tainacan/facets-list', {
|
|||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
parentTerm: {
|
||||
type: Number,
|
||||
default: null
|
||||
},
|
||||
isParentTermModalOpen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
supports: {
|
||||
align: ['full', 'wide'],
|
||||
|
@ -141,7 +150,9 @@ registerBlockType('tainacan/facets-list', {
|
|||
facetsRequestSource,
|
||||
maxFacetsNumber,
|
||||
searchString,
|
||||
isLoading
|
||||
isLoading,
|
||||
parentTerm,
|
||||
isParentTermModalOpen
|
||||
} = attributes;
|
||||
|
||||
// Obtains block's client id to render it on save function
|
||||
|
@ -165,7 +176,7 @@ registerBlockType('tainacan/facets-list', {
|
|||
?
|
||||
facet.entity['header_image']
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`
|
||||
}
|
||||
alt={ facet.label ? facet.label : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
: null
|
||||
|
@ -181,7 +192,7 @@ registerBlockType('tainacan/facets-list', {
|
|||
?
|
||||
facet.entity.thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ facet.label ? facet.label : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
: null
|
||||
|
@ -231,6 +242,14 @@ registerBlockType('tainacan/facets-list', {
|
|||
setAttributes({ searchString: undefined });
|
||||
}
|
||||
|
||||
// Set up parentTerm for taxonomies
|
||||
if (parentTerm && parentTerm.id !== undefined && parentTerm.id !== null && parentTerm.id !== '' && metadatumType == 'Taxonomy')
|
||||
queryObject.parent = parentTerm.id;
|
||||
else {
|
||||
delete queryObject.parent;
|
||||
setAttributes({ parentTerm: null });
|
||||
}
|
||||
|
||||
// Parameter fo tech entity object with image and url
|
||||
queryObject['context'] = 'extended';
|
||||
|
||||
|
@ -243,13 +262,13 @@ registerBlockType('tainacan/facets-list', {
|
|||
if (metadatumType == 'Taxonomy') {
|
||||
for (let facet of response.data.values) {
|
||||
facetsObject.push(Object.assign({
|
||||
url: facet.entity && facet.entity.url ? facet.entity.url : tainacan_plugin.site_url + '/' + collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value
|
||||
url: facet.entity && facet.entity.url ? facet.entity.url : tainacan_blocks.site_url + '/' + collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value
|
||||
}, facet));
|
||||
}
|
||||
} else {
|
||||
for (let facet of response.data.values) {
|
||||
facetsObject.push(Object.assign({
|
||||
url: tainacan_plugin.site_url + '/' + collectionSlug + '/#/?metaquery[0][key]=' + metadatumId + '&metaquery[0][value]=' + facet.value
|
||||
url: tainacan_blocks.site_url + '/' + collectionSlug + '/#/?metaquery[0][key]=' + metadatumId + '&metaquery[0][value]=' + facet.value
|
||||
}, facet));
|
||||
}
|
||||
}
|
||||
|
@ -285,6 +304,13 @@ registerBlockType('tainacan/facets-list', {
|
|||
} );
|
||||
}
|
||||
|
||||
function openParentTermModal() {
|
||||
isParentTermModalOpen = true;
|
||||
setAttributes( {
|
||||
isParentTermModalOpen: isParentTermModalOpen
|
||||
} );
|
||||
}
|
||||
|
||||
function updateLayout(newLayout) {
|
||||
layout = newLayout;
|
||||
|
||||
|
@ -391,6 +417,25 @@ registerBlockType('tainacan/facets-list', {
|
|||
max={ 96 }
|
||||
/>
|
||||
</div>
|
||||
{ metadatumType == 'Taxonomy' ?
|
||||
<div>
|
||||
<BaseControl
|
||||
id="parent-term-selection"
|
||||
label={ (parentTerm && (parentTerm.id === '0' || parentTerm.id === 0)) ? __('Showing only:', 'tainacan') : __('Showing children of:', 'tainacan') }
|
||||
help="Narrow terms to children of a parent term."
|
||||
>
|
||||
<span style={{ fontWeight: 'bold' }}> { parentTerm && parentTerm.name ? parentTerm.name : __('Any term.', 'tainacan') }</span>
|
||||
<br />
|
||||
<Button
|
||||
style={{ margin: '6px auto 16px auto', display: 'block' }}
|
||||
id="parent-term-selection"
|
||||
isPrimary
|
||||
onClick={ () => openParentTermModal() }>
|
||||
{__('Select parent term', 'tainacan')}
|
||||
</Button>
|
||||
</BaseControl>
|
||||
</div>
|
||||
: null}
|
||||
<hr></hr>
|
||||
<div>
|
||||
{ layout == 'list' && (metadatumType == 'Taxonomy' || metadatumType == 'Relationship') ?
|
||||
|
@ -497,7 +542,8 @@ registerBlockType('tainacan/facets-list', {
|
|||
setAttributes({
|
||||
metadatumId: metadatumId,
|
||||
metadatumType: metadatumType,
|
||||
isModalOpen: false
|
||||
isModalOpen: false,
|
||||
parentTerm: null
|
||||
});
|
||||
setContent();
|
||||
}}
|
||||
|
@ -505,6 +551,23 @@ registerBlockType('tainacan/facets-list', {
|
|||
: null
|
||||
}
|
||||
|
||||
{ isParentTermModalOpen ?
|
||||
<ParentTermModal
|
||||
existingFacetId={ parentTerm && parentTerm.id ? parentTerm.id : null }
|
||||
collectionId={ collectionId }
|
||||
metadatumId={ metadatumId }
|
||||
onSelectFacet={ (selectedFacet) => {
|
||||
parentTerm = selectedFacet.id !== null && selectedFacet.id !== '' && selectedFacet.id !== undefined ? selectedFacet : null
|
||||
setAttributes({
|
||||
parentTerm: parentTerm,
|
||||
isParentTermModalOpen: false
|
||||
});
|
||||
setContent();
|
||||
}}
|
||||
onCancelSelection={ () => setAttributes({ isParentTermModalOpen: false }) }/>
|
||||
: null
|
||||
}
|
||||
|
||||
{ facets.length ? (
|
||||
<div className="block-control">
|
||||
<p>
|
||||
|
@ -523,7 +586,7 @@ registerBlockType('tainacan/facets-list', {
|
|||
isPrimary
|
||||
type="submit"
|
||||
onClick={ () => openMetadataModal() }>
|
||||
{__('Configure search', 'tainacan')}
|
||||
{__('Select facets', 'tainacan')}
|
||||
</Button>
|
||||
</div>
|
||||
): null
|
||||
|
@ -565,7 +628,7 @@ registerBlockType('tainacan/facets-list', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
@ -580,12 +643,32 @@ registerBlockType('tainacan/facets-list', {
|
|||
</svg>
|
||||
{__('List facets from a Tainacan Collection or Repository', 'tainacan')}
|
||||
</p>
|
||||
{
|
||||
parentTerm && parentTerm.id && metadatumType == 'Taxonomy'?
|
||||
<div style={{ display: 'flex' }}>
|
||||
<Button
|
||||
isPrimary
|
||||
type="submit"
|
||||
onClick={ () => openParentTermModal() }>
|
||||
{__('Change parent term', 'tainacan')}
|
||||
</Button>
|
||||
<p style={{ margin: '0 12px' }}>{__('or', 'tainacan')}</p>
|
||||
<Button
|
||||
isPrimary
|
||||
type="submit"
|
||||
onClick={ () => openMetadataModal() }>
|
||||
{__('Change facets source', 'tainacan')}
|
||||
</Button>
|
||||
</div>
|
||||
:
|
||||
<Button
|
||||
isPrimary
|
||||
type="submit"
|
||||
onClick={ () => openMetadataModal() }>
|
||||
{__('Select facets', 'tainacan')}
|
||||
</Button>
|
||||
}
|
||||
|
||||
</Placeholder>
|
||||
) : null
|
||||
}
|
||||
|
@ -632,6 +715,139 @@ registerBlockType('tainacan/facets-list', {
|
|||
</div>
|
||||
);
|
||||
},
|
||||
save({ attributes, className }){
|
||||
const {
|
||||
content,
|
||||
blockId,
|
||||
collectionId,
|
||||
collectionSlug,
|
||||
parentTerm,
|
||||
showImage,
|
||||
showItemsCount,
|
||||
showLoadMore,
|
||||
layout,
|
||||
cloudRate,
|
||||
gridMargin,
|
||||
metadatumId,
|
||||
metadatumType,
|
||||
maxFacetsNumber,
|
||||
showSearchBar,
|
||||
} = attributes;
|
||||
return <div
|
||||
className={ className }
|
||||
metadatum-id={ metadatumId }
|
||||
metadatum-type={ metadatumType }
|
||||
collection-id={ collectionId }
|
||||
collection-slug={ collectionSlug }
|
||||
parent-term-id={ parentTerm ? parentTerm.id : null }
|
||||
show-image={ '' + showImage }
|
||||
show-items-count={ '' + showItemsCount }
|
||||
show-search-bar={ '' + showSearchBar }
|
||||
show-load-more={ '' + showLoadMore }
|
||||
layout={ layout }
|
||||
cloud-rate={ cloudRate }
|
||||
grid-margin={ gridMargin }
|
||||
max-facets-number={ maxFacetsNumber }
|
||||
tainacan-api-root={ tainacan_blocks.root }
|
||||
tainacan-base-url={ tainacan_blocks.base_url }
|
||||
tainacan-site-url={ tainacan_blocks.site_url }
|
||||
id={ 'wp-block-tainacan-facets-list_' + blockId }>
|
||||
{ content }
|
||||
</div>
|
||||
},
|
||||
deprecated: [
|
||||
{
|
||||
attributes: {
|
||||
content: {
|
||||
type: 'array',
|
||||
source: 'children',
|
||||
selector: 'div'
|
||||
},
|
||||
collectionId: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
collectionSlug: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
facets: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
facetsObject: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
showImage: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showItemsCount: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showLoadMore: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showSearchBar: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
layout: {
|
||||
type: String,
|
||||
default: 'grid'
|
||||
},
|
||||
cloudRate: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
isModalOpen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
gridMargin: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
metadatumId: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
metadatumType: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
facetsRequestSource: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
maxFacetsNumber: {
|
||||
type: Number,
|
||||
value: undefined
|
||||
},
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
isLoadingCollection: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
collection: {
|
||||
type: Object,
|
||||
value: undefined
|
||||
},
|
||||
searchString: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
blockId: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
},
|
||||
save({ attributes, className }){
|
||||
const {
|
||||
content,
|
||||
|
@ -671,4 +887,6 @@ registerBlockType('tainacan/facets-list', {
|
|||
{ content }
|
||||
</div>
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
|
@ -113,7 +113,7 @@ export default class MetadataModal extends React.Component {
|
|||
|
||||
let selectedCollection;
|
||||
if (selectedCollectionId == 'default')
|
||||
selectedCollection = { label: __('Repository items', 'tainacan'), id: 'default', slug: tainacan_plugin.theme_items_list_url.split('/')[tainacan_plugin.theme_items_list_url.split('/').length - 1] };
|
||||
selectedCollection = { label: __('Repository items', 'tainacan'), id: 'default', slug: tainacan_blocks.theme_items_list_url.split('/')[tainacan_blocks.theme_items_list_url.split('/').length - 1] };
|
||||
else {
|
||||
selectedCollection = this.state.modalCollections.find((collection) => collection.id == selectedCollectionId)
|
||||
if (selectedCollection == undefined)
|
||||
|
@ -387,7 +387,7 @@ export default class MetadataModal extends React.Component {
|
|||
<RadioControl
|
||||
className={'repository-radio-option'}
|
||||
selected={ this.state.temporaryCollectionId }
|
||||
options={ [{ label: __('Repository items', 'tainacan'), value: 'default', slug: tainacan_plugin.theme_items_list_url.split('/')[tainacan_plugin.theme_items_list_url.split('/').length - 1] }] }
|
||||
options={ [{ label: __('Repository items', 'tainacan'), value: 'default', slug: tainacan_blocks.theme_items_list_url.split('/')[tainacan_blocks.theme_items_list_url.split('/').length - 1] }] }
|
||||
onChange={ ( aCollectionId ) => {
|
||||
this.setState({ temporaryCollectionId: aCollectionId });
|
||||
} } />
|
||||
|
|
|
@ -0,0 +1,276 @@
|
|||
import tainacan from '../../api-client/axios.js';
|
||||
import axios from 'axios';
|
||||
|
||||
const { __ } = wp.i18n;
|
||||
|
||||
const { TextControl, Button, Modal, RadioControl, SelectControl, Spinner } = wp.components;
|
||||
|
||||
export default class ParentTermModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
// Initialize state
|
||||
this.state = {
|
||||
metadatumId: '',
|
||||
facetsPerPage: 3,
|
||||
facetId: undefined,
|
||||
isLoadingFacets: false,
|
||||
modalFacets: [],
|
||||
totalModalFacets: 0,
|
||||
offset: 0,
|
||||
lastTerm: undefined,
|
||||
temporaryFacetId: '',
|
||||
searchFacetName: '',
|
||||
facets: [],
|
||||
facetsRequestSource: undefined
|
||||
};
|
||||
|
||||
// Bind events
|
||||
this.selectFacet = this.selectFacet.bind(this);
|
||||
this.fetchFacets = this.fetchFacets.bind(this);
|
||||
this.fetchModalFacets = this.fetchModalFacets.bind(this);
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
this.setState({
|
||||
collectionId: this.props.collectionId,
|
||||
metadatumId: this.props.metadatumId,
|
||||
temporaryFacetId: this.props.existingFacetId,
|
||||
facetId: this.props.existingFacetId,
|
||||
offset: 0,
|
||||
lastTerm: undefined
|
||||
});
|
||||
this.fetchModalFacets();
|
||||
}
|
||||
|
||||
// COLLECTIONS RELATED --------------------------------------------------
|
||||
fetchModalFacets() {
|
||||
|
||||
let someModalFacets = this.state.modalFacets;
|
||||
if (this.state.offset == 0)
|
||||
someModalFacets = [];
|
||||
|
||||
let endpoint = '/facets/' + this.props.metadatumId + '?number=' + this.state.facetsPerPage + '&offset=' + this.state.offset;
|
||||
|
||||
if (this.state.collectionId)
|
||||
endpoint = '/collection/' + this.props.collectionId + endpoint;
|
||||
|
||||
if (this.state.lastTerm != undefined)
|
||||
endpoint += 'last_term=' + this.state.lastTerm
|
||||
|
||||
this.setState({
|
||||
isLoadingFacets: true,
|
||||
modalFacets: someModalFacets
|
||||
});
|
||||
|
||||
tainacan.get(endpoint)
|
||||
.then(response => {
|
||||
|
||||
let otherModalFacets = this.state.modalFacets;
|
||||
|
||||
for (let facet of response.data.values) {
|
||||
otherModalFacets.push({
|
||||
name: facet.label,
|
||||
id: facet.value
|
||||
});
|
||||
}
|
||||
|
||||
this.setState({
|
||||
isLoadingFacets: false,
|
||||
modalFacets: otherModalFacets,
|
||||
totalModalFacets: response.headers['x-wp-total'],
|
||||
offset: this.state.offset + response.data.values.length,
|
||||
lastTerm: response.data.last_term
|
||||
});
|
||||
|
||||
return otherModalFacets;
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('Error trying to fetch facets: ' + error);
|
||||
});
|
||||
}
|
||||
|
||||
selectFacet(selectedFacetId) {
|
||||
|
||||
let selectedFacet;
|
||||
if (selectedFacetId === null || selectedFacetId === '')
|
||||
selectedFacet = { name: __('Any term.', 'tainacan'), id: null };
|
||||
else if (selectedFacetId == '0' || selectedFacet == 0)
|
||||
selectedFacet = { name: __('Root terms', 'tainacan'), id: '0' };
|
||||
else {
|
||||
selectedFacet = this.state.modalFacets.find((facet) => facet.id == selectedFacetId)
|
||||
if (selectedFacet == undefined)
|
||||
selectedFacet = this.state.facets.find((facet) => facet.id == selectedFacetId)
|
||||
}
|
||||
|
||||
this.setState({
|
||||
facetId: selectedFacet.id
|
||||
});
|
||||
|
||||
this.props.onSelectFacet(selectedFacet);
|
||||
|
||||
}
|
||||
|
||||
fetchFacets(name) {
|
||||
|
||||
if (this.state.facetsRequestSource != undefined)
|
||||
this.state.facetsRequestSource.cancel('Previous facets search canceled.');
|
||||
|
||||
let aFacetRequestSource = axios.CancelToken.source();
|
||||
|
||||
this.setState({
|
||||
facetsRequestSource: aFacetRequestSource,
|
||||
isLoadingFacets: true,
|
||||
facets: [],
|
||||
metadata: []
|
||||
});
|
||||
|
||||
let endpoint = '/facets/' + this.props.metadatumId + '?number=' + this.state.facetsPerPage;
|
||||
|
||||
if (this.state.collectionId)
|
||||
endpoint = '/collection/' + this.props.collectionId + endpoint;
|
||||
|
||||
if (name != undefined && name != '')
|
||||
endpoint += '&search=' + name;
|
||||
|
||||
tainacan.get(endpoint, { cancelToken: aFacetRequestSource.token })
|
||||
.then(response => {
|
||||
let someFacets = response.data.values.map((facet) => ({ name: facet.label, id: facet.value + '' }));
|
||||
|
||||
this.setState({
|
||||
isLoadingFacets: false,
|
||||
facets: someFacets
|
||||
});
|
||||
|
||||
return someFacets;
|
||||
})
|
||||
.catch(error => {
|
||||
console.log('Error trying to fetch facets: ' + error);
|
||||
});
|
||||
}
|
||||
|
||||
cancelSelection() {
|
||||
|
||||
this.setState({
|
||||
modalFacets: []
|
||||
});
|
||||
|
||||
this.props.onCancelSelection();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
||||
// Facets modal
|
||||
<Modal
|
||||
className="wp-block-tainacan-modal"
|
||||
title={__('Select a parent term to fetch facets from', 'tainacan')}
|
||||
onRequestClose={ () => this.cancelSelection() }
|
||||
contentLabel={__('Select term', 'tainacan')}>
|
||||
<div>
|
||||
<div className="modal-search-area">
|
||||
<TextControl
|
||||
label={__('Search for a term', 'tainacan')}
|
||||
placeholder={ __('Search by term\'s name', 'tainacan') }
|
||||
value={ this.state.searchFacetName }
|
||||
onChange={(value) => {
|
||||
this.setState({
|
||||
searchFacetName: value
|
||||
});
|
||||
_.debounce(this.fetchFacets(value), 300);
|
||||
}}/>
|
||||
</div>
|
||||
{(
|
||||
this.state.searchFacetName != '' ? (
|
||||
this.state.facets.length > 0 ?
|
||||
(
|
||||
<div>
|
||||
<div className="modal-radio-list">
|
||||
{
|
||||
<RadioControl
|
||||
selected={ this.state.temporaryFacetId }
|
||||
options={
|
||||
this.state.facets.map((facet) => {
|
||||
return { label: facet.name, value: '' + facet.id }
|
||||
})
|
||||
}
|
||||
onChange={ ( aFacetId ) => {
|
||||
this.setState({ temporaryFacetId: aFacetId });
|
||||
} } />
|
||||
}
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
) :
|
||||
this.state.isLoadingFacets ? (
|
||||
<Spinner />
|
||||
) :
|
||||
<div className="modal-loadmore-section">
|
||||
<p>{ __('Sorry, no term found.', 'tainacan') }</p>
|
||||
</div>
|
||||
):
|
||||
this.state.modalFacets.length > 0 ?
|
||||
(
|
||||
<div>
|
||||
<div className="modal-radio-list">
|
||||
|
||||
<p class="modal-radio-area-label">{__('Non specific term', 'tainacan')}</p>
|
||||
<RadioControl
|
||||
className={'repository-radio-option'}
|
||||
selected={ this.state.temporaryFacetId }
|
||||
options={ [
|
||||
{ label: __('Terms children of any term', 'tainacan'), value: '' },
|
||||
{ label: __('Terms with no parent (root terms)', 'tainacan'), value: '0' }
|
||||
] }
|
||||
onChange={ ( aFacetId ) => {
|
||||
this.setState({ temporaryFacetId: aFacetId});
|
||||
} } />
|
||||
<hr/>
|
||||
<p class="modal-radio-area-label">{__('Terms', 'tainacan')}</p>
|
||||
<RadioControl
|
||||
selected={ this.state.temporaryFacetId }
|
||||
options={
|
||||
this.state.modalFacets.map((facet) => {
|
||||
return { label: facet.name, value: '' + facet.id }
|
||||
})
|
||||
}
|
||||
onChange={ ( aFacetId ) => {
|
||||
this.setState({ temporaryFacetId: aFacetId });
|
||||
} } />
|
||||
</div>
|
||||
<div className="modal-loadmore-section">
|
||||
<p>{ __('Showing', 'tainacan') + " " + this.state.modalFacets.length + " " + __('of', 'tainacan') + " " + this.state.totalModalFacets + " " + __('terms', 'tainacan') + "."}</p>
|
||||
{
|
||||
this.state.modalFacets.length < this.state.totalModalFacets ? (
|
||||
<Button
|
||||
isDefault
|
||||
isSmall
|
||||
onClick={ () => this.fetchModalFacets() }>
|
||||
{__('Load more', 'tainacan')}
|
||||
</Button>
|
||||
) : null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
) : this.state.isLoadingFacets ? <Spinner/> :
|
||||
<div className="modal-loadmore-section">
|
||||
<p>{ __('Sorry, no terms found.', 'tainacan') }</p>
|
||||
</div>
|
||||
)}
|
||||
<div className="modal-footer-area">
|
||||
<Button
|
||||
isDefault
|
||||
onClick={ () => { this.cancelSelection() }}>
|
||||
{__('Cancel', 'tainacan')}
|
||||
</Button>
|
||||
<Button
|
||||
isPrimary
|
||||
onClick={ () => { this.selectFacet(this.state.temporaryFacetId) } }>
|
||||
{__('Select term', 'tainacan')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -47,7 +47,7 @@ export default class CarouselItemsModal extends React.Component {
|
|||
if (this.props.existingCollectionId != null && this.props.existingCollectionId != undefined) {
|
||||
this.fetchCollection(this.props.existingCollectionId);
|
||||
this.setState({
|
||||
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true' : '/items/?iframemode=true') });
|
||||
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true' : '/items/?iframemode=true') });
|
||||
} else {
|
||||
this.setState({ collectionPage: 1 });
|
||||
this.fetchModalCollections();
|
||||
|
@ -114,7 +114,7 @@ export default class CarouselItemsModal extends React.Component {
|
|||
selectCollection(selectedCollectionId) {
|
||||
this.setState({
|
||||
collectionId: selectedCollectionId,
|
||||
searchURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true' : '/items/?iframemode=true')
|
||||
searchURL: tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + (this.props.loadStrategy == 'search' ? '/items/?iframemode=true&readmode=true' : '/items/?iframemode=true')
|
||||
});
|
||||
|
||||
this.props.onSelectCollection(selectedCollectionId);
|
||||
|
|
|
@ -176,7 +176,7 @@ registerBlockType('tainacan/carousel-items-list', {
|
|||
?
|
||||
item.thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ item.title ? item.title : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
{ !hideTitle ? <span>{ item.title ? item.title : '' }</span> : null }
|
||||
|
@ -607,7 +607,7 @@ registerBlockType('tainacan/carousel-items-list', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
@ -727,8 +727,8 @@ registerBlockType('tainacan/carousel-items-list', {
|
|||
collection-background-color={ collectionBackgroundColor }
|
||||
collection-text-color={ collectionTextColor }
|
||||
max-items-number={ maxItemsNumber }
|
||||
tainacan-api-root={ tainacan_plugin.root }
|
||||
tainacan-base-url={ tainacan_plugin.base_url }
|
||||
tainacan-api-root={ tainacan_blocks.root }
|
||||
tainacan-base-url={ tainacan_blocks.base_url }
|
||||
id={ 'wp-block-tainacan-carousel-items-list_' + blockId }>
|
||||
{ content }
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,15 @@ import DynamicItemsListTheme from './dynamic-items-list-theme.vue';
|
|||
// This is rendered on the theme side.
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
// Gets all divs with content created by our block;
|
||||
let blocks = document.getElementsByClassName('wp-block-tainacan-dynamic-items-list');
|
||||
|
||||
if (blocks) {
|
||||
let blockIds = Object.values(blocks).map((block) => block.id);
|
||||
|
||||
// Creates a new Vue Instance to manage each block isolatelly
|
||||
for (let blockId of blockIds) {
|
||||
|
||||
// Configure Vue logic before passing it to constructor:
|
||||
let vueOptions = {
|
||||
data: {
|
||||
|
@ -89,14 +98,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
}
|
||||
};
|
||||
|
||||
// Gets all divs with content created by our block;
|
||||
let blocks = document.getElementsByClassName('wp-block-tainacan-dynamic-items-list');
|
||||
|
||||
if (blocks) {
|
||||
let blockIds = Object.values(blocks).map((block) => block.id);
|
||||
|
||||
// Creates a new Vue Instance to manage each block isolatelly
|
||||
for (let blockId of blockIds) {
|
||||
new Vue( Object.assign({ el: '#' + blockId }, vueOptions) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -440,7 +440,7 @@ export default {
|
|||
this.fetchCollectionForHeader();
|
||||
|
||||
this.fetchItems();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ export default class DynamicItemsModal extends React.Component {
|
|||
|
||||
if (this.props.existingCollectionId != null && this.props.existingCollectionId != undefined) {
|
||||
this.fetchCollection(this.props.existingCollectionId);
|
||||
this.setState({ searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?readmode=true&iframemode=true' });
|
||||
this.setState({ searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?readmode=true&iframemode=true' });
|
||||
} else {
|
||||
this.setState({ collectionPage: 1 });
|
||||
this.fetchModalCollections();
|
||||
|
@ -100,7 +100,7 @@ export default class DynamicItemsModal extends React.Component {
|
|||
selectCollection(selectedCollectionId) {
|
||||
this.setState({
|
||||
collectionId: selectedCollectionId,
|
||||
searchURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?readmode=true&iframemode=true'
|
||||
searchURL: tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?readmode=true&iframemode=true'
|
||||
});
|
||||
|
||||
this.props.onSelectCollection(selectedCollectionId);
|
||||
|
|
|
@ -132,7 +132,7 @@ registerBlockType('tainacan/dynamic-items-list', {
|
|||
type: String,
|
||||
default: ''
|
||||
},
|
||||
mosaicItemFocalPoint: {
|
||||
osaicItemFocalPointm: {
|
||||
type: Object,
|
||||
default: {
|
||||
x: 0.5,
|
||||
|
@ -190,7 +190,7 @@ registerBlockType('tainacan/dynamic-items-list', {
|
|||
style={ {
|
||||
marginBottom: layout == 'grid' ? (showName ? gridMargin + 12 : gridMargin) + 'px' : '',
|
||||
backgroundImage: layout == 'mosaic' ? `url(${getItemThumbnail(item, 'medium_large')})` : 'none',
|
||||
backgroundPosition: layout == 'mosaic' ? `${ mosaicItemFocalPoint.x * 100 }% ${ mosaicItemFocalPoint.y * 100 }%` : 'none'
|
||||
backgroundPosition: layout == 'mosaic' ? `${ (mosaicItemFocalPoint && mosaicItemFocalPoint.x ? mosaicItemFocalPoint.x : 0.5) * 100 }% ${ (mosaicItemFocalPoint && mosaicItemFocalPoint.y ? mosaicItemFocalPoint.y : 0.5) * 100 }%` : 'none'
|
||||
}}
|
||||
>
|
||||
<a
|
||||
|
@ -376,7 +376,7 @@ registerBlockType('tainacan/dynamic-items-list', {
|
|||
?
|
||||
item.thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -416,7 +416,7 @@ registerBlockType('tainacan/dynamic-items-list', {
|
|||
}
|
||||
|
||||
function updateMosaicItemFocalPoint(focalPoint) {
|
||||
if (Math.abs(focalPoint.x - mosaicItemFocalPoint.x) > 0.025 || Math.abs(focalPoint.y - mosaicItemFocalPoint.y) > 0.025) {
|
||||
if (Math.abs(focalPoint.x - (mosaicItemFocalPoint && mosaicItemFocalPoint.x ? mosaicItemFocalPoint.x : 0.5)) > 0.025 || Math.abs(focalPoint.y - (mosaicItemFocalPoint && mosaicItemFocalPoint.y ? mosaicItemFocalPoint.y : 0.5)) > 0.025) {
|
||||
mosaicItemFocalPoint = focalPoint;
|
||||
setAttributes({ mosaicItemFocalPoint: focalPoint });
|
||||
setContent();
|
||||
|
@ -881,7 +881,7 @@ registerBlockType('tainacan/dynamic-items-list', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
@ -1000,15 +1000,15 @@ registerBlockType('tainacan/dynamic-items-list', {
|
|||
mosaic-density={ mosaicDensity }
|
||||
mosaic-grid-rows={ mosaicGridRows }
|
||||
mosaic-grid-columns={ mosaicGridColumns }
|
||||
mosaic-item-focal-point-x={ mosaicItemFocalPoint.x }
|
||||
mosaic-item-focal-point-y={ mosaicItemFocalPoint.y }
|
||||
mosaic-item-focal-point-x={ (mosaicItemFocalPoint && mosaicItemFocalPoint.x ? mosaicItemFocalPoint.x : 0.5) }
|
||||
mosaic-item-focal-point-y={ (mosaicItemFocalPoint && mosaicItemFocalPoint.y ? mosaicItemFocalPoint.y : 0.5) }
|
||||
collection-background-color={ collectionBackgroundColor }
|
||||
collection-text-color={ collectionTextColor }
|
||||
grid-margin={ gridMargin }
|
||||
max-items-number={ maxItemsNumber }
|
||||
order={ order }
|
||||
tainacan-api-root={ tainacan_plugin.root }
|
||||
tainacan-base-url={ tainacan_plugin.base_url }
|
||||
tainacan-api-root={ tainacan_blocks.root }
|
||||
tainacan-base-url={ tainacan_blocks.base_url }
|
||||
id={ 'wp-block-tainacan-dynamic-items-list_' + blockId }>
|
||||
{ content }
|
||||
</div>
|
||||
|
@ -1140,8 +1140,8 @@ registerBlockType('tainacan/dynamic-items-list', {
|
|||
grid-margin={ gridMargin }
|
||||
max-items-number={ maxItemsNumber }
|
||||
order={ order }
|
||||
tainacan-api-root={ tainacan_plugin.root }
|
||||
tainacan-base-url={ tainacan_plugin.base_url }
|
||||
tainacan-api-root={ tainacan_blocks.root }
|
||||
tainacan-base-url={ tainacan_blocks.base_url }
|
||||
id={ 'wp-block-tainacan-dynamic-items-list_' + blockId }>
|
||||
{ content }
|
||||
</div>
|
||||
|
|
|
@ -128,7 +128,7 @@ registerBlockType('tainacan/items-list', {
|
|||
target="_blank"
|
||||
className={ (!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '') }>
|
||||
<img
|
||||
src={ item.thumbnail && item.thumbnail[0] && item.thumbnail[0].src ? item.thumbnail[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ item.thumbnail && item.thumbnail[0] && item.thumbnail[0].src ? item.thumbnail[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ item.thumbnail && item.thumbnail[0] ? item.thumbnail[0].alt : item.title }/>
|
||||
<span>{ item.title ? item.title : '' }</span>
|
||||
</a>
|
||||
|
@ -313,7 +313,7 @@ registerBlockType('tainacan/items-list', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
right: 0;
|
||||
}
|
||||
|
||||
// For all view modes ------------------------------------------------
|
||||
ul.items-list li.item-list-item > button,
|
||||
ul.items-list li.item-list-item > button:hover {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
// Grid View Mode ----------------------------------------------------
|
||||
ul.items-list.items-list-without-margin,
|
||||
ul.items-list-edit.items-list-without-margin {
|
||||
|
|
|
@ -49,7 +49,7 @@ export default class ItemsModal extends React.Component {
|
|||
if (this.props.existingCollectionId != null && this.props.existingCollectionId != undefined) {
|
||||
this.fetchCollection(this.props.existingCollectionId);
|
||||
this.setState({
|
||||
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?iframemode=true' });
|
||||
searchURL: this.props.existingSearchURL ? this.props.existingSearchURL : tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/'+ this.props.existingCollectionId + '/items/?iframemode=true' });
|
||||
} else {
|
||||
this.setState({ collectionPage: 1 });
|
||||
this.fetchModalCollections();
|
||||
|
@ -174,7 +174,7 @@ export default class ItemsModal extends React.Component {
|
|||
selectCollection(selectedCollectionId) {
|
||||
this.setState({
|
||||
collectionId: selectedCollectionId,
|
||||
searchURL: tainacan_plugin.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?iframemode=true'
|
||||
searchURL: tainacan_blocks.admin_url + 'admin.php?page=tainacan_admin#/collections/' + selectedCollectionId + '/items/?iframemode=true'
|
||||
});
|
||||
|
||||
this.props.onSelectCollection(selectedCollectionId);
|
||||
|
|
|
@ -57,7 +57,7 @@ registerBlockType('tainacan/search-bar', {
|
|||
},
|
||||
placeholderText: {
|
||||
type: String,
|
||||
default: __('Search', 'taincan')
|
||||
default: __('Search', 'tainacan')
|
||||
},
|
||||
showCollectionHeader: {
|
||||
type: Boolean,
|
||||
|
@ -169,13 +169,13 @@ registerBlockType('tainacan/search-bar', {
|
|||
(alignment == 'left' ? ' is-aligned-left' : '') +
|
||||
(alignment == 'right' ? ' is-aligned-right' : '')
|
||||
}
|
||||
id="taincan-search-bar-block"
|
||||
action={ tainacan_plugin.site_url + '/' + collectionSlug + '/#/' }
|
||||
id="tainacan-search-bar-block"
|
||||
action={ tainacan_blocks.site_url + '/' + collectionSlug + '/#/' }
|
||||
method='get'>
|
||||
<input
|
||||
style={{ borderColor: showCollectionHeader && collectionBackgroundColor ? collectionBackgroundColor : '' }}
|
||||
id="taincan-search-bar-block_input"
|
||||
label={ __('Search', 'taincan')}
|
||||
id="tainacan-search-bar-block_input"
|
||||
label={ __('Search', 'tainacan')}
|
||||
name='search'
|
||||
placeholder={ placeholderText }
|
||||
/>
|
||||
|
@ -214,13 +214,13 @@ registerBlockType('tainacan/search-bar', {
|
|||
(alignment == 'left' ? ' is-aligned-left' : '') +
|
||||
(alignment == 'right' ? ' is-aligned-right' : '')
|
||||
}
|
||||
id="taincan-search-bar-block"
|
||||
action={ tainacan_plugin.site_url + '/' + collectionSlug + '/#/' }
|
||||
id="tainacan-search-bar-block"
|
||||
action={ tainacan_blocks.site_url + '/' + collectionSlug + '/#/' }
|
||||
method='get'>
|
||||
<input
|
||||
style={{ borderColor: showCollectionHeader && collectionBackgroundColor ? collectionBackgroundColor : '' }}
|
||||
id="taincan-search-bar-block_input"
|
||||
label={ __('Search', 'taincan')}
|
||||
id="tainacan-search-bar-block_input"
|
||||
label={ __('Search', 'tainacan')}
|
||||
name='search'
|
||||
placeholder={ placeholderText }
|
||||
/>
|
||||
|
@ -494,7 +494,7 @@ registerBlockType('tainacan/search-bar', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
@ -560,11 +560,11 @@ registerBlockType('tainacan/search-bar', {
|
|||
(alignment == 'left' ? ' is-aligned-left' : '') +
|
||||
(alignment == 'right' ? ' is-aligned-right' : '')
|
||||
}
|
||||
id="taincan-search-bar-block">
|
||||
id="tainacan-search-bar-block">
|
||||
<input
|
||||
style={{ borderColor: showCollectionHeader && collectionBackgroundColor ? collectionBackgroundColor : '' }}
|
||||
id="taincan-search-bar-block_input"
|
||||
label={ __('Search', 'taincan')}
|
||||
id="tainacan-search-bar-block_input"
|
||||
label={ __('Search', 'tainacan')}
|
||||
name='search'
|
||||
placeholder={ placeholderText }
|
||||
/>
|
||||
|
@ -606,11 +606,11 @@ registerBlockType('tainacan/search-bar', {
|
|||
(alignment == 'left' ? ' is-aligned-left' : '') +
|
||||
(alignment == 'right' ? ' is-aligned-right' : '')
|
||||
}
|
||||
id="taincan-search-bar-block">
|
||||
id="tainacan-search-bar-block">
|
||||
<input
|
||||
style={{ borderColor: showCollectionHeader && collectionBackgroundColor ? collectionBackgroundColor : '' }}
|
||||
id="taincan-search-bar-block_input"
|
||||
label={ __('Search', 'taincan')}
|
||||
id="tainacan-search-bar-block_input"
|
||||
label={ __('Search', 'tainacan')}
|
||||
name='search'
|
||||
placeholder={ placeholderText }
|
||||
/>
|
||||
|
|
|
@ -106,7 +106,7 @@ export default class SearchBarModal extends React.Component {
|
|||
label: __('Repository items', 'tainacan'),
|
||||
name: __('Repository items', 'tainacan'),
|
||||
id: 'default',
|
||||
slug: tainacan_plugin.theme_items_list_url.split('/')[tainacan_plugin.theme_items_list_url.split('/').length - 1]
|
||||
slug: tainacan_blocks.theme_items_list_url.split('/')[tainacan_blocks.theme_items_list_url.split('/').length - 1]
|
||||
};
|
||||
else {
|
||||
selectedCollection = this.state.modalCollections.find((collection) => collection.id == selectedCollectionId)
|
||||
|
@ -269,7 +269,7 @@ export default class SearchBarModal extends React.Component {
|
|||
<RadioControl
|
||||
className={'repository-radio-option'}
|
||||
selected={ this.state.temporaryCollectionId }
|
||||
options={ [{ label: __('Repository items', 'tainacan'), value: 'default', slug: tainacan_plugin.theme_items_list_url.split('/')[tainacan_plugin.theme_items_list_url.split('/').length - 1] }] }
|
||||
options={ [{ label: __('Repository items', 'tainacan'), value: 'default', slug: tainacan_blocks.theme_items_list_url.split('/')[tainacan_blocks.theme_items_list_url.split('/').length - 1] }] }
|
||||
onChange={ ( aCollectionId ) => {
|
||||
this.setState({ temporaryCollectionId: aCollectionId });
|
||||
} } />
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
document.addEventListener("DOMContentLoaded",() => {
|
||||
let form = document.getElementById('taincan-search-bar-block');
|
||||
let form = document.getElementById('tainacan-search-bar-block');
|
||||
if (form) {
|
||||
form.addEventListener('submit', ((e) => {
|
||||
e.preventDefault();
|
||||
let input = document.getElementById('taincan-search-bar-block_input');
|
||||
let input = document.getElementById('tainacan-search-bar-block_input');
|
||||
if (input) {
|
||||
if (input.value)
|
||||
window.location.href = e.target.action + '?search=' + input.value;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
.tainacan-search-container {
|
||||
width: 100%;
|
||||
|
||||
#taincan-search-bar-block {
|
||||
#tainacan-search-bar-block {
|
||||
height: 32px;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
|
@ -34,7 +34,7 @@
|
|||
border: 1px solid #545758;
|
||||
}
|
||||
|
||||
input#taincan-search-bar-block_input {
|
||||
input#tainacan-search-bar-block_input {
|
||||
width: 100%;
|
||||
min-width: 28px;
|
||||
margin: 0;
|
||||
|
@ -66,13 +66,18 @@
|
|||
margin-right: 0px;
|
||||
max-width: 100% !important;
|
||||
|
||||
input#taincan-search-bar-block_input {
|
||||
input#tainacan-search-bar-block_input {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.search-bar-collection-header-container {
|
||||
.search-bar-collection-header-title {
|
||||
max-width: 1400px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
@media only screen and (max-width: 768px) {
|
||||
flex-wrap: wrap !important;
|
||||
|
||||
|
@ -83,7 +88,7 @@
|
|||
}
|
||||
|
||||
&.is-style-alternate {
|
||||
#taincan-search-bar-block {
|
||||
#tainacan-search-bar-block {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
|
@ -102,7 +107,7 @@
|
|||
&:hover {
|
||||
border: none;
|
||||
}
|
||||
input#taincan-search-bar-block_input {
|
||||
input#tainacan-search-bar-block_input {
|
||||
width: 35%;
|
||||
border-radius: 0;
|
||||
margin-left: -52px;
|
||||
|
@ -119,6 +124,9 @@
|
|||
background:rgba(250, 250, 250, 1);
|
||||
box-shadow: none;
|
||||
}
|
||||
&::placeholder {
|
||||
color: #cbcbcb;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
|
@ -146,7 +154,7 @@
|
|||
margin-right: 0px;
|
||||
max-width: 100% !important;
|
||||
|
||||
input#taincan-search-bar-block_input {
|
||||
input#tainacan-search-bar-block_input {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +163,7 @@
|
|||
// This style has particular alignments properties.
|
||||
.search-bar-collection-header-container {
|
||||
.tainacan-search-container {
|
||||
#taincan-search-bar-block {
|
||||
#tainacan-search-bar-block {
|
||||
&:focus,
|
||||
&:active,
|
||||
&:hover {
|
||||
|
@ -171,9 +179,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
input#taincan-search-bar-block_input {
|
||||
input#tainacan-search-bar-block_input {
|
||||
color: white;
|
||||
&::placeholder { color: white; }
|
||||
|
||||
&:focus,
|
||||
&:active,
|
||||
|
@ -196,7 +203,7 @@
|
|||
}
|
||||
|
||||
&.is-style-stylish {
|
||||
#taincan-search-bar-block {
|
||||
#tainacan-search-bar-block {
|
||||
width: 100%;
|
||||
height: 53px;
|
||||
display: flex;
|
||||
|
@ -209,14 +216,14 @@
|
|||
border: none;
|
||||
}
|
||||
|
||||
&:hover input#taincan-search-bar-block_input {
|
||||
&:hover input#tainacan-search-bar-block_input {
|
||||
width: 100%;
|
||||
padding-right: 52px;
|
||||
padding-left: 24px;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
input#taincan-search-bar-block_input {
|
||||
input#tainacan-search-bar-block_input {
|
||||
width: 0%;
|
||||
min-width: 0%;
|
||||
border-radius: 28px;
|
||||
|
@ -226,7 +233,7 @@
|
|||
font-size: 1rem;
|
||||
border-width: 0;
|
||||
background: #f2f2f2;
|
||||
transition: width 0.5s ease-in;
|
||||
transition: width 0.5s ease-in, padding 0.5s ease-in;
|
||||
|
||||
&:focus,
|
||||
&:active,
|
||||
|
@ -299,7 +306,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.tainacan-search-container #taincan-search-bar-block input#taincan-search-bar-block_input {
|
||||
.tainacan-search-container #tainacan-search-bar-block input#tainacan-search-bar-block_input {
|
||||
background: white;
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
|
@ -352,7 +359,7 @@
|
|||
text-decoration: none !important;
|
||||
|
||||
&.is-aligned-left {
|
||||
min-height: 100px;
|
||||
min-height: 115px;
|
||||
text-align: left;
|
||||
flex-direction: row-reverse;
|
||||
flex-wrap: nowrap;
|
||||
|
@ -361,7 +368,7 @@
|
|||
.search-bar-collection-header-title { text-align: right; }
|
||||
}
|
||||
&.is-aligned-right {
|
||||
min-height: 100px;
|
||||
min-height: 115px;
|
||||
text-align: right;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
|
@ -388,7 +395,7 @@
|
|||
span.label {
|
||||
width: 100%;
|
||||
display: block;
|
||||
margin-top: -12px;
|
||||
margin-top: -8px;
|
||||
font-weight: normal;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
|
|
@ -205,6 +205,9 @@
|
|||
fill: #298596;
|
||||
}
|
||||
}
|
||||
&.alignfull .swiper-button-prev, .swiper-button-next {
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
// Carousel placeholder on editor side ----------------------------------------------------
|
||||
.terms-list-edit-container,
|
||||
|
|
|
@ -155,7 +155,7 @@ registerBlockType('tainacan/carousel-terms-list', {
|
|||
?
|
||||
termItems[0].thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ termItems[0] && termItems[0].name ? termItems[0].name : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
<img
|
||||
|
@ -168,7 +168,7 @@ registerBlockType('tainacan/carousel-terms-list', {
|
|||
?
|
||||
termItems[1].thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ termItems[1] && termItems[1].name ? termItems[1].name : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
<img
|
||||
|
@ -181,13 +181,13 @@ registerBlockType('tainacan/carousel-terms-list', {
|
|||
?
|
||||
termItems[2].thumbnail['thumbnail'][0]
|
||||
:
|
||||
`${tainacan_plugin.base_url}/admin/images/placeholder_square.png`)
|
||||
`${tainacan_blocks.base_url}/admin/images/placeholder_square.png`)
|
||||
}
|
||||
alt={ termItems[2] && termItems[2].name ? termItems[2].name : __( 'Thumbnail', 'tainacan' ) }/>
|
||||
</div>
|
||||
:
|
||||
<img
|
||||
src={ term.header_image ? term.header_image : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ term.header_image ? term.header_image : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ term.name ? term.name : __( 'Thumbnail', 'tainacan' )}/>
|
||||
}
|
||||
{ !hideName ? <span>{ term.name ? term.name : '' }</span> : null }
|
||||
|
@ -447,7 +447,7 @@ registerBlockType('tainacan/carousel-terms-list', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
@ -545,8 +545,8 @@ registerBlockType('tainacan/carousel-terms-list', {
|
|||
hide-name={ '' + hideName }
|
||||
max-terms-number={ maxTermsNumber }
|
||||
taxonomy-id={ taxonomyId }
|
||||
tainacan-api-root={ tainacan_plugin.root }
|
||||
tainacan-base-url={ tainacan_plugin.base_url }
|
||||
tainacan-api-root={ tainacan_blocks.root }
|
||||
tainacan-base-url={ tainacan_blocks.base_url }
|
||||
show-term-thumbnail={ '' + showTermThumbnail }
|
||||
id={ 'wp-block-tainacan-carousel-terms-list_' + blockId }>
|
||||
{ content }
|
||||
|
|
|
@ -121,7 +121,7 @@ registerBlockType('tainacan/terms-list', {
|
|||
target="_blank"
|
||||
className={ (!showName ? 'term-without-name' : '') + ' ' + (!showImage ? 'term-without-image' : '') }>
|
||||
<img
|
||||
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ term.header_image && term.header_image[0] ? term.header_image[0].alt : term.name }/>
|
||||
<span>{ term.name ? term.name : '' }</span>
|
||||
</a>
|
||||
|
@ -290,7 +290,7 @@ registerBlockType('tainacan/terms-list', {
|
|||
icon={(
|
||||
<img
|
||||
width={148}
|
||||
src={ `${tainacan_plugin.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
src={ `${tainacan_blocks.base_url}/admin/images/tainacan_logo_header.svg` }
|
||||
alt="Tainacan Logo"/>
|
||||
)}>
|
||||
<p>
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
right: 0;
|
||||
}
|
||||
|
||||
// For all view modes ------------------------------------------------
|
||||
ul.terms-list li.term-list-item > button,
|
||||
ul.terms-list li.term-list-item > button:hover {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
// Grid View Mode ----------------------------------------------------
|
||||
ul.terms-list.terms-layout-grid,
|
||||
ul.terms-list-edit.terms-layout-grid {
|
||||
|
|
|
@ -363,7 +363,7 @@ export default class TermsModal extends React.Component {
|
|||
{ term.header_image ?
|
||||
<img
|
||||
aria-hidden
|
||||
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ term.header_image && term.header_image[0] ? term.header_image[0].alt : term.name }/>
|
||||
: null
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ export default class TermsModal extends React.Component {
|
|||
{ term.header_image ?
|
||||
<img
|
||||
aria-hidden
|
||||
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_plugin.base_url}/admin/images/placeholder_square.png`}
|
||||
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_blocks.base_url}/admin/images/placeholder_square.png`}
|
||||
alt={ term.header_image && term.header_image[0] ? term.header_image[0].alt : term.name }/>
|
||||
: null
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ export const eventBus = new Vue({
|
|||
.then(() => {
|
||||
this.$emit('isUpdatingValue', false);
|
||||
let index = this.errors.findIndex( errorItem => errorItem.metadatum_id == metadatumId );
|
||||
if (index >= 0)
|
||||
if (index >= 0) {
|
||||
this.errors.splice( index, 1);
|
||||
}
|
||||
this.$emit('updateErrorMessageOf#' + metadatumId, this.errors[index]);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$emit('isUpdatingValue', false);
|
||||
|
@ -45,17 +47,17 @@ export const eventBus = new Vue({
|
|||
for (let index in error)
|
||||
messages.push(error[index]);
|
||||
|
||||
if ( index >= 0)
|
||||
if ( index >= 0) {
|
||||
Vue.set( this.errors, index, { metadatum_id: metadatumId, errors: messages });
|
||||
else
|
||||
this.$emit('updateErrorMessage', this.errors[index]);
|
||||
} else {
|
||||
this.errors.push( { metadatum_id: metadatumId, errors: messages } );
|
||||
this.$emit('updateErrorMessageOf#' + metadatumId, this.errors[0]);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
getErrors(metadatum_id) {
|
||||
let error = this.errors.find(errorItem => errorItem.metadatum_id == metadatum_id);
|
||||
return error ? error.errors : false
|
||||
},
|
||||
clearAllErrors() {
|
||||
this.errors = [];
|
||||
}
|
||||
|
|
|
@ -179,9 +179,9 @@ export const updateTerm = ({ commit }, { taxonomyId, id, name, description, pare
|
|||
export const fetchTerms = ({ commit }, {taxonomyId, fetchOnly, search, all, order, offset, number}) => {
|
||||
|
||||
let query = '';
|
||||
if (order == undefined) {
|
||||
|
||||
if (order == undefined)
|
||||
order = 'asc';
|
||||
}
|
||||
|
||||
if(fetchOnly && search && !all ){
|
||||
query = `?order=${order}&${qs.stringify(fetchOnly)}&${qs.stringify(search)}`;
|
||||
|
@ -193,9 +193,11 @@ export const fetchTerms = ({ commit }, {taxonomyId, fetchOnly, search, all, orde
|
|||
query =`?hideempty=0&order=${order}`;
|
||||
}
|
||||
|
||||
if (offset != undefined && number != undefined) {
|
||||
query += '&offset=' + offset + '&number=' + number;
|
||||
}
|
||||
if (number != undefined)
|
||||
query += '&number=' + number;
|
||||
|
||||
if (offset != undefined)
|
||||
query += '&offset=' + offset;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.tainacan.get(`/taxonomy/${taxonomyId}/terms${query}`)
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, vnmedeiros
|
||||
Tags: museums, libraries, archives, GLAM, collections, repository
|
||||
Requires at least: 4.8
|
||||
Tested up to: 5.2.4
|
||||
Tested up to: 5.3
|
||||
Requires PHP: 5.6
|
||||
Stable tag: 0.13.1
|
||||
Stable tag: 0.14.1
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ Plugin Name: Tainacan
|
|||
Plugin URI: https://tainacan.org/
|
||||
Description: Open source, powerfull 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 respository platform.
|
||||
Author: Tainacan.org
|
||||
Version: 0.13.1
|
||||
Version: 0.14.1
|
||||
Text Domain: tainacan
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
const TAINACAN_VERSION = '0.13.1';
|
||||
const TAINACAN_VERSION = '0.14.1';
|
||||
|
||||
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
||||
$TAINACAN_BASE_URL = plugins_url('', __FILE__);
|
||||
|
|
|
@ -365,19 +365,25 @@ class Theme_Helper {
|
|||
$atts
|
||||
);
|
||||
|
||||
$default_view_mode = apply_filters( 'tainacan-default-view-mode-for-themes', 'masonry' );
|
||||
$enabled_view_modes = apply_filters( 'tainacan-enabled-view-modes-for-themes', ['table', 'cards', 'masonry', 'slideshow'] );
|
||||
|
||||
$params = '';
|
||||
if (isset($atts['collection-id'])) {
|
||||
$params = "collection-id=" . $atts['collection-id'];
|
||||
if (isset($atts['collection-id']) && $atts['collection-id'] != '') {
|
||||
$params .= "collection-id=" . $atts['collection-id'];
|
||||
$collection = new \Tainacan\Entities\Collection($atts['collection-id']);
|
||||
$default_view_mode = $collection->get_default_view_mode();
|
||||
$enabled_view_modes = $collection->get_enabled_view_modes();
|
||||
}
|
||||
if (isset($atts['term-id'])) {
|
||||
$params = "term-id=" . $atts['term-id'];
|
||||
if (isset($atts['term-id']) && $atts['term-id'] != '') {
|
||||
$params .= "term-id=" . $atts['term-id'];
|
||||
}
|
||||
|
||||
$params .= ' default-view-mode="' . $default_view_mode . '" ';
|
||||
$params .= ' enabled-view-modes="' . implode(',', $enabled_view_modes) . '" ';
|
||||
|
||||
$this->enqueue_scripts(true);
|
||||
|
||||
return "<div id='tainacan-items-page' $params ></div>";
|
||||
|
||||
|
||||
}
|
||||
|
||||
function get_items_list_slug() {
|
||||
|
|
|
@ -86,6 +86,7 @@ export default {
|
|||
this.$refs.masonryWrapper.children[0] != undefined &&
|
||||
this.$refs.masonryWrapper.children[0].children[0] != undefined &&
|
||||
this.$refs.masonryWrapper.children[0].children[0].clientWidth != undefined) {
|
||||
if (jQuery && jQuery(window))
|
||||
this.containerWidthDiscount = jQuery(window).width() - this.$refs.masonryWrapper.clientWidth;
|
||||
}
|
||||
this.$forceUpdate();
|
||||
|
|
|
@ -169,6 +169,7 @@ export default {
|
|||
this.$refs.masonryWrapper.children[0] != undefined &&
|
||||
this.$refs.masonryWrapper.children[0].children[0] != undefined &&
|
||||
this.$refs.masonryWrapper.children[0].children[0].clientWidth != undefined) {
|
||||
if (jQuery && jQuery(window))
|
||||
this.containerWidthDiscount = jQuery(window).width() - this.$refs.masonryWrapper.clientWidth;
|
||||
}
|
||||
this.$forceUpdate();
|
||||
|
|
Loading…
Reference in New Issue