Merge branch 'hotfix/0.21.3'

This commit is contained in:
vnmedeiros 2024-05-15 10:04:11 -03:00
commit 21702a5de3
19 changed files with 108 additions and 72 deletions

View File

@ -185,6 +185,8 @@
.wp-block-tainacan-facets-list ul.facets-list-edit li.facet-list-item { .wp-block-tainacan-facets-list ul.facets-list-edit li.facet-list-item {
display: flex; display: flex;
align-items: flex-start; } align-items: flex-start; }
.wp-block-tainacan-facets-list ul.facets-list-edit li.facet-list-item a {
pointer-events: none; }
.wp-block-tainacan-facets-list ul.facets-list-edit li.facet-list-item button { .wp-block-tainacan-facets-list ul.facets-list-edit li.facet-list-item button {
position: absolute !important; position: absolute !important;
background-color: rgba(255, 255, 255, 0.75); background-color: rgba(255, 255, 255, 0.75);

File diff suppressed because one or more lines are too long

View File

@ -197,7 +197,12 @@ class CSV extends Importer {
? explode( $this->get_option('multivalued_delimiter'), $valueToInsert) ? explode( $this->get_option('multivalued_delimiter'), $valueToInsert)
: [$valueToInsert]; : [$valueToInsert];
if(!is_array($header)) {
$this->add_error_log('the compound metadata specification is invalid');
continue;
}
$key = key($header); $key = key($header);
$returnValue = []; $returnValue = [];
foreach($valueToInsert as $index => $metadatumValue) { foreach($valueToInsert as $index => $metadatumValue) {
$childrenHeaders = str_getcsv($compoundHeaders[$key], $this->get_option('delimiter'), $this->get_option('enclosure')); $childrenHeaders = str_getcsv($compoundHeaders[$key], $this->get_option('delimiter'), $this->get_option('enclosure'));
@ -206,7 +211,7 @@ class CSV extends Importer {
str_getcsv($metadatumValue, $this->get_option('delimiter'), $this->get_option('enclosure')); str_getcsv($metadatumValue, $this->get_option('delimiter'), $this->get_option('enclosure'));
if ( sizeof($childrenHeaders) != sizeof($childrenValue) ) { if ( sizeof($childrenHeaders) != sizeof($childrenValue) ) {
$this->add_error_log('Mismatch count headers childrens and row columns. file value:' . $metadatumValue); $this->add_error_log('Mismatch count headers childrens and row columns in compound metadata. file value:' . $metadatumValue);
return false; return false;
} }
$tmp = []; $tmp = [];

View File

@ -274,9 +274,10 @@
$this->debug('locking process: ' . $this->identifier); $this->debug('locking process: ' . $this->identifier);
$this->start_time = time(); // Set start time of current process. $this->start_time = time(); // Set start time of current process.
$max_execution_time = ini_get('max_execution_time'); $max_execution_time = ini_get('max_execution_time');
$lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : ( empty($max_execution_time) ? 60 : ($max_execution_time * 1.5) ); // 1 minute $lock_duration = ( property_exists( $this, 'queue_lock_time' ) && !empty($this->queue_lock_time) ) ? $this->queue_lock_time : ( empty($max_execution_time) ? 60 : ($max_execution_time * 1.5) ); // 1 minute
$lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration ); $lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration );
$this->process_lock_in_time = microtime(); $this->process_lock_in_time = microtime();
$this->debug('locking duration: ' . $lock_duration);
if(!$this->is_process_running()) if(!$this->is_process_running())
set_site_transient( $this->identifier . '_process_lock', $this->process_lock_in_time, $lock_duration ); set_site_transient( $this->identifier . '_process_lock', $this->process_lock_in_time, $lock_duration );
} }

View File

@ -4,7 +4,7 @@ Tags: museums, archives, GLAM, collections, repository
Requires at least: 5.9 Requires at least: 5.9
Tested up to: 6.5 Tested up to: 6.5
Requires PHP: 7.0 Requires PHP: 7.0
Stable tag: 0.21.2 Stable tag: 0.21.3
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html

View File

@ -5,17 +5,17 @@ Plugin URI: https://tainacan.org/
Description: Open source, powerful and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional repository platform. Description: Open source, powerful and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional repository platform.
Author: Tainacan.org Author: Tainacan.org
Author URI: https://tainacan.org/ Author URI: https://tainacan.org/
Version: 0.21.2 Version: 0.21.3
Requires at least: 5.9 Requires at least: 5.9
Tested up to: 6.5 Tested up to: 6.5
Requires PHP: 7.0 Requires PHP: 7.0
Stable tag: 0.21.2 Stable tag: 0.21.3
Text Domain: tainacan Text Domain: tainacan
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/ */
const TAINACAN_VERSION = '0.21.2'; const TAINACAN_VERSION = '0.21.3';
defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
$TAINACAN_BASE_URL = plugins_url('', __FILE__); $TAINACAN_BASE_URL = plugins_url('', __FILE__);

View File

@ -108,7 +108,7 @@
v-for="(collectionMetadatum, metadatumIndex) of collectionNonChildMetadata" v-for="(collectionMetadatum, metadatumIndex) of collectionNonChildMetadata"
:key="metadatumIndex" :key="metadatumIndex"
:value="collectionMetadatum.id" :value="collectionMetadatum.id"
:disabled="checkIfMetadatumIsAvailable(collectionMetadatum.id)"> :disabled="checkIfMetadatumIsAvailable(collectionMetadatum.id) || ( checkIfMetadatumIsCompound(collectionMetadatum) && sourceMetadatum.indexOf('compound|(') < 0 )">
<span class="metadatum-name"> <span class="metadatum-name">
{{ collectionMetadatum.name }} {{ collectionMetadatum.name }}
</span> </span>
@ -139,7 +139,7 @@
v-for="(collectionMetadatum, metadatumIndex) of collectionNonChildMetadata" v-for="(collectionMetadatum, metadatumIndex) of collectionNonChildMetadata"
:key="metadatumIndex" :key="metadatumIndex"
:value="collectionMetadatum.id" :value="collectionMetadatum.id"
:disabled="!checkIfMetadatumIsCompound(collectionMetadatum) || checkIfMetadatumIsAvailable(collectionMetadatum.id)"> :disabled="!checkIfMetadatumIsCompound(collectionMetadatum) || checkIfMetadatumIsAvailable(collectionMetadatum.id) || typeof sourceMetadatum != 'object' || !Object.entries(sourceMetadatum)[0]">
<span class="metadatum-name"> <span class="metadatum-name">
{{ collectionMetadatum.name }} {{ collectionMetadatum.name }}
</span> </span>

View File

@ -108,7 +108,7 @@
{{ status == 'draft' ? $i18n.get('label_update_draft') : $i18n.get('label_change_to_draft') }} {{ status == 'draft' ? $i18n.get('label_update_draft') : $i18n.get('label_change_to_draft') }}
</b-dropdown-item> </b-dropdown-item>
<b-dropdown-item <b-dropdown-item
v-if="currentUserCanPublish && !$adminOptions.hideItemEditionStatusPublishOption" v-if="currentUserCanPublish"
:class="{ 'is-forced-last-option': status == 'private' }" :class="{ 'is-forced-last-option': status == 'private' }"
aria-role="listitem" aria-role="listitem"
@click="$emit( @click="$emit(

View File

@ -260,7 +260,7 @@
<!-- The Metadata list, inside each metadata section --> <!-- The Metadata list, inside each metadata section -->
<template v-if="metadataSection.metadata_object_list && Array.isArray(metadataSection.metadata_object_list)"> <template v-if="metadataSection.metadata_object_list && Array.isArray(metadataSection.metadata_object_list)">
<sortable <sortable
:list="metadataSection.metadata_object_list" :list="metadataSection.metadata_object_list.filter((metadatum) => metadatum != undefined && metadatum.parent == 0)"
item-key="id" item-key="id"
class="active-metadata-area" class="active-metadata-area"
:options="{ :options="{
@ -284,7 +284,6 @@
@remove="handleChange($event, sectionIndex)"> @remove="handleChange($event, sectionIndex)">
<template #item="{ element: metadatum, index }"> <template #item="{ element: metadatum, index }">
<div <div
v-if="metadatum != undefined && metadatum.parent == 0"
v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)" v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)"
:key="metadatum.id" :key="metadatum.id"
:data-metadatum-id="metadatum.id" :data-metadatum-id="metadatum.id"
@ -461,22 +460,22 @@
v-if="isCollapseOpen(metadatum.id) && openedMetadatumId !== metadatum.id" v-if="isCollapseOpen(metadatum.id) && openedMetadatumId !== metadatum.id"
:metadatum="metadatum" /> :metadatum="metadatum" />
</transition> </transition>
<!-- Child metadata list, inside each compound metadata -->
<child-metadata-list
v-if="metadatum.metadata_type_object && metadatum.metadata_type_object.component == 'tainacan-compound'"
:parent="metadatum"
:metadata-name-filter-string="metadataNameFilterString"
:metadata-type-filter-options="metadataTypeFilterOptions"
:has-some-metadata-type-filter-applied="hasSomeMetadataTypeFilterApplied"
:is-parent-multiple="metadatum.multiple == 'yes'"
:is-repository-level="false"
:collapse-all="collapseAll"
:section-id="metadataSection.id + ''" />
</div> </div>
<!-- Child metadata list, inside each compound metadata -->
<child-metadata-list
v-if="metadatum.metadata_type_object && metadatum.metadata_type_object.component == 'tainacan-compound'"
:parent="metadatum"
:metadata-name-filter-string="metadataNameFilterString"
:metadata-type-filter-options="metadataTypeFilterOptions"
:has-some-metadata-type-filter-applied="hasSomeMetadataTypeFilterApplied"
:is-parent-multiple="metadatum.multiple == 'yes'"
:is-repository-level="false"
:collapse-all="collapseAll"
:section-id="metadataSection.id + ''" />
<!-- Metadata edition form, for each metadata --> <!-- Metadata edition form, for each metadata -->
<b-modal <b-modal
v-if="openedMetadatumId == metadatum.id"
:model-value="openedMetadatumId == metadatum.id" :model-value="openedMetadatumId == metadatum.id"
trap-focus trap-focus
aria-modal aria-modal
@ -492,8 +491,8 @@
@on-edition-finished="onEditionFinished()" @on-edition-finished="onEditionFinished()"
@on-edition-canceled="onEditionCanceled()" /> @on-edition-canceled="onEditionCanceled()" />
</b-modal> </b-modal>
</template> </template>
</sortable><!-- End of .active-metadata-area --> </sortable><!-- End of .active-metadata-area -->
</template> </template>
@ -679,7 +678,6 @@ export default {
handleChange($event, sectionIndex) { handleChange($event, sectionIndex) {
switch ( $event.type ) { switch ( $event.type ) {
case 'add': case 'add':
if ( !$event.from.classList.contains('active-metadata-area') ) { if ( !$event.from.classList.contains('active-metadata-area') ) {
this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex, sectionIndex); this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex, sectionIndex);
$event.to.removeChild($event.item) $event.to.removeChild($event.item)

View File

@ -141,8 +141,10 @@ class Control extends Metadata_Type {
* @return string The HTML representation of the value, containing one or multiple items names, linked to the item page * @return string The HTML representation of the value, containing one or multiple items names, linked to the item page
*/ */
public function get_value_as_html(\Tainacan\Entities\Item_Metadata_Entity $item_metadata) { public function get_value_as_html(\Tainacan\Entities\Item_Metadata_Entity $item_metadata) {
$value = $item_metadata->get_value(); $value = $item_metadata->get_value();
$control_metadatum = $this->get_option('control_metadatum'); $control_metadatum = $this->get_option('control_metadatum');
if (in_array($control_metadatum, ['document_type', 'collection_id', 'has_thumbnail'])) if (in_array($control_metadatum, ['document_type', 'collection_id', 'has_thumbnail']))
return $this->get_control_metadatum_value($value, $control_metadatum, 'html'); return $this->get_control_metadatum_value($value, $control_metadatum, 'html');
@ -176,8 +178,30 @@ class Control extends Metadata_Type {
$value = $item_metadata->get_value(); $value = $item_metadata->get_value();
$control_metadatum = $this->get_option('control_metadatum'); $control_metadatum = $this->get_option('control_metadatum');
if (in_array($control_metadatum, ['document_type', 'collection_id', 'has_thumbnail']))
return $this->get_control_metadatum_value($value, $control_metadatum, 'string');
return $this->get_control_metadatum_value($value, $control_metadatum, 'string'); $return = '';
if ( $item_metadata->is_multiple() ) {
$total = sizeof($value);
$count = 0;
$prefix = $item_metadata->get_multivalue_prefix();
$suffix = $item_metadata->get_multivalue_suffix();
$separator = $item_metadata->get_multivalue_separator();
foreach ($value as $v) {
$return .= $prefix;
$return .= (string) $v;
$return .= $suffix;
$count ++;
if ($count < $total)
$return .= $separator;
}
} else {
$return = (string) $value;
}
return $return;
} }
private function get_document_as_html( $value ) { private function get_document_as_html( $value ) {

View File

@ -11,7 +11,7 @@
:disabled="disabled" :disabled="disabled"
size="is-small" size="is-small"
icon="magnify" icon="magnify"
:model-value="selected" :model-value="JSON.parse(JSON.stringify(selected))"
:data="options" :data="options"
:maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : '1')" :maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : '1')"
autocomplete autocomplete
@ -51,6 +51,9 @@
<div v-html="props.option.valuesAsHtml" /> <div v-html="props.option.valuesAsHtml" />
</div> </div>
</template> </template>
<template #tag="props">
{{ (props.tag && props.tag.label) ? props.tag.label : '' }}
</template>
<template <template
v-if="!isLoading" v-if="!isLoading"
#empty> #empty>

View File

@ -6,7 +6,7 @@
:disabled="disabled" :disabled="disabled"
size="is-small" size="is-small"
icon="account" icon="account"
:model-value="selected" :model-value="JSON.parse(JSON.stringify(selected))"
:data="options" :data="options"
:maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : '1')" :maxtags="maxtags != undefined ? maxtags : (itemMetadatum.metadatum.multiple == 'yes' || allowNew === true ? (maxMultipleValues !== undefined ? maxMultipleValues : null) : '1')"
autocomplete autocomplete
@ -30,17 +30,20 @@
<template #default="props"> <template #default="props">
<div class="media"> <div class="media">
<div <div
v-if="props.option.avatar_urls && props.option.avatar_urls['24']" v-if="props.option.img"
class="media-left"> class="media-left">
<img <img
width="24" width="24"
:src="props.option.avatar_urls['24']"> :src="props.option.img">
</div> </div>
<div class="media-content"> <div class="media-content">
{{ props.option.name }} {{ props.option.name }}
</div> </div>
</div> </div>
</template> </template>
<template #tag="props">
{{ (props.tag && props.tag.name) ? props.tag.name : '' }}
</template>
<template <template
v-if="!isLoading" v-if="!isLoading"
#empty> #empty>
@ -98,7 +101,7 @@ export default {
]), ]),
onInput(newSelected) { onInput(newSelected) {
this.selected = newSelected; this.selected = newSelected;
this.$emit('update:value', newSelected.map((user) => user.id || user.value)); this.$emit('update:value', this.selected.map((user) => user.id || user.value));
}, },
onBlur() { onBlur() {
this.$emit('blur'); this.$emit('blur');
@ -109,17 +112,14 @@ export default {
this.isLoading = true; this.isLoading = true;
let query = qs.stringify({ include: this.itemMetadatum.value }); let query = qs.stringify({ include: this.itemMetadatum.value });
let endpoint = '/users/'; let endpoint = '/users/';
wpApi.get(endpoint + '?' + query) wpApi.get(endpoint + '?' + query)
.then((res) => { .then((res) => {
for (let user of res.data) { this.selected = res.data.map((user) => ({
this.selected.push({ name: user.name,
name: user.name, value: user.id,
value: user.id, img: user.avatar_urls && user.avatar_urls['24'] ? user.avatar_urls['24'] : ''
img: user.avatar_urls && user.avatar_urls['24'] ? user.avatar_urls['24'] : '' }));
}) ;
}
this.isLoading = false; this.isLoading = false;
}) })
.catch(() => this.isLoading = false ); .catch(() => this.isLoading = false );

View File

@ -38,7 +38,8 @@
v-for="(statusOption, index) of availableStatus" v-for="(statusOption, index) of availableStatus"
:key="index" :key="index"
v-model="selectedStatus" v-model="selectedStatus"
:native-value="statusOption.slug"> :native-value="statusOption.slug"
:disabled="(statusOption.slug === 'private' || statusOption.slug === 'publish') && !currentUserCanPublish">
<span class="icon has-text-gray"> <span class="icon has-text-gray">
<i <i
class="tainacan-icon tainacan-icon-18px" class="tainacan-icon tainacan-icon-18px"

View File

@ -136,7 +136,7 @@ export default (element) => {
app.use(FloatingVue, { app.use(FloatingVue, {
popperTriggers: ['hover', 'touch'], popperTriggers: ['hover', 'touch'],
themes: { themes: {
'taianacan-tooltip': { 'tainacan-tooltip': {
'$extend': 'tooltip', '$extend': 'tooltip',
triggers: ['hover', 'focus', 'touch'], triggers: ['hover', 'focus', 'touch'],
autoHide: true, autoHide: true,

View File

@ -294,16 +294,12 @@ export default {
margin-left: 1.5em; margin-left: 1.5em;
padding-right: 1em; padding-right: 1em;
min-height: 330px; min-height: 330px;
.active-metadata-area {
margin-left: 0.5rem;
}
} }
.active-metadatum-item, .active-metadatum-item,
.active-metadata-sections-item { .active-metadata-sections-item {
background-color: var(--tainacan-white); background-color: var(--tainacan-white);
padding: 0.7em 0.9em; padding: 0;
margin: 0px 4px; margin: 0px 4px;
min-height: 2.8571em; min-height: 2.8571em;
display: block; display: block;
@ -316,7 +312,7 @@ export default {
} }
.handle { .handle {
padding-right: 6em; padding: 0.7em 6.9em 0.7em 0.9em;
white-space: nowrap; white-space: nowrap;
display: flex; display: flex;
} }
@ -410,12 +406,10 @@ export default {
} }
} }
} }
&:not(.not-sortable-item):hover { &:not(.not-sortable-item) .handle:hover >.sorting-buttons {
.sorting-buttons { opacity: 1.0;
opacity: 1.0; visibility: visible;
visibility: visible; left: -2em
left: -2em
}
} }
&.is-compact-item .metadatum-name { &.is-compact-item .metadatum-name {
@ -453,8 +447,8 @@ export default {
.active-filter-item:hover.not-sortable-item .icon-level-identifier .tainacan-icon::before { .active-filter-item:hover.not-sortable-item .icon-level-identifier .tainacan-icon::before {
color: var(--tainacan-gray3) !important; color: var(--tainacan-gray3) !important;
} }
.active-metadatum-item:hover:not(.not-sortable-item), .active-metadatum-item:not(.not-sortable-item) .handle:hover,
.active-metadata-sections-item:hover:not(.not-sortable-item) { .active-metadata-sections-item:hover:not(.not-sortable-item) .handle:hover {
background-color: var(--tainacan-turquoise1); background-color: var(--tainacan-turquoise1);
border-color: var(--tainacan-turquoise1); border-color: var(--tainacan-turquoise1);
@ -487,8 +481,8 @@ export default {
&::before { background-color: var(--tainacan-blue5); } &::before { background-color: var(--tainacan-blue5); }
} }
&.active-metadatum-item:hover:not(.not-sortable-item), &.active-metadatum-item:not(.not-sortable-item) .handle:hover,
&.active-metadata-sections-item:hover:not(.not-sortable-item) { &.active-metadata-sections-item:not(.not-sortable-item) .handle:hover {
background-color: var(--tainacan-blue1); background-color: var(--tainacan-blue1);
border-color: var(--tainacan-blue1); border-color: var(--tainacan-blue1);
@ -496,7 +490,7 @@ export default {
color: var(--tainacan-blue5) !important; color: var(--tainacan-blue5) !important;
} }
} }
.sorting-buttons button { & > .sorting-buttons button {
background: var(--tainacan-blue1); background: var(--tainacan-blue1);
&:hover { &:hover {
color: var(--tainacan-blue5); color: var(--tainacan-blue5);

View File

@ -261,14 +261,14 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
if (isMetadatumTypeTaxonomy(metadatumType)) { if (isMetadatumTypeTaxonomy(metadatumType)) {
for (let facet of response.data.values) { for (let facet of response.data.values) {
facetsObject.push(Object.assign({ facetsObject.push(Object.assign({
term_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, term_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,
url: tainacan_blocks.site_url + '/' + collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value url: tainacan_blocks.site_url + '/' + collectionSlug + '/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value
}, facet)); }, facet));
} }
} else { } else {
for (let facet of response.data.values) { for (let facet of response.data.values) {
facetsObject.push(Object.assign({ facetsObject.push(Object.assign({
url: tainacan_blocks.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)); }, facet));
} }
} }
@ -344,8 +344,8 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
for (let facet of response.data.values) { for (let facet of response.data.values) {
childFacets.push(Object.assign({ childFacets.push(Object.assign({
term_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, term_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,
url: tainacan_blocks.site_url + '/' + collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value url: tainacan_blocks.site_url + '/' + collectionSlug + '/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value
}, facet)); }, facet));
} }

View File

@ -226,6 +226,10 @@
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
a {
pointer-events: none;
}
button { button {
position: absolute !important; position: absolute !important;
background-color: rgba(255, 255, 255, 0.75); background-color: rgba(255, 255, 255, 0.75);

View File

@ -33,6 +33,7 @@
<ul <ul
v-if="layout !== 'list'" v-if="layout !== 'list'"
:style="{ :style="{
listStyle: 'none',
gridGap: layout == 'grid' ? (gridMargin + 'px') : 'inherit', gridGap: layout == 'grid' ? (gridMargin + 'px') : 'inherit',
marginTop: showSearchBar ? '1.5em' : '4px' marginTop: showSearchBar ? '1.5em' : '4px'
}" }"
@ -50,6 +51,7 @@
<ul <ul
v-else v-else
:style="{ :style="{
listStyle: 'none',
marginTop: showSearchBar ? '1.5em' : '4px' marginTop: showSearchBar ? '1.5em' : '4px'
}" }"
class="facets-list" class="facets-list"
@ -73,6 +75,7 @@
<ul <ul
v-if="facets.length > 0 && layout != 'list'" v-if="facets.length > 0 && layout != 'list'"
:style="{ :style="{
listStyle: 'none',
gridGap: layout == 'grid' ? (gridMargin + 'px') : 'inherit', gridGap: layout == 'grid' ? (gridMargin + 'px') : 'inherit',
marginTop: showSearchBar ? '1.5em' : '0px' marginTop: showSearchBar ? '1.5em' : '0px'
}" }"
@ -102,6 +105,7 @@
<ul <ul
v-if="facets.length > 0 && layout == 'list'" v-if="facets.length > 0 && layout == 'list'"
:style="{ :style="{
listStyle: 'none',
marginTop: showSearchBar ? '1.5em' : '0px' marginTop: showSearchBar ? '1.5em' : '0px'
}" }"
class="facets-list" class="facets-list"
@ -321,14 +325,14 @@ export default {
if (this.isMetadatumTypeTaxonomy) { if (this.isMetadatumTypeTaxonomy) {
for (let facet of response.data.values) { for (let facet of response.data.values) {
this.facets.push(Object.assign({ this.facets.push(Object.assign({
term_url: facet.entity && facet.entity.url ? facet.entity.url : this.tainacanSiteUrl + '/' + this.collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value, term_url: facet.entity && facet.entity.url ? facet.entity.url : this.tainacanSiteUrl + '/' + this.collectionSlug + '/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value,
url: this.tainacanSiteUrl + '/' + this.collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value url: this.tainacanSiteUrl + '/' + this.collectionSlug + '/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value
}, facet)); }, facet));
} }
} else { } else {
for (let facet of response.data.values) { for (let facet of response.data.values) {
this.facets.push(Object.assign({ this.facets.push(Object.assign({
url: this.tainacanSiteUrl + '/' + this.collectionSlug + '/#/?metaquery[0][key]=' + this.metadatumId + '&metaquery[0][value]=' + facet.value url: this.tainacanSiteUrl + '/' + this.collectionSlug + '/?metaquery[0][key]=' + this.metadatumId + '&metaquery[0][value]=' + facet.value
}, facet)); }, facet));
} }
} }
@ -387,8 +391,8 @@ export default {
for (let facet of response.data.values) { for (let facet of response.data.values) {
childFacets.push(Object.assign({ childFacets.push(Object.assign({
term_url: facet.entity && facet.entity.url ? facet.entity.url : this.tainacanSiteUrl + '/' + this.collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value, term_url: facet.entity && facet.entity.url ? facet.entity.url : this.tainacanSiteUrl + '/' + this.collectionSlug + '/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value,
url: this.tainacanSiteUrl + '/' + this.collectionSlug + '/#/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value url: this.tainacanSiteUrl + '/' + this.collectionSlug + '/?taxquery[0][compare]=IN&taxquery[0][taxonomy]=' + facet.taxonomy + '&taxquery[0][terms][0]=' + facet.value
}, facet)); }, facet));
} }

View File

@ -31,7 +31,7 @@ export default (element) => {
VueRoles.use(FloatingVue, { VueRoles.use(FloatingVue, {
popperTriggers: ['hover'], popperTriggers: ['hover'],
themes: { themes: {
'taianacan-tooltip': { 'tainacan-tooltip': {
$extend: 'tooltip', $extend: 'tooltip',
triggers: ['hover', 'focus', 'touch'], triggers: ['hover', 'focus', 'touch'],
html: true, html: true,